mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Bug Squashing
This commit is contained in:
@@ -1,13 +1,25 @@
|
||||
# generated by https://github.com/Berserker66/HollowKnight.RandomizerMod/blob/master/extract_data.py
|
||||
# do not edit manually
|
||||
from .ExtractedData import region_names, exits, connectors
|
||||
|
||||
|
||||
def create_regions(world, player: int):
|
||||
from . import create_region
|
||||
from .Items import item_table
|
||||
from .Locations import lookup_name_to_id
|
||||
world.regions += [
|
||||
create_region(world, player, 'Menu', None, ['Hollow Nest S&Q']),
|
||||
create_region(world, player, 'Hollow Nest', [location for location in lookup_name_to_id] +
|
||||
[item_name for item_name, item_data in item_table.items() if item_data.type == "Event"])
|
||||
]
|
||||
from . import create_region, HKLocation, HKItem
|
||||
world.regions.append(create_region(world, player, 'Menu', None, ['Hollow Nest S&Q']))
|
||||
for region in region_names:
|
||||
world.regions.append(create_region(world, player, region, [],
|
||||
exits.get(region, [])))
|
||||
for entrance_name, exit_name in connectors.items():
|
||||
if exit_name:
|
||||
target_region = world.get_entrance(exit_name, player).parent_region
|
||||
world.get_entrance(entrance_name, player).connect(target_region)
|
||||
if not entrance_name.endswith("_R"):
|
||||
# a traversable entrance puts the name of the target door "into logic".
|
||||
loc = HKLocation(player, exit_name, None, target_region)
|
||||
loc.place_locked_item(HKItem(exit_name,
|
||||
not exit_name.startswith("White_Palace_"),
|
||||
None, "Event", player))
|
||||
target_region.locations.append(loc)
|
||||
else:
|
||||
ent = world.get_entrance(entrance_name, player)
|
||||
ent.parent_region.exits.remove(ent)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user