Skip to content

Commit

Permalink
sc2: cleanup for race-filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
EnvyDragon committed May 26, 2024
1 parent 556a42d commit 683e992
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions worlds/sc2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions worlds/sc2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 683e992

Please sign in to comment.