Skip to content

Commit

Permalink
add vanilla handling and effectively disable default handling
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Dec 5, 2024
1 parent ae19513 commit a97afe2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions worlds/hk/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ class PlandoCharmCosts(OptionDict):
def __init__(self, value):
self.value = {}
for key, data in value.items():
if isinstance(data, str):
if data.lower() == "vanilla" and key in self.valid_keys:
self.value[key] = vanilla_costs[charm_names.index(key)]
continue
elif data.lower() == "default":
# default is too easily confused with vanilla but actually 0
self.value[key] = data
continue
try:
self.value[key] = CharmCost.from_any(data).value
except ValueError as ex:
Expand Down

0 comments on commit a97afe2

Please sign in to comment.