mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Lingo: Pre-compile datafile to improve loading time (#2829)
This commit is contained in:
committed by
GitHub
parent
e534abeab0
commit
afe7aea536
@@ -2,7 +2,8 @@ from enum import Flag, auto
|
||||
from typing import Dict, List, NamedTuple
|
||||
|
||||
from BaseClasses import Location
|
||||
from .static_logic import DOORS_BY_ROOM, PANELS_BY_ROOM, RoomAndPanel, get_door_location_id, get_panel_location_id
|
||||
from .datatypes import RoomAndPanel
|
||||
from .static_logic import DOORS_BY_ROOM, PANELS_BY_ROOM, get_door_location_id, get_panel_location_id
|
||||
|
||||
|
||||
class LocationClassification(Flag):
|
||||
@@ -20,14 +21,6 @@ class LocationData(NamedTuple):
|
||||
panels: List[RoomAndPanel]
|
||||
classification: LocationClassification
|
||||
|
||||
def panel_ids(self):
|
||||
ids = set()
|
||||
for panel in self.panels:
|
||||
effective_room = self.room if panel.room is None else panel.room
|
||||
panel_data = PANELS_BY_ROOM[effective_room][panel.panel]
|
||||
ids = ids | set(panel_data.internal_ids)
|
||||
return ids
|
||||
|
||||
|
||||
class LingoLocation(Location):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user