Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions worlds/lingo/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ def get_prog_item_classification(item_name: str):


def load_item_data():
global ALL_ITEM_TABLE, ITEMS_BY_GROUP

for color in ["Black", "Red", "Blue", "Yellow", "Green", "Orange", "Gray", "Brown", "Purple"]:
ALL_ITEM_TABLE[color] = ItemData(get_special_item_id(color), get_prog_item_classification(color),
ItemType.COLOR, False, [])
Expand Down
2 changes: 0 additions & 2 deletions worlds/lingo/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class LingoLocation(Location):


def load_location_data():
global ALL_LOCATION_TABLE, LOCATIONS_BY_GROUP

for room_name, panels in PANELS_BY_ROOM.items():
for panel_name, panel in panels.items():
location_name = f"{room_name} - {panel_name}" if panel.location_name is None else panel.location_name
Expand Down
21 changes: 2 additions & 19 deletions worlds/lingo/utils/pickle_static_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def hash_file(path):


def load_static_data(ll1_path, ids_path):
global PAINTING_EXITS, SPECIAL_ITEM_IDS, PANEL_LOCATION_IDS, DOOR_LOCATION_IDS, DOOR_ITEM_IDS, \
DOOR_GROUP_ITEM_IDS, PROGRESSIVE_ITEM_IDS, PANEL_DOOR_ITEM_IDS, PANEL_GROUP_ITEM_IDS
global PAINTING_EXITS

# Load in all item and location IDs. These are broken up into groups based on the type of item/location.
with open(ids_path, "r") as file:
Expand Down Expand Up @@ -128,7 +127,7 @@ def load_static_data(ll1_path, ids_path):


def process_single_entrance(source_room: str, room_name: str, door_obj) -> RoomEntrance:
global PAINTING_ENTRANCES, PAINTING_EXIT_ROOMS
global PAINTING_ENTRANCES

entrance_type = EntranceType.NORMAL
if "painting" in door_obj and door_obj["painting"]:
Expand Down Expand Up @@ -175,8 +174,6 @@ def process_entrance(source_room, doors, room_obj):


def process_panel_door(room_name, panel_door_name, panel_door_data):
global PANEL_DOORS_BY_ROOM, PANEL_DOOR_BY_PANEL_BY_ROOM

panels: List[RoomAndPanel] = list()
for panel in panel_door_data["panels"]:
if isinstance(panel, dict):
Expand Down Expand Up @@ -215,8 +212,6 @@ def process_panel_door(room_name, panel_door_name, panel_door_data):


def process_panel(room_name, panel_name, panel_data):
global PANELS_BY_ROOM

# required_room can either be a single room or a list of rooms.
if "required_room" in panel_data:
if isinstance(panel_data["required_room"], list):
Expand Down Expand Up @@ -310,8 +305,6 @@ def process_panel(room_name, panel_name, panel_data):


def process_door(room_name, door_name, door_data):
global DOORS_BY_ROOM

# The item name associated with a door can be explicitly specified in the configuration. If it is not, it is
# generated from the room and door name.
if "item_name" in door_data:
Expand Down Expand Up @@ -409,8 +402,6 @@ def process_door(room_name, door_name, door_data):


def process_painting(room_name, painting_data):
global PAINTINGS, REQUIRED_PAINTING_ROOMS, REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS

# Read in information about this painting and store it in an object.
painting_id = painting_data["id"]

Expand Down Expand Up @@ -468,17 +459,13 @@ def process_painting(room_name, painting_data):


def process_sunwarp(room_name, sunwarp_data):
global SUNWARP_ENTRANCES, SUNWARP_EXITS

if sunwarp_data["direction"] == "enter":
SUNWARP_ENTRANCES[sunwarp_data["dots"] - 1] = room_name
else:
SUNWARP_EXITS[sunwarp_data["dots"] - 1] = room_name


def process_progressive_door(room_name, progression_name, progression_doors):
global PROGRESSIVE_ITEMS, PROGRESSIVE_DOORS_BY_ROOM

# Progressive items are configured as a list of doors.
PROGRESSIVE_ITEMS.add(progression_name)

Expand All @@ -497,8 +484,6 @@ def process_progressive_door(room_name, progression_name, progression_doors):


def process_progressive_panel(room_name, progression_name, progression_panel_doors):
global PROGRESSIVE_ITEMS, PROGRESSIVE_PANELS_BY_ROOM

# Progressive items are configured as a list of panel doors.
PROGRESSIVE_ITEMS.add(progression_name)

Expand All @@ -517,8 +502,6 @@ def process_progressive_panel(room_name, progression_name, progression_panel_doo


def process_room(room_name, room_data):
global ALL_ROOMS

room_obj = Room(room_name, [])

if "entrances" in room_data:
Expand Down
Loading