Skip to content

Commit f7c1026

Browse files
committed
Tried installing mypy and fixing some errors to hopefully prevent bullshit like checking if i function exists in the future.
1 parent 606d8b3 commit f7c1026

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

worlds/crystal_project/locations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class LocationData(NamedTuple):
1919
shop_index_offset = 10000000
2020
#summon_index_offset = 1000000 Summons Todo
2121

22-
def get_locations(player: Optional[int], options: Optional[CrystalProjectOptions]) -> List[LocationData]:
22+
def get_locations(player: int, options: Optional[CrystalProjectOptions]) -> List[LocationData]:
2323
logic = CrystalProjectLogic(player, options)
2424
#Todo include crystals/job locations, NPC gifts, key items like squirrels, ore
2525
location_table: List[LocationData] = [

worlds/crystal_project/regions.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class CrystalProjectLocation(Location):
1414
game: str = "CrystalProject"
1515

16-
def __init__(self, player: int, name: str = " ", address: int = None, parent=None):
16+
def __init__(self, player: int, name: str = " ", address = None, parent=None):
1717
super().__init__(player, name, address, parent)
1818

1919
def init_areas(world: "CrystalProjectWorld", locations: List[LocationData], options: CrystalProjectOptions) -> None:
@@ -359,21 +359,14 @@ def create_region(world: "CrystalProjectWorld", player: int, locations_per_regio
359359

360360
def create_location(player: int, location_data: LocationData, region: Region) -> Location:
361361
location = CrystalProjectLocation(player, location_data.name, location_data.code, region)
362-
location.region = location_data.region
363362

364363
if location_data.rule:
365364
location.access_rule = location_data.rule
366365

367366
return location
368367

369368
def connect_menu_region(world: "CrystalProjectWorld", options: CrystalProjectOptions) -> None:
370-
starting_region_list = {
371-
0: MENU
372-
}
373-
374369
logic = CrystalProjectLogic(world.player, options)
375-
world.starting_region = starting_region_list[0]
376-
menu = world.multiworld.get_region(MENU, world.player)
377370
multiworld = world.multiworld
378371
multiworld.get_region(MENU, world.player).add_exits([SPAWNING_MEADOWS, CAPITAL_SEQUOIA, MERCURY_SHRINE, SALMON_RIVER, POKO_POKO_DESERT, GANYMEDE_SHRINE, DIONE_SHRINE, TALL_TALL_HEIGHTS, LANDS_END, JIDAMBA_TANGLE, NEPTUNE_SHRINE, THE_OLD_WORLD, THE_NEW_WORLD],
379372
{CAPITAL_SEQUOIA: lambda state: state.has("Item - Gaea Stone", world.player),

0 commit comments

Comments
 (0)