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 = {}
|
||||
for option, player_settings in vars(erargs).items():
|
||||
if type(player_settings) == dict:
|
||||
if len(set(player_settings.values())) > 1:
|
||||
important[option] = {player: value for player, value in player_settings.items() if
|
||||
player <= args.yaml_output}
|
||||
elif len(set(player_settings.values())) > 0:
|
||||
important[option] = player_settings[1]
|
||||
else:
|
||||
logging.debug(f"No player settings defined for option '{option}'")
|
||||
if all(type(value) != list for value in player_settings.values()):
|
||||
if len(frozenset(player_settings.values())) > 1:
|
||||
important[option] = {player: value for player, value in player_settings.items() if
|
||||
player <= args.yaml_output}
|
||||
elif len(frozenset(player_settings.values())) > 0:
|
||||
important[option] = player_settings[1]
|
||||
else:
|
||||
logging.debug(f"No player settings defined for option '{option}'")
|
||||
|
||||
else:
|
||||
if player_settings != "": # is not empty name
|
||||
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):
|
||||
if world.dark_room_logic[player] == "lamp":
|
||||
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:
|
||||
add_rule(spot, lambda state: state.has('Lamp', player) or state.has('Fire Rod', player))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue