Add a hint to tell the user how to talk to friendly entities
This commit is contained in:
		@@ -5,6 +5,7 @@ import curses
 | 
			
		||||
 | 
			
		||||
from ..entities.player import Player
 | 
			
		||||
from ..game import Game
 | 
			
		||||
from ..interfaces import FriendlyEntity
 | 
			
		||||
from ..settings import Settings
 | 
			
		||||
from ..translations import gettext as _
 | 
			
		||||
from .display import Display
 | 
			
		||||
@@ -82,10 +83,19 @@ 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)
 | 
			
		||||
                .format(key=self.settings.KEY_LADDER.upper())
 | 
			
		||||
            self.addstr(self.pad, self.height - 2, 0, msg,
 | 
			
		||||
                        italic=True, reverse=True)
 | 
			
		||||
 | 
			
		||||
        for dy, dx in [(-1, 0), (0, -1), (0, 1), (1, 0)]:
 | 
			
		||||
            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())
 | 
			
		||||
                    self.addstr(self.pad, self.height - 1, 0, msg,
 | 
			
		||||
                                italic=True, reverse=True)
 | 
			
		||||
 | 
			
		||||
    def display(self) -> None:
 | 
			
		||||
        self.pad.erase()
 | 
			
		||||
        self.update_pad()
 | 
			
		||||
 
 | 
			
		||||
@@ -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:47+0100\n"
 | 
			
		||||
"POT-Creation-Date: 2021-01-08 14:59+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"
 | 
			
		||||
@@ -49,35 +49,40 @@ msgstr "BESTAND"
 | 
			
		||||
msgid "STALL"
 | 
			
		||||
msgstr "STAND"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:43
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:44
 | 
			
		||||
msgid "Inventory:"
 | 
			
		||||
msgstr "Bestand:"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:60
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:61
 | 
			
		||||
msgid "Equipped main:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:64
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:65
 | 
			
		||||
msgid "Equipped secondary:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:69
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:70
 | 
			
		||||
msgid "Equipped chestplate:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:73
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:74
 | 
			
		||||
msgid "Equipped helmet:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:80
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:81
 | 
			
		||||
msgid "YOU ARE DEAD"
 | 
			
		||||
msgstr "SIE WURDEN GESTORBEN"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:84
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:85
 | 
			
		||||
#, python-brace-format
 | 
			
		||||
msgid "Use {key} to use the ladder"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:94
 | 
			
		||||
#, python-brace-format
 | 
			
		||||
msgid "Use {key} then move to talk to the entity"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#. TODO
 | 
			
		||||
#: squirrelbattle/entities/friendly.py:33
 | 
			
		||||
msgid "I don't sell any squirrel"
 | 
			
		||||
 
 | 
			
		||||
@@ -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:47+0100\n"
 | 
			
		||||
"POT-Creation-Date: 2021-01-08 14:59+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"
 | 
			
		||||
@@ -49,35 +49,40 @@ msgstr "INVENTORIO"
 | 
			
		||||
msgid "STALL"
 | 
			
		||||
msgstr "PUESTO"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:43
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:44
 | 
			
		||||
msgid "Inventory:"
 | 
			
		||||
msgstr "Inventorio :"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:60
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:61
 | 
			
		||||
msgid "Equipped main:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:64
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:65
 | 
			
		||||
msgid "Equipped secondary:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:69
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:70
 | 
			
		||||
msgid "Equipped chestplate:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:73
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:74
 | 
			
		||||
msgid "Equipped helmet:"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:80
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:81
 | 
			
		||||
msgid "YOU ARE DEAD"
 | 
			
		||||
msgstr "ERES MUERTO"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:84
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:85
 | 
			
		||||
#, python-brace-format
 | 
			
		||||
msgid "Use {key} to use the ladder"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:94
 | 
			
		||||
#, python-brace-format
 | 
			
		||||
msgid "Use {key} then move to talk to the entity"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/entities/friendly.py:33
 | 
			
		||||
msgid "I don't sell any squirrel"
 | 
			
		||||
msgstr "No vendo ninguna ardilla"
 | 
			
		||||
 
 | 
			
		||||
@@ -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:47+0100\n"
 | 
			
		||||
"POT-Creation-Date: 2021-01-08 14:59+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"
 | 
			
		||||
@@ -43,35 +43,40 @@ msgstr "INVENTAIRE"
 | 
			
		||||
msgid "STALL"
 | 
			
		||||
msgstr "STAND"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:43
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:44
 | 
			
		||||
msgid "Inventory:"
 | 
			
		||||
msgstr "Inventaire :"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:60
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:61
 | 
			
		||||
msgid "Equipped main:"
 | 
			
		||||
msgstr "Équipement principal :"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:64
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:65
 | 
			
		||||
msgid "Equipped secondary:"
 | 
			
		||||
msgstr "Équipement secondaire :"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:69
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:70
 | 
			
		||||
msgid "Equipped chestplate:"
 | 
			
		||||
msgstr "Plastron équipé :"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:73
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:74
 | 
			
		||||
msgid "Equipped helmet:"
 | 
			
		||||
msgstr "Casque équipé :"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:80
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:81
 | 
			
		||||
msgid "YOU ARE DEAD"
 | 
			
		||||
msgstr "VOUS ÊTES MORT"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:84
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:85
 | 
			
		||||
#, python-brace-format
 | 
			
		||||
msgid "Use {key} to use the ladder"
 | 
			
		||||
msgstr "Appuyez sur {key} pour utiliser l'échelle"
 | 
			
		||||
 | 
			
		||||
#: squirrelbattle/display/statsdisplay.py:94
 | 
			
		||||
#, 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é"
 | 
			
		||||
 | 
			
		||||
#. TODO
 | 
			
		||||
#: squirrelbattle/entities/friendly.py:33
 | 
			
		||||
msgid "I don't sell any squirrel"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user