Factorio: prevent invalid starting items count (#4658)

This commit is contained in:
Fabian Dill
2025-02-17 18:58:38 +01:00
committed by GitHub
parent d744e086ef
commit 15bde56551

View File

@@ -235,6 +235,12 @@ class FactorioStartItems(OptionDict):
"""Mapping of Factorio internal item-name to amount granted on start."""
display_name = "Starting Items"
default = {"burner-mining-drill": 4, "stone-furnace": 4, "raw-fish": 50}
schema = Schema(
{
str: And(int, lambda n: n > 0,
error="amount of starting items has to be a positive integer"),
}
)
class FactorioFreeSampleBlacklist(OptionSet):