TUNIC: Minor refactor of the vanilla_portals function (#3009)
* Remove unused, change an if to an elif * Remove unused import
This commit is contained in:
parent
eb66886a90
commit
c97215e0e7
|
@ -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 BaseClasses import Region, ItemClassification, Item, Location
|
||||||
from .locations import location_table
|
from .locations import location_table
|
||||||
from .er_data import Portal, tunic_er_regions, portal_mapping, \
|
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]:
|
def vanilla_portals() -> Dict[Portal, Portal]:
|
||||||
portal_pairs: Dict[Portal, Portal] = {}
|
portal_pairs: Dict[Portal, Portal] = {}
|
||||||
portal_map = portal_mapping.copy()
|
portal_map = portal_mapping.copy()
|
||||||
shop_num = 1
|
|
||||||
|
|
||||||
while portal_map:
|
while portal_map:
|
||||||
portal1 = portal_map[0]
|
portal1 = portal_map[0]
|
||||||
|
@ -98,11 +97,10 @@ def vanilla_portals() -> Dict[Portal, Portal]:
|
||||||
portal2_sdt = portal1.destination_scene()
|
portal2_sdt = portal1.destination_scene()
|
||||||
|
|
||||||
if portal2_sdt.startswith("Shop,"):
|
if portal2_sdt.startswith("Shop,"):
|
||||||
portal2 = Portal(name=f"Shop", region="Shop",
|
portal2 = Portal(name="Shop", region="Shop",
|
||||||
destination="Previous Region", tag="_")
|
destination="Previous Region", tag="_")
|
||||||
shop_num += 1
|
|
||||||
|
|
||||||
if portal2_sdt == "Purgatory, Purgatory_bottom":
|
elif portal2_sdt == "Purgatory, Purgatory_bottom":
|
||||||
portal2_sdt = "Purgatory, Purgatory_top"
|
portal2_sdt = "Purgatory, Purgatory_top"
|
||||||
|
|
||||||
for portal in portal_map:
|
for portal in portal_map:
|
||||||
|
|
Loading…
Reference in New Issue