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
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
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:

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-06 14:53+0100\n"
"POT-Creation-Date: 2021-01-06 15:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -25,11 +25,11 @@ msgstr "BESTAND"
msgid "STALL"
msgstr "STAND"
#: squirrelbattle/display/statsdisplay.py:34
#: squirrelbattle/display/statsdisplay.py:36
msgid "Inventory:"
msgstr "Bestand:"
#: squirrelbattle/display/statsdisplay.py:53
#: squirrelbattle/display/statsdisplay.py:55
msgid "YOU ARE DEAD"
msgstr "SIE WURDEN GESTORBEN"
@ -58,11 +58,21 @@ msgstr "Die Bombe explodiert."
msgid "{player} exchanged its body with {entity}."
msgstr "{player} täuscht seinem Körper mit {entity} aus."
#: squirrelbattle/game.py:277 squirrelbattle/tests/game_test.py:592
#: squirrelbattle/game.py:182
#, python-brace-format
msgid "The player climbs down to the floor {floor}."
msgstr "Der Spieler klettert auf dem Stock {floor} hinunter."
#: squirrelbattle/game.py:195
#, python-brace-format
msgid "The player climbs up the floor {floor}."
msgstr "Der Spieler klettert auf dem Stock {floor} hinoben."
#: squirrelbattle/game.py:285 squirrelbattle/tests/game_test.py:592
msgid "The buyer does not have enough money"
msgstr "Der Kaufer hat nicht genug Geld"
#: squirrelbattle/game.py:320
#: squirrelbattle/game.py:328
msgid ""
"Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted."
@ -70,7 +80,7 @@ msgstr ""
"In Ihrer Speicherdatei fehlen einige Schlüssel.\n"
"Ihre Speicherung scheint korrupt zu sein. Es wird gelöscht."
#: squirrelbattle/game.py:328
#: squirrelbattle/game.py:336
msgid ""
"No player was found on this map!\n"
"Maybe you died?"
@ -78,7 +88,7 @@ msgstr ""
"Auf dieser Karte wurde kein Spieler gefunden!\n"
"Vielleicht sind Sie gestorben?"
#: squirrelbattle/game.py:348
#: squirrelbattle/game.py:356
msgid ""
"The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted."
@ -86,22 +96,22 @@ msgstr ""
"Die JSON-Datei ist nicht korrekt.\n"
"Ihre Speicherung scheint korrumpiert. Sie wurde gelöscht."
#: squirrelbattle/interfaces.py:451
#: squirrelbattle/interfaces.py:453
#, python-brace-format
msgid "{name} hits {opponent}."
msgstr "{name} schlägt {opponent}."
#: squirrelbattle/interfaces.py:463
#: squirrelbattle/interfaces.py:465
#, python-brace-format
msgid "{name} takes {amount} damage."
msgstr "{name} nimmt {amount} Schadenspunkte."
#: squirrelbattle/interfaces.py:465
#: squirrelbattle/interfaces.py:467
#, python-brace-format
msgid "{name} dies."
msgstr "{name} stirbt."
#: squirrelbattle/interfaces.py:499
#: squirrelbattle/interfaces.py:501
#, python-brace-format
msgid "{entity} said: {message}"
msgstr "{entity} hat gesagt: {message}"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-06 14:53+0100\n"
"POT-Creation-Date: 2021-01-06 15:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -25,11 +25,11 @@ msgstr "INVENTORIO"
msgid "STALL"
msgstr "PUESTO"
#: squirrelbattle/display/statsdisplay.py:34
#: squirrelbattle/display/statsdisplay.py:36
msgid "Inventory:"
msgstr "Inventorio :"
#: squirrelbattle/display/statsdisplay.py:53
#: squirrelbattle/display/statsdisplay.py:55
msgid "YOU ARE DEAD"
msgstr "ERES MUERTO"
@ -57,11 +57,21 @@ msgstr "La bomba está explotando."
msgid "{player} exchanged its body with {entity}."
msgstr "{player} intercambió su cuerpo con {entity}."
#: squirrelbattle/game.py:277 squirrelbattle/tests/game_test.py:592
#: squirrelbattle/game.py:182
#, python-brace-format
msgid "The player climbs down to the floor {floor}."
msgstr ""
#: squirrelbattle/game.py:195
#, python-brace-format
msgid "The player climbs up the floor {floor}."
msgstr ""
#: squirrelbattle/game.py:285 squirrelbattle/tests/game_test.py:592
msgid "The buyer does not have enough money"
msgstr "El comprador no tiene suficiente dinero"
#: squirrelbattle/game.py:320
#: squirrelbattle/game.py:328
msgid ""
"Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted."
@ -69,7 +79,7 @@ msgstr ""
"Algunas claves faltan en su archivo de guarda.\n"
"Su guarda parece a ser corruptido. Fue eliminado."
#: squirrelbattle/game.py:328
#: squirrelbattle/game.py:336
msgid ""
"No player was found on this map!\n"
"Maybe you died?"
@ -77,7 +87,7 @@ msgstr ""
"No jugador encontrado sobre la carta !\n"
"¿ Quizas murió ?"
#: squirrelbattle/game.py:348
#: squirrelbattle/game.py:356
msgid ""
"The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted."
@ -85,22 +95,22 @@ msgstr ""
"El JSON archivo no es correcto.\n"
"Su guarda parece corrupta. Fue eliminada."
#: squirrelbattle/interfaces.py:451
#: squirrelbattle/interfaces.py:453
#, python-brace-format
msgid "{name} hits {opponent}."
msgstr "{name} golpea a {opponent}."
#: squirrelbattle/interfaces.py:463
#: squirrelbattle/interfaces.py:465
#, python-brace-format
msgid "{name} takes {amount} damage."
msgstr "{name} recibe {amount} daño."
#: squirrelbattle/interfaces.py:465
#: squirrelbattle/interfaces.py:467
#, python-brace-format
msgid "{name} dies."
msgstr "{name} se muere."
#: squirrelbattle/interfaces.py:499
#: squirrelbattle/interfaces.py:501
#, python-brace-format
msgid "{entity} said: {message}"
msgstr "{entity} dijo : {message}"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-06 14:53+0100\n"
"POT-Creation-Date: 2021-01-06 15:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -25,11 +25,11 @@ msgstr "INVENTAIRE"
msgid "STALL"
msgstr "STAND"
#: squirrelbattle/display/statsdisplay.py:34
#: squirrelbattle/display/statsdisplay.py:36
msgid "Inventory:"
msgstr "Inventaire :"
#: squirrelbattle/display/statsdisplay.py:53
#: squirrelbattle/display/statsdisplay.py:55
msgid "YOU ARE DEAD"
msgstr "VOUS ÊTES MORT"
@ -58,11 +58,21 @@ msgstr "La bombe explose."
msgid "{player} exchanged its body with {entity}."
msgstr "{player} a échangé son corps avec {entity}."
#: squirrelbattle/game.py:277 squirrelbattle/tests/game_test.py:592
#: squirrelbattle/game.py:182
#, python-brace-format
msgid "The player climbs down to the floor {floor}."
msgstr "Le joueur descend à l'étage {floor}."
#: squirrelbattle/game.py:195
#, python-brace-format
msgid "The player climbs up the floor {floor}."
msgstr "Le joueur monte à l'étage {floor}."
#: squirrelbattle/game.py:285 squirrelbattle/tests/game_test.py:592
msgid "The buyer does not have enough money"
msgstr "L'acheteur n'a pas assez d'argent"
#: squirrelbattle/game.py:320
#: squirrelbattle/game.py:328
msgid ""
"Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted."
@ -70,7 +80,7 @@ msgstr ""
"Certaines clés de votre ficher de sauvegarde sont manquantes.\n"
"Votre sauvegarde semble corrompue. Elle a été supprimée."
#: squirrelbattle/game.py:328
#: squirrelbattle/game.py:336
msgid ""
"No player was found on this map!\n"
"Maybe you died?"
@ -78,7 +88,7 @@ msgstr ""
"Aucun joueur n'a été trouvé sur la carte !\n"
"Peut-être êtes-vous mort ?"
#: squirrelbattle/game.py:348
#: squirrelbattle/game.py:356
msgid ""
"The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted."
@ -86,22 +96,22 @@ msgstr ""
"Le fichier JSON de sauvegarde est incorrect.\n"
"Votre sauvegarde semble corrompue. Elle a été supprimée."
#: squirrelbattle/interfaces.py:451
#: squirrelbattle/interfaces.py:453
#, python-brace-format
msgid "{name} hits {opponent}."
msgstr "{name} frappe {opponent}."
#: squirrelbattle/interfaces.py:463
#: squirrelbattle/interfaces.py:465
#, python-brace-format
msgid "{name} takes {amount} damage."
msgstr "{name} prend {amount} points de dégât."
#: squirrelbattle/interfaces.py:465
#: squirrelbattle/interfaces.py:467
#, python-brace-format
msgid "{name} dies."
msgstr "{name} meurt."
#: squirrelbattle/interfaces.py:499
#: squirrelbattle/interfaces.py:501
#, python-brace-format
msgid "{entity} said: {message}"
msgstr "{entity} a dit : {message}"