From 1270640619065dc738812936a045bab5c3a2c69c Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 8 Jan 2021 15:07:35 +0100 Subject: [PATCH] Change hint whenever the T key is pressed or not --- squirrelbattle/display/statsdisplay.py | 12 ++++++---- .../locale/de/LC_MESSAGES/squirrelbattle.po | 22 ++++++++++------- .../locale/es/LC_MESSAGES/squirrelbattle.po | 22 ++++++++++------- .../locale/fr/LC_MESSAGES/squirrelbattle.po | 24 +++++++++++-------- 4 files changed, 47 insertions(+), 33 deletions(-) diff --git a/squirrelbattle/display/statsdisplay.py b/squirrelbattle/display/statsdisplay.py index cba8c06..91b85b9 100644 --- a/squirrelbattle/display/statsdisplay.py +++ b/squirrelbattle/display/statsdisplay.py @@ -15,16 +15,16 @@ class StatsDisplay(Display): """ A class to handle the display of the stats of the player. """ + game: Game player: Player - settings: Settings def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.pad = self.newpad(self.rows, self.cols) def update(self, game: Game) -> None: + self.game = game self.player = game.player - self.settings = game.settings def update_pad(self) -> None: string2 = f"{_(self.player.name).capitalize()} " \ @@ -83,7 +83,7 @@ class StatsDisplay(Display): if self.player.map.tiles[self.player.y][self.player.x].is_ladder(): msg = _("Use {key} to use the ladder") \ - .format(key=self.settings.KEY_LADDER.upper()) + .format(key=self.game.settings.KEY_LADDER.upper()) self.addstr(self.pad, self.height - 2, 0, msg, italic=True, reverse=True) @@ -91,8 +91,10 @@ class StatsDisplay(Display): for entity in self.player.map.find_entities(FriendlyEntity): if entity.y == self.player.y + dy \ and entity.x == self.player.x + dx: - msg = _("Use {key} then move to talk to the entity") \ - .format(key=self.settings.KEY_CHAT.upper()) + msg = _("Move to the friendly entity to talk to it") \ + if self.game.waiting_for_friendly_key else \ + _("Use {key} then move to talk to the entity") \ + .format(key=self.game.settings.KEY_CHAT.upper()) self.addstr(self.pad, self.height - 1, 0, msg, italic=True, reverse=True) diff --git a/squirrelbattle/locale/de/LC_MESSAGES/squirrelbattle.po b/squirrelbattle/locale/de/LC_MESSAGES/squirrelbattle.po index 7bf5e67..e55e2a1 100644 --- a/squirrelbattle/locale/de/LC_MESSAGES/squirrelbattle.po +++ b/squirrelbattle/locale/de/LC_MESSAGES/squirrelbattle.po @@ -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-08 14:59+0100\n" +"POT-Creation-Date: 2021-01-08 15:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,36 +49,40 @@ msgstr "BESTAND" msgid "STALL" msgstr "STAND" -#: squirrelbattle/display/statsdisplay.py:44 +#: squirrelbattle/display/statsdisplay.py:46 msgid "Inventory:" msgstr "Bestand:" -#: squirrelbattle/display/statsdisplay.py:61 +#: squirrelbattle/display/statsdisplay.py:63 msgid "Equipped main:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:65 +#: squirrelbattle/display/statsdisplay.py:67 msgid "Equipped secondary:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:70 +#: squirrelbattle/display/statsdisplay.py:72 msgid "Equipped chestplate:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:74 +#: squirrelbattle/display/statsdisplay.py:76 msgid "Equipped helmet:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:81 +#: squirrelbattle/display/statsdisplay.py:83 msgid "YOU ARE DEAD" msgstr "SIE WURDEN GESTORBEN" -#: squirrelbattle/display/statsdisplay.py:85 +#: squirrelbattle/display/statsdisplay.py:87 #, python-brace-format msgid "Use {key} to use the ladder" msgstr "" -#: squirrelbattle/display/statsdisplay.py:94 +#: squirrelbattle/display/statsdisplay.py:96 +msgid "Move to the friendly entity to talk to it" +msgstr "" + +#: squirrelbattle/display/statsdisplay.py:98 #, python-brace-format msgid "Use {key} then move to talk to the entity" msgstr "" diff --git a/squirrelbattle/locale/es/LC_MESSAGES/squirrelbattle.po b/squirrelbattle/locale/es/LC_MESSAGES/squirrelbattle.po index 9ac1e4e..aaa59cc 100644 --- a/squirrelbattle/locale/es/LC_MESSAGES/squirrelbattle.po +++ b/squirrelbattle/locale/es/LC_MESSAGES/squirrelbattle.po @@ -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-08 14:59+0100\n" +"POT-Creation-Date: 2021-01-08 15:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,36 +49,40 @@ msgstr "INVENTORIO" msgid "STALL" msgstr "PUESTO" -#: squirrelbattle/display/statsdisplay.py:44 +#: squirrelbattle/display/statsdisplay.py:46 msgid "Inventory:" msgstr "Inventorio :" -#: squirrelbattle/display/statsdisplay.py:61 +#: squirrelbattle/display/statsdisplay.py:63 msgid "Equipped main:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:65 +#: squirrelbattle/display/statsdisplay.py:67 msgid "Equipped secondary:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:70 +#: squirrelbattle/display/statsdisplay.py:72 msgid "Equipped chestplate:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:74 +#: squirrelbattle/display/statsdisplay.py:76 msgid "Equipped helmet:" msgstr "" -#: squirrelbattle/display/statsdisplay.py:81 +#: squirrelbattle/display/statsdisplay.py:83 msgid "YOU ARE DEAD" msgstr "ERES MUERTO" -#: squirrelbattle/display/statsdisplay.py:85 +#: squirrelbattle/display/statsdisplay.py:87 #, python-brace-format msgid "Use {key} to use the ladder" msgstr "" -#: squirrelbattle/display/statsdisplay.py:94 +#: squirrelbattle/display/statsdisplay.py:96 +msgid "Move to the friendly entity to talk to it" +msgstr "" + +#: squirrelbattle/display/statsdisplay.py:98 #, python-brace-format msgid "Use {key} then move to talk to the entity" msgstr "" diff --git a/squirrelbattle/locale/fr/LC_MESSAGES/squirrelbattle.po b/squirrelbattle/locale/fr/LC_MESSAGES/squirrelbattle.po index c3c4864..f55fa7e 100644 --- a/squirrelbattle/locale/fr/LC_MESSAGES/squirrelbattle.po +++ b/squirrelbattle/locale/fr/LC_MESSAGES/squirrelbattle.po @@ -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-08 14:59+0100\n" +"POT-Creation-Date: 2021-01-08 15:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,39 +43,43 @@ msgstr "INVENTAIRE" msgid "STALL" msgstr "STAND" -#: squirrelbattle/display/statsdisplay.py:44 +#: squirrelbattle/display/statsdisplay.py:46 msgid "Inventory:" msgstr "Inventaire :" -#: squirrelbattle/display/statsdisplay.py:61 +#: squirrelbattle/display/statsdisplay.py:63 msgid "Equipped main:" msgstr "Équipement principal :" -#: squirrelbattle/display/statsdisplay.py:65 +#: squirrelbattle/display/statsdisplay.py:67 msgid "Equipped secondary:" msgstr "Équipement secondaire :" -#: squirrelbattle/display/statsdisplay.py:70 +#: squirrelbattle/display/statsdisplay.py:72 msgid "Equipped chestplate:" msgstr "Plastron équipé :" -#: squirrelbattle/display/statsdisplay.py:74 +#: squirrelbattle/display/statsdisplay.py:76 msgid "Equipped helmet:" msgstr "Casque équipé :" -#: squirrelbattle/display/statsdisplay.py:81 +#: squirrelbattle/display/statsdisplay.py:83 msgid "YOU ARE DEAD" msgstr "VOUS ÊTES MORT" -#: squirrelbattle/display/statsdisplay.py:85 +#: squirrelbattle/display/statsdisplay.py:87 #, python-brace-format msgid "Use {key} to use the ladder" msgstr "Appuyez sur {key} pour utiliser l'échelle" -#: squirrelbattle/display/statsdisplay.py:94 +#: squirrelbattle/display/statsdisplay.py:96 +msgid "Move to the friendly entity to talk to it" +msgstr "Avancez vers l'entité pour lui parler" + +#: squirrelbattle/display/statsdisplay.py:98 #, python-brace-format msgid "Use {key} then move to talk to the entity" -msgstr "Appuyez sur {key} puis déplacez-vous pour parler à l'entité" +msgstr "Appuyez sur {key} puis déplacez-vous pour parler" #. TODO #: squirrelbattle/entities/friendly.py:33