LttP: extract Dungeon and Boss from core (#1787)

This commit is contained in:
Fabian Dill
2023-05-20 19:57:48 +02:00
committed by GitHub
parent a2ddd5c9e8
commit c8453035da
13 changed files with 342 additions and 305 deletions

View File

@@ -1,9 +1,13 @@
"""Module extending BaseClasses.py for aLttP"""
from typing import Optional
from typing import Optional, TYPE_CHECKING
from enum import IntEnum
from BaseClasses import Location, Item, ItemClassification, Region, MultiWorld
if TYPE_CHECKING:
from .Dungeons import Dungeon
from .Regions import LTTPRegion
class ALttPLocation(Location):
game: str = "A Link to the Past"
@@ -13,6 +17,7 @@ class ALttPLocation(Location):
shop_slot: Optional[int] = None
"""If given as integer, shop_slot is the shop's inventory index."""
shop_slot_disabled: bool = False
parent_region: "LTTPRegion"
def __init__(self, player: int, name: str, address: Optional[int] = None, crystal: bool = False,
hint_text: Optional[str] = None, parent=None, player_address: Optional[int] = None):
@@ -86,6 +91,7 @@ class LTTPRegion(Region):
is_dark_world: bool = False
shop: Optional = None
dungeon: Optional["Dungeon"] = None
def __init__(self, name: str, type_: LTTPRegionType, hint: str, player: int, multiworld: MultiWorld):
super().__init__(name, player, multiworld, hint)