LTTP: Rip Lttp specific entrance code out of core and use Region helpers (#1960)

This commit is contained in:
Aaron Wagener
2025-04-18 16:34:34 -05:00
committed by GitHub
parent cb3d35faf9
commit 1b51714f3b
7 changed files with 37 additions and 33 deletions

View File

@@ -2,8 +2,6 @@
Helper functions to deliver entrance/exit/region sets to OWG rules.
"""
from BaseClasses import Entrance
from .StateHelpers import can_lift_heavy_rocks, can_boots_clip_lw, can_boots_clip_dw, can_get_glitched_speed_dw
@@ -279,18 +277,14 @@ def create_no_logic_connections(player, world, connections):
for entrance, parent_region, target_region, *rule_override in connections:
parent = world.get_region(parent_region, player)
target = world.get_region(target_region, player)
connection = Entrance(player, entrance, parent)
parent.exits.append(connection)
connection.connect(target)
parent.connect(target, entrance)
def create_owg_connections(player, world, connections):
for entrance, parent_region, target_region, *rule_override in connections:
parent = world.get_region(parent_region, player)
target = world.get_region(target_region, player)
connection = Entrance(player, entrance, parent)
parent.exits.append(connection)
connection.connect(target)
parent.connect(target, entrance)
def set_owg_connection_rules(player, world, connections, default_rule):