FF1: fix printjson

This commit is contained in:
Fabian Dill
2022-09-09 21:28:24 +02:00
committed by Fabian Dill
parent 99d2caa57d
commit 88a225764a
5 changed files with 34 additions and 35 deletions

View File

@@ -135,11 +135,6 @@ class SC2Context(CommonContext):
last_loc_list = None
difficulty_override = -1
mission_id_to_location_ids: typing.Dict[int, typing.List[int]] = {}
raw_text_parser: RawJSONtoTextParser
def __init__(self, *args, **kwargs):
super(SC2Context, self).__init__(*args, **kwargs)
self.raw_text_parser = RawJSONtoTextParser(self)
async def server_auth(self, password_requested: bool = False):
if password_requested and not self.password:
@@ -164,10 +159,13 @@ class SC2Context(CommonContext):
check_mod_install()
def on_print_json(self, args: dict):
# goes to this world
if "receiving" in args and self.slot_concerns_self(args["receiving"]):
relevant = True
# found in this world
elif "item" in args and self.slot_concerns_self(args["item"].player):
relevant = True
# not related
else:
relevant = False