mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
LTTP: Rip Lttp specific entrance code out of core and use Region helpers (#1960)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user