KH2: Fixing Start Inventory bug, limiting CustomItemPool keys, fixing two typos (#3444)

* Fixing inclusion checking error

* Fixing typo, limiting valid keys to valid keys

* Adding space

* Add period
This commit is contained in:
Exempt-Medic 2024-06-04 15:20:37 -04:00 committed by GitHub
parent 16ae8449f4
commit c4572964ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -430,13 +430,13 @@ class KH2World(World):
"""
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