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
5 changes: 3 additions & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,13 @@ def create_items(self):
for name in configured_item_names.values():
if name == "__Victory__": continue
if name == filler_item_name: continue # intentionally using the Game.py filler_item_name here because it's a non-Items item
if item.get("trap"):
traps.append(name)

item = self.item_name_to_item[name]
item_count = int(item.get("count", 1))

if item.get("trap"):
traps.append(name)

if "category" in item:
if not is_item_enabled(self.multiworld, self.player, item):
item_count = 0
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/World.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def after_create_regions(world: World, multiworld: MultiWorld, player: int):
# {"Item Name": {"progression": 2, "useful": 1}} <- This will create 3 items, with 2 classified as progression and 1 as useful
# {"Item Name": {0b0110: 5}} <- If you know the special flag for the item classes, you can also define non-standard options. This setup
# will create 5 items that are the "useful trap" class
def before_create_items_all(item_config: dict[str: int|dict], world: World, multiworld: Multiworld, player: int) -> dict[str: int|dict]:
def before_create_items_all(item_config: dict[str: int|dict], world: World, multiworld: MultiWorld, player: int) -> dict[str: int|dict]:
return item_config

# The item pool before starting items are processed, in case you want to see the raw item pool at that stage
Expand Down Expand Up @@ -151,8 +151,8 @@ def before_write_spoiler(world: World, multiworld: MultiWorld, spoiler_handle) -

# This is called when you want to add information to the hint text
def before_extend_hint_information(hint_data: dict[int, dict[int, str]], world: World, multiworld: MultiWorld, player: int) -> None:
### Example way to use this hook:

### Example way to use this hook:
# if player not in hint_data:
# hint_data.update({player: {}})
# for location in multiworld.get_locations(player):
Expand All @@ -162,7 +162,7 @@ def before_extend_hint_information(hint_data: dict[int, dict[int, str]], world:
# use this section to calculate the hint string
#
# hint_data[player][location.address] = hint_string

pass

def after_extend_hint_information(hint_data: dict[int, dict[int, str]], world: World, multiworld: MultiWorld, player: int) -> None:
Expand Down