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

@@ -1,11 +1,11 @@
import collections
import typing
from BaseClasses import Entrance, MultiWorld
from .SubClasses import LTTPRegion, LTTPRegionType
from BaseClasses import MultiWorld
from .SubClasses import LTTPEntrance, LTTPRegion, LTTPRegionType
def is_main_entrance(entrance: Entrance) -> bool:
def is_main_entrance(entrance: LTTPEntrance) -> bool:
return entrance.parent_region.type in {LTTPRegionType.DarkWorld, LTTPRegionType.LightWorld} if entrance.parent_region.type else True
@@ -410,7 +410,7 @@ def _create_region(world: MultiWorld, player: int, name: str, type: LTTPRegionTy
ret = LTTPRegion(name, type, hint, player, world)
if exits:
for exit in exits:
ret.exits.append(Entrance(player, exit, ret))
ret.create_exit(exit)
if locations:
for location in locations:
if location in key_drop_data: