HK: better error messaging for charm plando (#3907)

This commit is contained in:
qwint
2024-11-29 14:43:33 -05:00
committed by GitHub
parent ed4e44b994
commit 1454bacfdd

View File

@@ -300,7 +300,7 @@ class PlandoCharmCosts(OptionDict):
display_name = "Charm Notch Cost Plando"
valid_keys = frozenset(charm_names)
schema = Schema({
Optional(name): And(int, lambda n: 6 >= n >= 0) for name in charm_names
Optional(name): And(int, lambda n: 6 >= n >= 0, error="Charm costs must be integers in the range 0-6.") for name in charm_names
})
def get_costs(self, charm_costs: typing.List[int]) -> typing.List[int]: