From fab12dca0bc32720be596e4ad86fe78c0bcaeab7 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 20 Aug 2022 19:20:22 +0200 Subject: [PATCH 1/5] SC2: add anti air to Devil's Playground Victory People seem to be on the mission long enough to get attacked by Mutalisks, so Victory should require anti air. Optional Objectives are doable quite comfortably before Mutalisks show up, allowing the anti-air to be on them for later in the mission. --- worlds/sc2wol/Locations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worlds/sc2wol/Locations.py b/worlds/sc2wol/Locations.py index 3425dc7199..f69abd48e3 100644 --- a/worlds/sc2wol/Locations.py +++ b/worlds/sc2wol/Locations.py @@ -176,7 +176,8 @@ def get_locations(world: Optional[MultiWorld], player: Optional[int]) -> Tuple[L state._sc2wol_has_competent_anti_air(world, player) and state.has('Science Vessel', player)), LocationData("Devil's Playground", "Devil's Playground: Victory", SC2WOL_LOC_ID_OFFSET + 1300, - lambda state: state._sc2wol_has_common_unit(world, player) or state.has("Reaper", player)), + lambda state: state._sc2wol_has_anti_air(world, player) and ( + state._sc2wol_has_common_unit(world, player) or state.has("Reaper", player))), LocationData("Devil's Playground", "Devil's Playground: Tosh's Miners", SC2WOL_LOC_ID_OFFSET + 1301), LocationData("Devil's Playground", "Devil's Playground: Brutalisk", SC2WOL_LOC_ID_OFFSET + 1302, lambda state: state._sc2wol_has_common_unit(world, player) or state.has("Reaper", player)), From 33103b209d2b917f6975c69d4179a9886014b026 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 23 Aug 2022 22:18:24 +0200 Subject: [PATCH 2/5] WebHost: fix error on save --- WebHostLib/customserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHostLib/customserver.py b/WebHostLib/customserver.py index 01f1fd25e5..da7b54ba6d 100644 --- a/WebHostLib/customserver.py +++ b/WebHostLib/customserver.py @@ -103,7 +103,7 @@ class WebHostContext(Context): room.multisave = pickle.dumps(self.get_save()) # saving only occurs on activity, so we can "abuse" this information to mark this as last_activity if not exit_save: # we don't want to count a shutdown as activity, which would restart the server again - room.last_activity = datetime.utcnow() + room.last_activity = datetime.datetime.utcnow() return True def get_save(self) -> dict: From 295ea97544f0deb41e51e16d4ac221c630713b80 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 23 Aug 2022 23:04:20 +0200 Subject: [PATCH 3/5] Subnautica: increment client version --- worlds/subnautica/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/subnautica/__init__.py b/worlds/subnautica/__init__.py index 6562d93db0..806c1b195e 100644 --- a/worlds/subnautica/__init__.py +++ b/worlds/subnautica/__init__.py @@ -42,7 +42,7 @@ class SubnauticaWorld(World): option_definitions = Options.options data_version = 6 - required_client_version = (0, 3, 4) + required_client_version = (0, 3, 5) prefill_items: List[Item] creatures_to_scan: List[str] From 1aaf89ff2cfbf440c9e2269ebfc1aec55ff04eb8 Mon Sep 17 00:00:00 2001 From: Magnemania <89949176+Magnemania@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:20:39 -0400 Subject: [PATCH 4/5] SC2: Switched mission item group to a list comprehension to fix missile shuffle errors (#959) --- worlds/sc2wol/Items.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/worlds/sc2wol/Items.py b/worlds/sc2wol/Items.py index 59b59bc137..8da40de5ab 100644 --- a/worlds/sc2wol/Items.py +++ b/worlds/sc2wol/Items.py @@ -1,5 +1,6 @@ from BaseClasses import Item, ItemClassification import typing +from .MissionTables import vanilla_mission_req_table class ItemData(typing.NamedTuple): @@ -153,12 +154,7 @@ basic_unit: typing.Tuple[str, ...] = ( item_name_groups = {} for item, data in item_table.items(): item_name_groups.setdefault(data.type, []).append(item) -item_name_groups["Missions"] = ["Beat Liberation Day", "Beat The Outlaws", "Beat Zero Hour", "Beat Evacuation", - "None Outbreak", "Beat Safe Haven", "Beat Haven's Fall", "Beat Smash and Grab", "Beat The Dig", - "Beat The Moebius Factor", "Beat Supernova", "Beat Maw of the Void", "Beat Devil's Playground", - "Beat Welcome to the Jungle", "Beat Breakout", "Beat Ghost of a Chance", - "Beat The Great Train Robbery", "Beat Cutthroat", "Beat Engine of Destruction", - "Beat Media Blitz", "Beat Piercing the Shroud"] +item_name_groups["Missions"] = ["Beat " + mission_name for mission_name in vanilla_mission_req_table] filler_items: typing.Tuple[str, ...] = ( '+15 Starting Minerals', From 0d6cbd9093361f734c0d6af939c8bc1e32207c43 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 23 Aug 2022 23:33:30 +0200 Subject: [PATCH 5/5] Core: convert item name groups to frozenset Some worlds define them in lists, this speeds up lookup via state.has_group() or similar --- worlds/AutoWorld.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index 02b94c5fb7..8d9a1b0829 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -27,7 +27,8 @@ class AutoWorldRegister(type): # build rest dct["item_names"] = frozenset(dct["item_name_to_id"]) - dct["item_name_groups"] = dct.get("item_name_groups", {}) + dct["item_name_groups"] = {group_name: frozenset(group_set) for group_name, group_set + in dct.get("item_name_groups", {}).items()} dct["item_name_groups"]["Everything"] = dct["item_names"] dct["location_names"] = frozenset(dct["location_name_to_id"]) dct["all_item_and_group_names"] = frozenset(dct["item_names"] | set(dct.get("item_name_groups", {})))