Skip to content

Commit

Permalink
bonus item descriptions since we can also add stuff for webworld easily
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwhite committed Dec 5, 2024
1 parent 5b1c03d commit b075405
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
17 changes: 9 additions & 8 deletions worlds/sm64ex/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down
5 changes: 4 additions & 1 deletion worlds/sm64ex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -21,7 +23,7 @@ class SM64Web(WebWorld):
)]

option_groups = sm64_options_groups

item_descriptions = item_descriptions

class SM64World(World):
"""
Expand All @@ -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
Expand Down

0 comments on commit b075405

Please sign in to comment.