From c97215e0e755224593fdd00894731b59aa415e19 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 28 Mar 2024 17:23:37 -0400 Subject: [PATCH] TUNIC: Minor refactor of the vanilla_portals function (#3009) * Remove unused, change an if to an elif * Remove unused import --- worlds/tunic/er_scripts.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/worlds/tunic/er_scripts.py b/worlds/tunic/er_scripts.py index 5756ec90..5d08188a 100644 --- a/worlds/tunic/er_scripts.py +++ b/worlds/tunic/er_scripts.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Set, Tuple, TYPE_CHECKING +from typing import Dict, List, Set, TYPE_CHECKING from BaseClasses import Region, ItemClassification, Item, Location from .locations import location_table from .er_data import Portal, tunic_er_regions, portal_mapping, \ @@ -89,7 +89,6 @@ def place_event_items(world: "TunicWorld", regions: Dict[str, Region]) -> None: def vanilla_portals() -> Dict[Portal, Portal]: portal_pairs: Dict[Portal, Portal] = {} portal_map = portal_mapping.copy() - shop_num = 1 while portal_map: portal1 = portal_map[0] @@ -98,11 +97,10 @@ def vanilla_portals() -> Dict[Portal, Portal]: portal2_sdt = portal1.destination_scene() if portal2_sdt.startswith("Shop,"): - portal2 = Portal(name=f"Shop", region="Shop", + portal2 = Portal(name="Shop", region="Shop", destination="Previous Region", tag="_") - shop_num += 1 - if portal2_sdt == "Purgatory, Purgatory_bottom": + elif portal2_sdt == "Purgatory, Purgatory_bottom": portal2_sdt = "Purgatory, Purgatory_top" for portal in portal_map: