Skip to content

Commit

Permalink
KH2: Fixing Start Inventory bug, limiting CustomItemPool keys, fixing…
Browse files Browse the repository at this point in the history
… two typos (#3444)

* Fixing inclusion checking error

* Fixing typo, limiting valid keys to valid keys

* Adding space

* Add period
  • Loading branch information
Exempt-Medic authored Jun 4, 2024
1 parent 16ae844 commit c457296
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions worlds/kh2/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ class CorSkipToggle(Toggle):
Full Cor Skip is also affected by this Toggle.
"""
display_name = "CoR Skip Toggle."
display_name = "CoR Skip Toggle"
default = False


class CustomItemPoolQuantity(ItemDict):
"""Add more of an item into the itempool. Note: You cannot take out items from the pool."""
display_name = "Custom Item Pool"
verify_item_name = True
valid_keys = default_itempool_option.keys()
default = default_itempool_option


Expand Down
6 changes: 3 additions & 3 deletions worlds/kh2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,13 @@ def starting_invo_verify(self):
"""
for item, value in self.options.start_inventory.value.items():
if item in ActionAbility_Table \
or item in SupportAbility_Table or exclusion_item_table["StatUps"] \
or item in SupportAbility_Table or item in exclusion_item_table["StatUps"] \
or item in DonaldAbility_Table or item in GoofyAbility_Table:
# cannot have more than the quantity for abilties
if value > item_dictionary_table[item].quantity:
logging.info(
f"{self.multiworld.get_file_safe_player_name(self.player)} cannot have more than {item_dictionary_table[item].quantity} of {item}"
f"Changing the amount to the max amount")
f"{self.multiworld.get_file_safe_player_name(self.player)} cannot have more than {item_dictionary_table[item].quantity} of {item}."
f" Changing the amount to the max amount")
value = item_dictionary_table[item].quantity
self.item_quantity_dict[item] -= value

Expand Down

0 comments on commit c457296

Please sign in to comment.