forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lingo: Pre-compile datafile to improve loading time (ArchipelagoMW#2829)
- Loading branch information
Showing
13 changed files
with
626 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# lingo data | ||
|
||
The source of truth for the Lingo randomizer is (currently) the LL1.yaml and ids.yaml files located here. These files are used by the generator, the game client, and the tracker, in order to have logic that is consistent across them all. | ||
|
||
The generator does not actually read in the yaml files. Instead, a compiled datafile called generated.dat is also located in this directory. If you update LL1.yaml and/or ids.yaml, you must also regenerate the datafile using `python worlds/lingo/utils/pickle_static_data.py`. A unit test will fail if you don't. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
from typing import List, NamedTuple, Optional | ||
|
||
|
||
class RoomAndDoor(NamedTuple): | ||
room: Optional[str] | ||
door: str | ||
|
||
|
||
class RoomAndPanel(NamedTuple): | ||
room: Optional[str] | ||
panel: str | ||
|
||
|
||
class RoomEntrance(NamedTuple): | ||
room: str # source room | ||
door: Optional[RoomAndDoor] | ||
painting: bool | ||
|
||
|
||
class Room(NamedTuple): | ||
name: str | ||
entrances: List[RoomEntrance] | ||
|
||
|
||
class Door(NamedTuple): | ||
name: str | ||
item_name: str | ||
location_name: Optional[str] | ||
panels: Optional[List[RoomAndPanel]] | ||
skip_location: bool | ||
skip_item: bool | ||
has_doors: bool | ||
painting_ids: List[str] | ||
event: bool | ||
group: Optional[str] | ||
include_reduce: bool | ||
junk_item: bool | ||
|
||
|
||
class Panel(NamedTuple): | ||
required_rooms: List[str] | ||
required_doors: List[RoomAndDoor] | ||
required_panels: List[RoomAndPanel] | ||
colors: List[str] | ||
check: bool | ||
event: bool | ||
exclude_reduce: bool | ||
achievement: bool | ||
non_counting: bool | ||
|
||
|
||
class Painting(NamedTuple): | ||
id: str | ||
room: str | ||
enter_only: bool | ||
exit_only: bool | ||
required: bool | ||
required_when_no_doors: bool | ||
required_door: Optional[RoomAndDoor] | ||
disable: bool | ||
req_blocked: bool | ||
req_blocked_when_no_doors: bool | ||
|
||
|
||
class Progression(NamedTuple): | ||
item_name: str | ||
index: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.