From 7ce43df0b63e3ccacbd4c5c2e6f5c283b3d7b689 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Fri, 9 Aug 2024 18:10:30 -0400 Subject: [PATCH] Remove unused safety thing --- worlds/tunic/er_data.py | 12 ------------ worlds/tunic/er_scripts.py | 10 +--------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/worlds/tunic/er_data.py b/worlds/tunic/er_data.py index 8c63f2250a..ca02057f7a 100644 --- a/worlds/tunic/er_data.py +++ b/worlds/tunic/er_data.py @@ -544,18 +544,6 @@ def get_portal_outlet_region(portal: Portal, world: "TunicWorld") -> str: return world.er_regions[portal.region].outlet_region or portal.region -def is_dead_end(portal: Portal, restricted: bool, world: "TunicWorld") -> bool: - dead_end_status = world.er_regions[portal.region].dead_end - if not dead_end_status: - return False - # for the purposes of this function, special can be treated as a dead end - elif dead_end_status in [DeadEnd.all_cats, DeadEnd.special]: - return True - # last possibility is DeadEnd.restricted - else: - return restricted - - class DeadEnd(IntEnum): free = 0 # not a dead end all_cats = 1 # dead end in every logic category diff --git a/worlds/tunic/er_scripts.py b/worlds/tunic/er_scripts.py index b23218828c..e36aeda0b1 100644 --- a/worlds/tunic/er_scripts.py +++ b/worlds/tunic/er_scripts.py @@ -2,7 +2,7 @@ from typing import Dict, List, Set, Tuple, TYPE_CHECKING from BaseClasses import Region, ItemClassification, Item, Location from .locations import location_table from .er_data import (Portal, portal_mapping, traversal_requirements, DeadEnd, Direction, RegionInfo, - get_portal_outlet_region, is_dead_end) + get_portal_outlet_region) from .er_rules import set_er_region_rules from Options import PlandoConnection from .options import EntranceRando, EntranceLayout @@ -608,14 +608,6 @@ def pair_portals(world: "TunicWorld", regions: Dict[str, Region]) -> Dict[Portal if should_continue: continue - # if decoupled is on, we need to make sure you aren't connecting two dead ends together both ways - # todo: see if this ever actually gets triggered - if decoupled: - if portal1 in portal_pairs.keys() and portal_pairs[portal1] == portal: - if (is_dead_end(portal1, not ice_grappling, world) - and is_dead_end(portal, not ice_grappling, world)): - continue - portal2 = portal connected_regions.add(get_portal_outlet_region(portal, world)) two_plus2.remove(portal)