Move logging hero movement into the if block where it actually does the move
This commit is contained in:
parent
00462f6005
commit
c2c67ae9ef
1 changed files with 1 additions and 1 deletions
|
@ -41,6 +41,6 @@ class MovePlayerAction(Action):
|
|||
position_is_walkable = engine.map.tile_is_walkable(new_player_position)
|
||||
overlaps_another_entity = any(new_player_position == ent.position for ent in engine.entities if ent is not entity)
|
||||
|
||||
LOG.debug(f'Attempting to move player to {new_player_position} (in_bounds:{position_is_in_bounds} walkable:{position_is_walkable} overlaps:{overlaps_another_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})')
|
||||
entity.position = new_player_position
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue