From 9c6e33c7869d28b8fa1b3349c9a59a40aa8c1526 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 22 Mar 2024 15:28:41 -0500 Subject: Lingo: Add trap weights option (#2837) --- items.py | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'items.py') diff --git a/items.py b/items.py index b9c4eb7..7c7928c 100644 --- a/items.py +++ b/items.py @@ -1,13 +1,9 @@ from typing import Dict, List, NamedTuple, Optional, TYPE_CHECKING from BaseClasses import Item, ItemClassification -from .options import ShuffleDoors from .static_logic import DOORS_BY_ROOM, PROGRESSION_BY_ROOM, PROGRESSIVE_ITEMS, get_door_group_item_id, \ get_door_item_id, get_progressive_item_id, get_special_item_id -if TYPE_CHECKING: - from . import LingoWorld - class ItemData(NamedTuple): """ @@ -19,20 +15,6 @@ class ItemData(NamedTuple): has_doors: bool painting_ids: List[str] - def should_include(self, world: "LingoWorld") -> bool: - if self.mode == "colors": - return world.options.shuffle_colors > 0 - elif self.mode == "doors": - return world.options.shuffle_doors != ShuffleDoors.option_none - elif self.mode == "complex door": - return world.options.shuffle_doors == ShuffleDoors.option_complex - elif self.mode == "door group": - return world.options.shuffle_doors == ShuffleDoors.option_simple - elif self.mode == "special": - return False - else: - return True - class LingoItem(Item): """ @@ -44,6 +26,8 @@ class LingoItem(Item): ALL_ITEM_TABLE: Dict[str, ItemData] = {} ITEMS_BY_GROUP: Dict[str, List[str]] = {} +TRAP_ITEMS: List[str] = ["Slowness Trap", "Iceland Trap", "Atbash Trap"] + def load_item_data(): global ALL_ITEM_TABLE, ITEMS_BY_GROUP @@ -87,9 +71,7 @@ def load_item_data(): "The Feeling of Being Lost": ItemClassification.filler, "Wanderlust": ItemClassification.filler, "Empty White Hallways": ItemClassification.filler, - "Slowness Trap": ItemClassification.trap, - "Iceland Trap": ItemClassification.trap, - "Atbash Trap": ItemClassification.trap, + **{trap_name: ItemClassification.trap for trap_name in TRAP_ITEMS}, "Puzzle Skip": ItemClassification.useful, } -- cgit 1.4.1