mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
sm64ex: Refactor Regions (#2546)
Refactors region code to remove references to course index. There were bugs somewhere, but I dont know where tbh. This fixes them but leaves logic otherwise intact, and much cleaner to look at as there's one list less to take care of. Additionally, this fixes stopping the clock from Big Boos Haunt.
This commit is contained in:
committed by
GitHub
parent
229a263131
commit
530617c9a7
@@ -5,7 +5,7 @@ from .Items import item_table, cannon_item_table, SM64Item
|
||||
from .Locations import location_table, SM64Location
|
||||
from .Options import sm64_options
|
||||
from .Rules import set_rules
|
||||
from .Regions import create_regions, sm64courses, sm64entrances_s, sm64_internalloc_to_string, sm64_internalloc_to_regionid
|
||||
from .Regions import create_regions, sm64_level_to_entrances
|
||||
from BaseClasses import Item, Tutorial, ItemClassification
|
||||
from ..AutoWorld import World, WebWorld
|
||||
|
||||
@@ -55,8 +55,8 @@ class SM64World(World):
|
||||
# Write area_connections to spoiler log
|
||||
for entrance, destination in self.area_connections.items():
|
||||
self.multiworld.spoiler.set_entrance(
|
||||
sm64_internalloc_to_string[entrance] + " Entrance",
|
||||
sm64_internalloc_to_string[destination],
|
||||
sm64_level_to_entrances[entrance] + " Entrance",
|
||||
sm64_level_to_entrances[destination],
|
||||
'entrance', self.player)
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
@@ -182,8 +182,7 @@ class SM64World(World):
|
||||
if self.topology_present:
|
||||
er_hint_data = {}
|
||||
for entrance, destination in self.area_connections.items():
|
||||
regionid = sm64_internalloc_to_regionid[destination]
|
||||
region = self.multiworld.get_region(sm64courses[regionid], self.player)
|
||||
region = self.multiworld.get_region(sm64_level_to_entrances[destination], self.player)
|
||||
for location in region.locations:
|
||||
er_hint_data[location.address] = sm64_internalloc_to_string[entrance]
|
||||
er_hint_data[location.address] = sm64_level_to_entrances[entrance]
|
||||
multidata['er_hint_data'][self.player] = er_hint_data
|
||||
|
||||
Reference in New Issue
Block a user