Clean up the logging; use % formats instead of f-strings

This commit is contained in:
Eryn Wells 2022-05-07 08:53:58 -07:00
parent a1c1609908
commit 16b4b64099
3 changed files with 14 additions and 16 deletions

View file

@ -42,5 +42,9 @@ class MovePlayerAction(Action):
overlaps_another_entity = any(new_player_position == ent.position for ent in engine.entities if ent is not entity)
if position_is_in_bounds and position_is_walkable and not overlaps_another_entity:
LOG.info(f'Moving hero to {new_player_position} (in_bounds:{position_is_in_bounds} walkable:{position_is_walkable} overlaps:{overlaps_another_entity})')
LOG.info('Moving hero to %s (in_bounds:%s walkable:%s overlaps:%s)',
new_player_position,
position_is_in_bounds,
position_is_walkable,
overlaps_another_entity)
entity.position = new_player_position