Fix sprite array crashing yaml_output
Fix "Torches" toggle misname
This commit is contained in:
parent
b5d91af752
commit
0157294383
16
Mystery.py
16
Mystery.py
|
@ -189,13 +189,15 @@ def main(args=None, callback=ERmain):
|
||||||
important = {}
|
important = {}
|
||||||
for option, player_settings in vars(erargs).items():
|
for option, player_settings in vars(erargs).items():
|
||||||
if type(player_settings) == dict:
|
if type(player_settings) == dict:
|
||||||
if len(set(player_settings.values())) > 1:
|
if all(type(value) != list for value in player_settings.values()):
|
||||||
important[option] = {player: value for player, value in player_settings.items() if
|
if len(frozenset(player_settings.values())) > 1:
|
||||||
player <= args.yaml_output}
|
important[option] = {player: value for player, value in player_settings.items() if
|
||||||
elif len(set(player_settings.values())) > 0:
|
player <= args.yaml_output}
|
||||||
important[option] = player_settings[1]
|
elif len(frozenset(player_settings.values())) > 0:
|
||||||
else:
|
important[option] = player_settings[1]
|
||||||
logging.debug(f"No player settings defined for option '{option}'")
|
else:
|
||||||
|
logging.debug(f"No player settings defined for option '{option}'")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if player_settings != "": # is not empty name
|
if player_settings != "": # is not empty name
|
||||||
important[option] = player_settings
|
important[option] = player_settings
|
||||||
|
|
2
Rules.py
2
Rules.py
|
@ -127,7 +127,7 @@ def add_rule(spot, rule, combine='and'):
|
||||||
def add_lamp_requirement(world: World, spot, player: int, has_accessible_torch: bool = False):
|
def add_lamp_requirement(world: World, spot, player: int, has_accessible_torch: bool = False):
|
||||||
if world.dark_room_logic[player] == "lamp":
|
if world.dark_room_logic[player] == "lamp":
|
||||||
add_rule(spot, lambda state: state.has('Lamp', player))
|
add_rule(spot, lambda state: state.has('Lamp', player))
|
||||||
elif world.dark_room_logic[player] == "torch": # implicitly lamp as well
|
elif world.dark_room_logic[player] == "torches": # implicitly lamp as well
|
||||||
if has_accessible_torch:
|
if has_accessible_torch:
|
||||||
add_rule(spot, lambda state: state.has('Lamp', player) or state.has('Fire Rod', player))
|
add_rule(spot, lambda state: state.has('Lamp', player) or state.has('Fire Rod', player))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue