Factorio: add starting_items

This commit is contained in:
Fabian Dill
2021-05-09 17:46:26 +02:00
parent 9c3d12dc55
commit c55983af5f
5 changed files with 60 additions and 10 deletions

View File

@@ -536,7 +536,10 @@ def roll_settings(weights: dict, plando_options: typing.Set[str] = frozenset(("b
elif ret.game == "Factorio":
for option_name, option in Options.factorio_options.items():
if option_name in weights:
setattr(ret, option_name, option.from_any(get_choice(option_name, weights)))
if issubclass(option, Options.OptionDict): # get_choice should probably land in the Option class
setattr(ret, option_name, option.from_any(weights[option_name]))
else:
setattr(ret, option_name, option.from_any(get_choice(option_name, weights)))
else:
setattr(ret, option_name, option(option.default))
elif ret.game == "Minecraft":