From 683e992f1af110d24bbf21e862190fde222f6da1 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Sat, 25 May 2024 23:44:02 -0400 Subject: [PATCH] sc2: cleanup for race-filtering --- worlds/sc2/__init__.py | 6 +++--- worlds/sc2/client.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/worlds/sc2/__init__.py b/worlds/sc2/__init__.py index 9fc0dc3086e2..1b3ca85245ba 100644 --- a/worlds/sc2/__init__.py +++ b/worlds/sc2/__init__.py @@ -264,13 +264,13 @@ def flag_excludes_by_faction_presence(world: SC2World, item_list: List[FilterIte for item in item_list: # Catch-all for all of a faction's items - if not terran_missions and item.data.race == SC2Race.TERRAN: + if (not terran_missions and item.data.race == SC2Race.TERRAN): item.flags |= ItemFilterFlags.Excluded continue - if not zerg_missions and item.data.race == SC2Race.ZERG: + if (not zerg_missions and item.data.race == SC2Race.ZERG): item.flags |= ItemFilterFlags.Excluded continue - if not protoss_missions and item.data.race == SC2Race.PROTOSS: + if (not protoss_missions and item.data.race == SC2Race.PROTOSS): if item.name not in item_groups.soa_items: item.flags |= ItemFilterFlags.Excluded continue diff --git a/worlds/sc2/client.py b/worlds/sc2/client.py index dd107cadede1..de50079def6a 100644 --- a/worlds/sc2/client.py +++ b/worlds/sc2/client.py @@ -1013,7 +1013,6 @@ def kerrigan_primal(ctx: SC2Context, kerrigan_level: int) -> bool: return get_full_item_list()[item_names.KERRIGAN_PRIMAL_FORM].code in codes return False - async def starcraft_launch(ctx: SC2Context, mission_id: int): sc2_logger.info(f"Launching {lookup_id_to_mission[mission_id].mission_name}. If game does not launch check log file for errors.") @@ -1085,7 +1084,7 @@ async def on_step(self, iteration: int): self.ctx.mission_order, 1 if self.ctx.nova_covert_ops_only else 0, self.ctx.grant_story_levels, - self.ctx.enable_morphling, + self.ctx.enable_morphling )) await self.chat_send("?GiveResources {} {} {}".format( start_items[SC2Race.ANY][0],