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 ..entities.player import Player
 | 
				
			||||||
from ..game import Game
 | 
					from ..game import Game
 | 
				
			||||||
 | 
					from ..interfaces import FriendlyEntity
 | 
				
			||||||
from ..settings import Settings
 | 
					from ..settings import Settings
 | 
				
			||||||
from ..translations import gettext as _
 | 
					from ..translations import gettext as _
 | 
				
			||||||
from .display import Display
 | 
					from .display import Display
 | 
				
			||||||
@@ -82,10 +83,19 @@ class StatsDisplay(Display):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if self.player.map.tiles[self.player.y][self.player.x].is_ladder():
 | 
					        if self.player.map.tiles[self.player.y][self.player.x].is_ladder():
 | 
				
			||||||
            msg = _("Use {key} to use the 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,
 | 
					            self.addstr(self.pad, self.height - 2, 0, msg,
 | 
				
			||||||
                        italic=True, reverse=True)
 | 
					                        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:
 | 
					    def display(self) -> None:
 | 
				
			||||||
        self.pad.erase()
 | 
					        self.pad.erase()
 | 
				
			||||||
        self.update_pad()
 | 
					        self.update_pad()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@ msgid ""
 | 
				
			|||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
"Project-Id-Version: squirrelbattle 3.14.1\n"
 | 
					"Project-Id-Version: squirrelbattle 3.14.1\n"
 | 
				
			||||||
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\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"
 | 
					"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
				
			||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
					"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
				
			||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
					"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
				
			||||||
@@ -49,35 +49,40 @@ msgstr "BESTAND"
 | 
				
			|||||||
msgid "STALL"
 | 
					msgid "STALL"
 | 
				
			||||||
msgstr "STAND"
 | 
					msgstr "STAND"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:43
 | 
					#: squirrelbattle/display/statsdisplay.py:44
 | 
				
			||||||
msgid "Inventory:"
 | 
					msgid "Inventory:"
 | 
				
			||||||
msgstr "Bestand:"
 | 
					msgstr "Bestand:"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:60
 | 
					#: squirrelbattle/display/statsdisplay.py:61
 | 
				
			||||||
msgid "Equipped main:"
 | 
					msgid "Equipped main:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:64
 | 
					#: squirrelbattle/display/statsdisplay.py:65
 | 
				
			||||||
msgid "Equipped secondary:"
 | 
					msgid "Equipped secondary:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:69
 | 
					#: squirrelbattle/display/statsdisplay.py:70
 | 
				
			||||||
msgid "Equipped chestplate:"
 | 
					msgid "Equipped chestplate:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:73
 | 
					#: squirrelbattle/display/statsdisplay.py:74
 | 
				
			||||||
msgid "Equipped helmet:"
 | 
					msgid "Equipped helmet:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:80
 | 
					#: squirrelbattle/display/statsdisplay.py:81
 | 
				
			||||||
msgid "YOU ARE DEAD"
 | 
					msgid "YOU ARE DEAD"
 | 
				
			||||||
msgstr "SIE WURDEN GESTORBEN"
 | 
					msgstr "SIE WURDEN GESTORBEN"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:84
 | 
					#: squirrelbattle/display/statsdisplay.py:85
 | 
				
			||||||
#, python-brace-format
 | 
					#, python-brace-format
 | 
				
			||||||
msgid "Use {key} to use the ladder"
 | 
					msgid "Use {key} to use the ladder"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: squirrelbattle/display/statsdisplay.py:94
 | 
				
			||||||
 | 
					#, python-brace-format
 | 
				
			||||||
 | 
					msgid "Use {key} then move to talk to the entity"
 | 
				
			||||||
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#. TODO
 | 
					#. TODO
 | 
				
			||||||
#: squirrelbattle/entities/friendly.py:33
 | 
					#: squirrelbattle/entities/friendly.py:33
 | 
				
			||||||
msgid "I don't sell any squirrel"
 | 
					msgid "I don't sell any squirrel"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@ msgid ""
 | 
				
			|||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
"Project-Id-Version: squirrelbattle 3.14.1\n"
 | 
					"Project-Id-Version: squirrelbattle 3.14.1\n"
 | 
				
			||||||
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\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"
 | 
					"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
				
			||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
					"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
				
			||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
					"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
				
			||||||
@@ -49,35 +49,40 @@ msgstr "INVENTORIO"
 | 
				
			|||||||
msgid "STALL"
 | 
					msgid "STALL"
 | 
				
			||||||
msgstr "PUESTO"
 | 
					msgstr "PUESTO"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:43
 | 
					#: squirrelbattle/display/statsdisplay.py:44
 | 
				
			||||||
msgid "Inventory:"
 | 
					msgid "Inventory:"
 | 
				
			||||||
msgstr "Inventorio :"
 | 
					msgstr "Inventorio :"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:60
 | 
					#: squirrelbattle/display/statsdisplay.py:61
 | 
				
			||||||
msgid "Equipped main:"
 | 
					msgid "Equipped main:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:64
 | 
					#: squirrelbattle/display/statsdisplay.py:65
 | 
				
			||||||
msgid "Equipped secondary:"
 | 
					msgid "Equipped secondary:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:69
 | 
					#: squirrelbattle/display/statsdisplay.py:70
 | 
				
			||||||
msgid "Equipped chestplate:"
 | 
					msgid "Equipped chestplate:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:73
 | 
					#: squirrelbattle/display/statsdisplay.py:74
 | 
				
			||||||
msgid "Equipped helmet:"
 | 
					msgid "Equipped helmet:"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:80
 | 
					#: squirrelbattle/display/statsdisplay.py:81
 | 
				
			||||||
msgid "YOU ARE DEAD"
 | 
					msgid "YOU ARE DEAD"
 | 
				
			||||||
msgstr "ERES MUERTO"
 | 
					msgstr "ERES MUERTO"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:84
 | 
					#: squirrelbattle/display/statsdisplay.py:85
 | 
				
			||||||
#, python-brace-format
 | 
					#, python-brace-format
 | 
				
			||||||
msgid "Use {key} to use the ladder"
 | 
					msgid "Use {key} to use the ladder"
 | 
				
			||||||
msgstr ""
 | 
					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
 | 
					#: squirrelbattle/entities/friendly.py:33
 | 
				
			||||||
msgid "I don't sell any squirrel"
 | 
					msgid "I don't sell any squirrel"
 | 
				
			||||||
msgstr "No vendo ninguna ardilla"
 | 
					msgstr "No vendo ninguna ardilla"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@ msgid ""
 | 
				
			|||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
"Project-Id-Version: squirrelbattle 3.14.1\n"
 | 
					"Project-Id-Version: squirrelbattle 3.14.1\n"
 | 
				
			||||||
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\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"
 | 
					"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
				
			||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
					"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
				
			||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
					"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
				
			||||||
@@ -43,35 +43,40 @@ msgstr "INVENTAIRE"
 | 
				
			|||||||
msgid "STALL"
 | 
					msgid "STALL"
 | 
				
			||||||
msgstr "STAND"
 | 
					msgstr "STAND"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:43
 | 
					#: squirrelbattle/display/statsdisplay.py:44
 | 
				
			||||||
msgid "Inventory:"
 | 
					msgid "Inventory:"
 | 
				
			||||||
msgstr "Inventaire :"
 | 
					msgstr "Inventaire :"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:60
 | 
					#: squirrelbattle/display/statsdisplay.py:61
 | 
				
			||||||
msgid "Equipped main:"
 | 
					msgid "Equipped main:"
 | 
				
			||||||
msgstr "Équipement principal :"
 | 
					msgstr "Équipement principal :"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:64
 | 
					#: squirrelbattle/display/statsdisplay.py:65
 | 
				
			||||||
msgid "Equipped secondary:"
 | 
					msgid "Equipped secondary:"
 | 
				
			||||||
msgstr "Équipement secondaire :"
 | 
					msgstr "Équipement secondaire :"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:69
 | 
					#: squirrelbattle/display/statsdisplay.py:70
 | 
				
			||||||
msgid "Equipped chestplate:"
 | 
					msgid "Equipped chestplate:"
 | 
				
			||||||
msgstr "Plastron équipé :"
 | 
					msgstr "Plastron équipé :"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:73
 | 
					#: squirrelbattle/display/statsdisplay.py:74
 | 
				
			||||||
msgid "Equipped helmet:"
 | 
					msgid "Equipped helmet:"
 | 
				
			||||||
msgstr "Casque équipé :"
 | 
					msgstr "Casque équipé :"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:80
 | 
					#: squirrelbattle/display/statsdisplay.py:81
 | 
				
			||||||
msgid "YOU ARE DEAD"
 | 
					msgid "YOU ARE DEAD"
 | 
				
			||||||
msgstr "VOUS ÊTES MORT"
 | 
					msgstr "VOUS ÊTES MORT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/display/statsdisplay.py:84
 | 
					#: squirrelbattle/display/statsdisplay.py:85
 | 
				
			||||||
#, python-brace-format
 | 
					#, python-brace-format
 | 
				
			||||||
msgid "Use {key} to use the ladder"
 | 
					msgid "Use {key} to use the ladder"
 | 
				
			||||||
msgstr "Appuyez sur {key} pour utiliser l'échelle"
 | 
					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
 | 
					#. TODO
 | 
				
			||||||
#: squirrelbattle/entities/friendly.py:33
 | 
					#: squirrelbattle/entities/friendly.py:33
 | 
				
			||||||
msgid "I don't sell any squirrel"
 | 
					msgid "I don't sell any squirrel"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user