Add log message when the player switches floor

This commit is contained in:
Yohann D'ANELLO
2021-01-06 15:55:44 +01:00
parent 4cd4bc9005
commit a48e6325fe
4 changed files with 70 additions and 33 deletions

View File

@ -178,6 +178,9 @@ class Game:
new_map.add_entity(self.player)
if move_down:
self.player.move(self.map.start_y, self.map.start_x)
self.logs.add_message(
_("The player climbs down to the floor {floor}.")
.format(floor=-self.map_index))
else:
# Find the ladder of the end of the game
ladder_y, ladder_x = -1, -1
@ -188,6 +191,10 @@ class Game:
ladder_y, ladder_x = y, x
break
self.player.move(ladder_y, ladder_x)
self.logs.add_message(
_("The player climbs up the floor {floor}.")
.format(floor=-self.map_index))
self.display_actions(DisplayActions.UPDATE)
def handle_friendly_entity_chat(self, key: KeyValues) -> None: