From b07540569a79765c8225ca2eed57fe7a7047b17a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Dec 2024 18:04:15 -0500 Subject: [PATCH] bonus item descriptions since we can also add stuff for webworld easily --- worlds/sm64ex/Items.py | 17 +++++++++-------- worlds/sm64ex/__init__.py | 5 ++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/worlds/sm64ex/Items.py b/worlds/sm64ex/Items.py index 8a2de5950218..0b5ad16adef2 100644 --- a/worlds/sm64ex/Items.py +++ b/worlds/sm64ex/Items.py @@ -10,16 +10,17 @@ class SM64Item(Item): class SM64ItemData(NamedTuple): code: int | None = None classification: ItemClassification = ItemClassification.filler + description: str = "" generic_item_data_table: dict[str, SM64ItemData] = { - "Power Star": SM64ItemData(sm64ex_base_id + 0, ItemClassification.progression_skip_balancing), - "Basement Key": SM64ItemData(sm64ex_base_id + 178, ItemClassification.progression), - "Second Floor Key": SM64ItemData(sm64ex_base_id + 179, ItemClassification.progression), - "Progressive Key": SM64ItemData(sm64ex_base_id + 180, ItemClassification.progression), - "Wing Cap": SM64ItemData(sm64ex_base_id + 181, ItemClassification.progression), - "Metal Cap": SM64ItemData(sm64ex_base_id + 182, ItemClassification.progression), - "Vanish Cap": SM64ItemData(sm64ex_base_id + 183, ItemClassification.progression), - "1Up Mushroom": SM64ItemData(sm64ex_base_id + 184, ItemClassification.filler), + "Power Star": SM64ItemData(sm64ex_base_id + 0, ItemClassification.progression_skip_balancing, "Collectable reward for course objectives and secrets. Needed to unlock parts of the castle."), + "Basement Key": SM64ItemData(sm64ex_base_id + 178, ItemClassification.progression, "The key to the basement."), + "Second Floor Key": SM64ItemData(sm64ex_base_id + 179, ItemClassification.progression, "The key to the second floor. Also necessary to reach the third floor."), + "Progressive Key": SM64ItemData(sm64ex_base_id + 180, ItemClassification.progression, "A key to another floor of the castle."), + "Wing Cap": SM64ItemData(sm64ex_base_id + 181, ItemClassification.progression, "A powerup for Mario. Grants flight."), + "Metal Cap": SM64ItemData(sm64ex_base_id + 182, ItemClassification.progression, "A powerup for Mario. Grants passage through certain walls."), + "Vanish Cap": SM64ItemData(sm64ex_base_id + 183, ItemClassification.progression, "A powerup for Mario. Grants increased strength and weight."), + "1Up Mushroom": SM64ItemData(sm64ex_base_id + 184, ItemClassification.filler, "An extra life."), } action_item_data_table: dict[str, SM64ItemData] = { diff --git a/worlds/sm64ex/__init__.py b/worlds/sm64ex/__init__.py index eef3c72d58d5..d7eca0375eca 100644 --- a/worlds/sm64ex/__init__.py +++ b/worlds/sm64ex/__init__.py @@ -10,6 +10,8 @@ from ..AutoWorld import World, WebWorld +item_descriptions = {name: data.description for name, data in item_data_table.items()} + class SM64Web(WebWorld): tutorials = [Tutorial( "Multiworld Setup Guide", @@ -21,7 +23,7 @@ class SM64Web(WebWorld): )] option_groups = sm64_options_groups - + item_descriptions = item_descriptions class SM64World(World): """ @@ -42,6 +44,7 @@ class SM64World(World): area_connections: typing.Dict[int, int] options_dataclass = SM64Options + item_descriptions = item_descriptions number_of_stars: int move_rando_bitvec: int