Merge branch 'wait' into 'master'
Add waiting key, fixes #16 Closes #16 See merge request ynerant/squirrel-battle!49
This commit was merged in pull request #130.
	This commit is contained in:
		@@ -48,5 +48,5 @@ class Sunflower(FriendlyEntity):
 | 
				
			|||||||
        super().__init__(name="sunflower", maxhealth=maxhealth, *args, **kwargs)
 | 
					        super().__init__(name="sunflower", maxhealth=maxhealth, *args, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def dialogue_option(self):
 | 
					    def dialogue_option(self) -> list:
 | 
				
			||||||
        return [_("Flower power!!"), _("The sun is warm today")]
 | 
					        return [_("Flower power!!"), _("The sun is warm today")]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,6 +46,7 @@ class KeyValues(Enum):
 | 
				
			|||||||
    DROP = auto()
 | 
					    DROP = auto()
 | 
				
			||||||
    SPACE = auto()
 | 
					    SPACE = auto()
 | 
				
			||||||
    CHAT = auto()
 | 
					    CHAT = auto()
 | 
				
			||||||
 | 
					    WAIT = auto()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def translate_key(key: str, settings: Settings) -> Optional["KeyValues"]:
 | 
					    def translate_key(key: str, settings: Settings) -> Optional["KeyValues"]:
 | 
				
			||||||
@@ -78,4 +79,6 @@ class KeyValues(Enum):
 | 
				
			|||||||
            return KeyValues.SPACE
 | 
					            return KeyValues.SPACE
 | 
				
			||||||
        elif key == settings.KEY_CHAT:
 | 
					        elif key == settings.KEY_CHAT:
 | 
				
			||||||
            return KeyValues.CHAT
 | 
					            return KeyValues.CHAT
 | 
				
			||||||
 | 
					        elif key == settings.KEY_WAIT:
 | 
				
			||||||
 | 
					            return KeyValues.WAIT
 | 
				
			||||||
        return None
 | 
					        return None
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -128,6 +128,8 @@ class Game:
 | 
				
			|||||||
        elif key == KeyValues.CHAT:
 | 
					        elif key == KeyValues.CHAT:
 | 
				
			||||||
            # Wait for the direction of the friendly entity
 | 
					            # Wait for the direction of the friendly entity
 | 
				
			||||||
            self.waiting_for_friendly_key = True
 | 
					            self.waiting_for_friendly_key = True
 | 
				
			||||||
 | 
					        elif key == KeyValues.WAIT:
 | 
				
			||||||
 | 
					            self.map.tick()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def handle_friendly_entity_chat(self, key: KeyValues) -> None:
 | 
					    def handle_friendly_entity_chat(self, key: KeyValues) -> None:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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: 2020-12-12 17:24+0100\n"
 | 
					"POT-Creation-Date: 2020-12-12 18:02+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"
 | 
				
			||||||
@@ -58,11 +58,11 @@ msgstr "Die Bombe explodiert."
 | 
				
			|||||||
msgid "{player} exchanged its body with {entity}."
 | 
					msgid "{player} exchanged its body with {entity}."
 | 
				
			||||||
msgstr "{player} täuscht seinem Körper mit {entity} aus."
 | 
					msgstr "{player} täuscht seinem Körper mit {entity} aus."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:203 squirrelbattle/tests/game_test.py:573
 | 
					#: squirrelbattle/game.py:205 squirrelbattle/tests/game_test.py:573
 | 
				
			||||||
msgid "You do not have enough money"
 | 
					msgid "You do not have enough money"
 | 
				
			||||||
msgstr "Sie haben nicht genug Geld"
 | 
					msgstr "Sie haben nicht genug Geld"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:247
 | 
					#: squirrelbattle/game.py:249
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"Some keys are missing in your save file.\n"
 | 
					"Some keys are missing in your save file.\n"
 | 
				
			||||||
"Your save seems to be corrupt. It got deleted."
 | 
					"Your save seems to be corrupt. It got deleted."
 | 
				
			||||||
@@ -70,7 +70,7 @@ msgstr ""
 | 
				
			|||||||
"In Ihrer Speicherdatei fehlen einige Schlüssel.\n"
 | 
					"In Ihrer Speicherdatei fehlen einige Schlüssel.\n"
 | 
				
			||||||
"Ihre Speicherung scheint korrupt zu sein. Es wird gelöscht."
 | 
					"Ihre Speicherung scheint korrupt zu sein. Es wird gelöscht."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:255
 | 
					#: squirrelbattle/game.py:257
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"No player was found on this map!\n"
 | 
					"No player was found on this map!\n"
 | 
				
			||||||
"Maybe you died?"
 | 
					"Maybe you died?"
 | 
				
			||||||
@@ -78,7 +78,7 @@ msgstr ""
 | 
				
			|||||||
"Auf dieser Karte wurde kein Spieler gefunden!\n"
 | 
					"Auf dieser Karte wurde kein Spieler gefunden!\n"
 | 
				
			||||||
"Vielleicht sind Sie gestorben?"
 | 
					"Vielleicht sind Sie gestorben?"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:275
 | 
					#: squirrelbattle/game.py:277
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"The JSON file is not correct.\n"
 | 
					"The JSON file is not correct.\n"
 | 
				
			||||||
"Your save seems corrupted. It got deleted."
 | 
					"Your save seems corrupted. It got deleted."
 | 
				
			||||||
@@ -193,57 +193,61 @@ msgid "Key used to talk to a friendly entity"
 | 
				
			|||||||
msgstr "Taste um mit einer friedlicher Entität zu sprechen"
 | 
					msgstr "Taste um mit einer friedlicher Entität zu sprechen"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:55
 | 
					#: squirrelbattle/tests/translations_test.py:55
 | 
				
			||||||
 | 
					msgid "Key used to wait"
 | 
				
			||||||
 | 
					msgstr "Wartentaste"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: squirrelbattle/tests/translations_test.py:56
 | 
				
			||||||
msgid "Texture pack"
 | 
					msgid "Texture pack"
 | 
				
			||||||
msgstr "Textur-Packung"
 | 
					msgstr "Textur-Packung"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:56
 | 
					#: squirrelbattle/tests/translations_test.py:57
 | 
				
			||||||
msgid "Language"
 | 
					msgid "Language"
 | 
				
			||||||
msgstr "Sprache"
 | 
					msgstr "Sprache"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:59
 | 
					#: squirrelbattle/tests/translations_test.py:60
 | 
				
			||||||
msgid "player"
 | 
					msgid "player"
 | 
				
			||||||
msgstr "Spieler"
 | 
					msgstr "Spieler"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:61
 | 
					#: squirrelbattle/tests/translations_test.py:62
 | 
				
			||||||
msgid "hedgehog"
 | 
					msgid "hedgehog"
 | 
				
			||||||
msgstr "Igel"
 | 
					msgstr "Igel"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:62
 | 
					#: squirrelbattle/tests/translations_test.py:63
 | 
				
			||||||
msgid "merchant"
 | 
					msgid "merchant"
 | 
				
			||||||
msgstr "Kaufmann"
 | 
					msgstr "Kaufmann"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:63
 | 
					#: squirrelbattle/tests/translations_test.py:64
 | 
				
			||||||
msgid "rabbit"
 | 
					msgid "rabbit"
 | 
				
			||||||
msgstr "Kanninchen"
 | 
					msgstr "Kanninchen"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:64
 | 
					#: squirrelbattle/tests/translations_test.py:65
 | 
				
			||||||
msgid "sunflower"
 | 
					msgid "sunflower"
 | 
				
			||||||
msgstr "Sonnenblume"
 | 
					msgstr "Sonnenblume"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:65
 | 
					#: squirrelbattle/tests/translations_test.py:66
 | 
				
			||||||
msgid "teddy bear"
 | 
					msgid "teddy bear"
 | 
				
			||||||
msgstr "Teddybär"
 | 
					msgstr "Teddybär"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:66
 | 
					#: squirrelbattle/tests/translations_test.py:67
 | 
				
			||||||
msgid "tiger"
 | 
					msgid "tiger"
 | 
				
			||||||
msgstr "Tiger"
 | 
					msgstr "Tiger"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:68
 | 
					#: squirrelbattle/tests/translations_test.py:69
 | 
				
			||||||
msgid "body snatch potion"
 | 
					msgid "body snatch potion"
 | 
				
			||||||
msgstr "Leichenfleddererzaubertrank"
 | 
					msgstr "Leichenfleddererzaubertrank"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:69
 | 
					#: squirrelbattle/tests/translations_test.py:70
 | 
				
			||||||
msgid "bomb"
 | 
					msgid "bomb"
 | 
				
			||||||
msgstr "Bombe"
 | 
					msgstr "Bombe"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:70
 | 
					#: squirrelbattle/tests/translations_test.py:71
 | 
				
			||||||
msgid "explosion"
 | 
					msgid "explosion"
 | 
				
			||||||
msgstr "Explosion"
 | 
					msgstr "Explosion"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:71
 | 
					#: squirrelbattle/tests/translations_test.py:72
 | 
				
			||||||
msgid "heart"
 | 
					msgid "heart"
 | 
				
			||||||
msgstr "Herz"
 | 
					msgstr "Herz"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:72
 | 
					#: squirrelbattle/tests/translations_test.py:73
 | 
				
			||||||
msgid "sword"
 | 
					msgid "sword"
 | 
				
			||||||
msgstr "schwert"
 | 
					msgstr "schwert"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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: 2020-12-12 17:24+0100\n"
 | 
					"POT-Creation-Date: 2020-12-12 18:02+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"
 | 
				
			||||||
@@ -57,11 +57,11 @@ msgstr "La bomba está explotando."
 | 
				
			|||||||
msgid "{player} exchanged its body with {entity}."
 | 
					msgid "{player} exchanged its body with {entity}."
 | 
				
			||||||
msgstr "{player} intercambió su cuerpo con {entity}."
 | 
					msgstr "{player} intercambió su cuerpo con {entity}."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:203 squirrelbattle/tests/game_test.py:573
 | 
					#: squirrelbattle/game.py:205 squirrelbattle/tests/game_test.py:573
 | 
				
			||||||
msgid "You do not have enough money"
 | 
					msgid "You do not have enough money"
 | 
				
			||||||
msgstr "No tienes suficiente dinero"
 | 
					msgstr "No tienes suficiente dinero"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:247
 | 
					#: squirrelbattle/game.py:249
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"Some keys are missing in your save file.\n"
 | 
					"Some keys are missing in your save file.\n"
 | 
				
			||||||
"Your save seems to be corrupt. It got deleted."
 | 
					"Your save seems to be corrupt. It got deleted."
 | 
				
			||||||
@@ -69,7 +69,7 @@ msgstr ""
 | 
				
			|||||||
"Algunas claves faltan en su archivo de guarda.\n"
 | 
					"Algunas claves faltan en su archivo de guarda.\n"
 | 
				
			||||||
"Su guarda parece a ser corruptido. Fue eliminado."
 | 
					"Su guarda parece a ser corruptido. Fue eliminado."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:255
 | 
					#: squirrelbattle/game.py:257
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"No player was found on this map!\n"
 | 
					"No player was found on this map!\n"
 | 
				
			||||||
"Maybe you died?"
 | 
					"Maybe you died?"
 | 
				
			||||||
@@ -77,7 +77,7 @@ msgstr ""
 | 
				
			|||||||
"No jugador encontrado sobre la carta !\n"
 | 
					"No jugador encontrado sobre la carta !\n"
 | 
				
			||||||
"¿ Quizas murió ?"
 | 
					"¿ Quizas murió ?"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:275
 | 
					#: squirrelbattle/game.py:277
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"The JSON file is not correct.\n"
 | 
					"The JSON file is not correct.\n"
 | 
				
			||||||
"Your save seems corrupted. It got deleted."
 | 
					"Your save seems corrupted. It got deleted."
 | 
				
			||||||
@@ -192,57 +192,61 @@ msgid "Key used to talk to a friendly entity"
 | 
				
			|||||||
msgstr "Tecla para hablar con una entidad amiga"
 | 
					msgstr "Tecla para hablar con una entidad amiga"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:55
 | 
					#: squirrelbattle/tests/translations_test.py:55
 | 
				
			||||||
 | 
					msgid "Key used to wait"
 | 
				
			||||||
 | 
					msgstr "Tecla para espera"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: squirrelbattle/tests/translations_test.py:56
 | 
				
			||||||
msgid "Texture pack"
 | 
					msgid "Texture pack"
 | 
				
			||||||
msgstr "Paquete de texturas"
 | 
					msgstr "Paquete de texturas"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:56
 | 
					#: squirrelbattle/tests/translations_test.py:57
 | 
				
			||||||
msgid "Language"
 | 
					msgid "Language"
 | 
				
			||||||
msgstr "Languaje"
 | 
					msgstr "Languaje"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:59
 | 
					#: squirrelbattle/tests/translations_test.py:60
 | 
				
			||||||
msgid "player"
 | 
					msgid "player"
 | 
				
			||||||
msgstr "jugador"
 | 
					msgstr "jugador"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:61
 | 
					#: squirrelbattle/tests/translations_test.py:62
 | 
				
			||||||
msgid "hedgehog"
 | 
					msgid "hedgehog"
 | 
				
			||||||
msgstr "erizo"
 | 
					msgstr "erizo"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:62
 | 
					#: squirrelbattle/tests/translations_test.py:63
 | 
				
			||||||
msgid "merchant"
 | 
					msgid "merchant"
 | 
				
			||||||
msgstr "comerciante"
 | 
					msgstr "comerciante"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:63
 | 
					#: squirrelbattle/tests/translations_test.py:64
 | 
				
			||||||
msgid "rabbit"
 | 
					msgid "rabbit"
 | 
				
			||||||
msgstr "conejo"
 | 
					msgstr "conejo"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:64
 | 
					#: squirrelbattle/tests/translations_test.py:65
 | 
				
			||||||
msgid "sunflower"
 | 
					msgid "sunflower"
 | 
				
			||||||
msgstr "girasol"
 | 
					msgstr "girasol"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:65
 | 
					#: squirrelbattle/tests/translations_test.py:66
 | 
				
			||||||
msgid "teddy bear"
 | 
					msgid "teddy bear"
 | 
				
			||||||
msgstr "osito de peluche"
 | 
					msgstr "osito de peluche"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:66
 | 
					#: squirrelbattle/tests/translations_test.py:67
 | 
				
			||||||
msgid "tiger"
 | 
					msgid "tiger"
 | 
				
			||||||
msgstr "tigre"
 | 
					msgstr "tigre"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:68
 | 
					#: squirrelbattle/tests/translations_test.py:69
 | 
				
			||||||
msgid "body snatch potion"
 | 
					msgid "body snatch potion"
 | 
				
			||||||
msgstr "poción de intercambio"
 | 
					msgstr "poción de intercambio"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:69
 | 
					#: squirrelbattle/tests/translations_test.py:70
 | 
				
			||||||
msgid "bomb"
 | 
					msgid "bomb"
 | 
				
			||||||
msgstr "bomba"
 | 
					msgstr "bomba"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:70
 | 
					#: squirrelbattle/tests/translations_test.py:71
 | 
				
			||||||
msgid "explosion"
 | 
					msgid "explosion"
 | 
				
			||||||
msgstr "explosión"
 | 
					msgstr "explosión"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:71
 | 
					#: squirrelbattle/tests/translations_test.py:72
 | 
				
			||||||
msgid "heart"
 | 
					msgid "heart"
 | 
				
			||||||
msgstr "corazón"
 | 
					msgstr "corazón"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:72
 | 
					#: squirrelbattle/tests/translations_test.py:73
 | 
				
			||||||
msgid "sword"
 | 
					msgid "sword"
 | 
				
			||||||
msgstr "espada"
 | 
					msgstr "espada"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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: 2020-12-12 17:24+0100\n"
 | 
					"POT-Creation-Date: 2020-12-12 18:02+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"
 | 
				
			||||||
@@ -58,11 +58,11 @@ msgstr "La bombe explose."
 | 
				
			|||||||
msgid "{player} exchanged its body with {entity}."
 | 
					msgid "{player} exchanged its body with {entity}."
 | 
				
			||||||
msgstr "{player} a échangé son corps avec {entity}."
 | 
					msgstr "{player} a échangé son corps avec {entity}."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:203 squirrelbattle/tests/game_test.py:573
 | 
					#: squirrelbattle/game.py:205 squirrelbattle/tests/game_test.py:573
 | 
				
			||||||
msgid "You do not have enough money"
 | 
					msgid "You do not have enough money"
 | 
				
			||||||
msgstr "Vous n'avez pas assez d'argent"
 | 
					msgstr "Vous n'avez pas assez d'argent"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:247
 | 
					#: squirrelbattle/game.py:249
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"Some keys are missing in your save file.\n"
 | 
					"Some keys are missing in your save file.\n"
 | 
				
			||||||
"Your save seems to be corrupt. It got deleted."
 | 
					"Your save seems to be corrupt. It got deleted."
 | 
				
			||||||
@@ -70,7 +70,7 @@ msgstr ""
 | 
				
			|||||||
"Certaines clés de votre ficher de sauvegarde sont manquantes.\n"
 | 
					"Certaines clés de votre ficher de sauvegarde sont manquantes.\n"
 | 
				
			||||||
"Votre sauvegarde semble corrompue. Elle a été supprimée."
 | 
					"Votre sauvegarde semble corrompue. Elle a été supprimée."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:255
 | 
					#: squirrelbattle/game.py:257
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"No player was found on this map!\n"
 | 
					"No player was found on this map!\n"
 | 
				
			||||||
"Maybe you died?"
 | 
					"Maybe you died?"
 | 
				
			||||||
@@ -78,7 +78,7 @@ msgstr ""
 | 
				
			|||||||
"Aucun joueur n'a été trouvé sur la carte !\n"
 | 
					"Aucun joueur n'a été trouvé sur la carte !\n"
 | 
				
			||||||
"Peut-être êtes-vous mort ?"
 | 
					"Peut-être êtes-vous mort ?"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/game.py:275
 | 
					#: squirrelbattle/game.py:277
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"The JSON file is not correct.\n"
 | 
					"The JSON file is not correct.\n"
 | 
				
			||||||
"Your save seems corrupted. It got deleted."
 | 
					"Your save seems corrupted. It got deleted."
 | 
				
			||||||
@@ -193,57 +193,61 @@ msgid "Key used to talk to a friendly entity"
 | 
				
			|||||||
msgstr "Touche pour parler à une entité pacifique"
 | 
					msgstr "Touche pour parler à une entité pacifique"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:55
 | 
					#: squirrelbattle/tests/translations_test.py:55
 | 
				
			||||||
 | 
					msgid "Key used to wait"
 | 
				
			||||||
 | 
					msgstr "Touche pour attendre"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: squirrelbattle/tests/translations_test.py:56
 | 
				
			||||||
msgid "Texture pack"
 | 
					msgid "Texture pack"
 | 
				
			||||||
msgstr "Pack de textures"
 | 
					msgstr "Pack de textures"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:56
 | 
					#: squirrelbattle/tests/translations_test.py:57
 | 
				
			||||||
msgid "Language"
 | 
					msgid "Language"
 | 
				
			||||||
msgstr "Langue"
 | 
					msgstr "Langue"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:59
 | 
					#: squirrelbattle/tests/translations_test.py:60
 | 
				
			||||||
msgid "player"
 | 
					msgid "player"
 | 
				
			||||||
msgstr "joueur"
 | 
					msgstr "joueur"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:61
 | 
					#: squirrelbattle/tests/translations_test.py:62
 | 
				
			||||||
msgid "hedgehog"
 | 
					msgid "hedgehog"
 | 
				
			||||||
msgstr "hérisson"
 | 
					msgstr "hérisson"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:62
 | 
					#: squirrelbattle/tests/translations_test.py:63
 | 
				
			||||||
msgid "merchant"
 | 
					msgid "merchant"
 | 
				
			||||||
msgstr "marchand"
 | 
					msgstr "marchand"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:63
 | 
					#: squirrelbattle/tests/translations_test.py:64
 | 
				
			||||||
msgid "rabbit"
 | 
					msgid "rabbit"
 | 
				
			||||||
msgstr "lapin"
 | 
					msgstr "lapin"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:64
 | 
					#: squirrelbattle/tests/translations_test.py:65
 | 
				
			||||||
msgid "sunflower"
 | 
					msgid "sunflower"
 | 
				
			||||||
msgstr "tournesol"
 | 
					msgstr "tournesol"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:65
 | 
					#: squirrelbattle/tests/translations_test.py:66
 | 
				
			||||||
msgid "teddy bear"
 | 
					msgid "teddy bear"
 | 
				
			||||||
msgstr "nounours"
 | 
					msgstr "nounours"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:66
 | 
					#: squirrelbattle/tests/translations_test.py:67
 | 
				
			||||||
msgid "tiger"
 | 
					msgid "tiger"
 | 
				
			||||||
msgstr "tigre"
 | 
					msgstr "tigre"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:68
 | 
					#: squirrelbattle/tests/translations_test.py:69
 | 
				
			||||||
msgid "body snatch potion"
 | 
					msgid "body snatch potion"
 | 
				
			||||||
msgstr "potion d'arrachage de corps"
 | 
					msgstr "potion d'arrachage de corps"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:69
 | 
					#: squirrelbattle/tests/translations_test.py:70
 | 
				
			||||||
msgid "bomb"
 | 
					msgid "bomb"
 | 
				
			||||||
msgstr "bombe"
 | 
					msgstr "bombe"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:70
 | 
					#: squirrelbattle/tests/translations_test.py:71
 | 
				
			||||||
msgid "explosion"
 | 
					msgid "explosion"
 | 
				
			||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:71
 | 
					#: squirrelbattle/tests/translations_test.py:72
 | 
				
			||||||
msgid "heart"
 | 
					msgid "heart"
 | 
				
			||||||
msgstr "cœur"
 | 
					msgstr "cœur"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: squirrelbattle/tests/translations_test.py:72
 | 
					#: squirrelbattle/tests/translations_test.py:73
 | 
				
			||||||
msgid "sword"
 | 
					msgid "sword"
 | 
				
			||||||
msgstr "épée"
 | 
					msgstr "épée"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,6 +32,7 @@ class Settings:
 | 
				
			|||||||
        self.KEY_EQUIP = ['e', 'Key used to equip an item in the inventory']
 | 
					        self.KEY_EQUIP = ['e', 'Key used to equip an item in the inventory']
 | 
				
			||||||
        self.KEY_DROP = ['r', 'Key used to drop an item in the inventory']
 | 
					        self.KEY_DROP = ['r', 'Key used to drop an item in the inventory']
 | 
				
			||||||
        self.KEY_CHAT = ['t', 'Key used to talk to a friendly entity']
 | 
					        self.KEY_CHAT = ['t', 'Key used to talk to a friendly entity']
 | 
				
			||||||
 | 
					        self.KEY_WAIT = ['w', 'Key used to wait']
 | 
				
			||||||
        self.TEXTURE_PACK = ['ascii', 'Texture pack']
 | 
					        self.TEXTURE_PACK = ['ascii', 'Texture pack']
 | 
				
			||||||
        self.LOCALE = [locale.getlocale()[0][:2], 'Language']
 | 
					        self.LOCALE = [locale.getlocale()[0][:2], 'Language']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@ from ..bootstrap import Bootstrap
 | 
				
			|||||||
from ..display.display import Display
 | 
					from ..display.display import Display
 | 
				
			||||||
from ..display.display_manager import DisplayManager
 | 
					from ..display.display_manager import DisplayManager
 | 
				
			||||||
from ..entities.friendly import Merchant, Sunflower
 | 
					from ..entities.friendly import Merchant, Sunflower
 | 
				
			||||||
from ..entities.items import Bomb, Heart, Sword
 | 
					from ..entities.items import Bomb, Heart, Sword, Explosion
 | 
				
			||||||
from ..entities.player import Player
 | 
					from ..entities.player import Player
 | 
				
			||||||
from ..enums import DisplayActions
 | 
					from ..enums import DisplayActions
 | 
				
			||||||
from ..game import Game, KeyValues, GameMode
 | 
					from ..game import Game, KeyValues, GameMode
 | 
				
			||||||
@@ -140,6 +140,9 @@ class TestGame(unittest.TestCase):
 | 
				
			|||||||
        self.assertEqual(KeyValues.translate_key(
 | 
					        self.assertEqual(KeyValues.translate_key(
 | 
				
			||||||
            self.game.settings.KEY_DROP, self.game.settings),
 | 
					            self.game.settings.KEY_DROP, self.game.settings),
 | 
				
			||||||
            KeyValues.DROP)
 | 
					            KeyValues.DROP)
 | 
				
			||||||
 | 
					        self.assertEqual(KeyValues.translate_key(
 | 
				
			||||||
 | 
					            self.game.settings.KEY_WAIT, self.game.settings),
 | 
				
			||||||
 | 
					            KeyValues.WAIT)
 | 
				
			||||||
        self.assertEqual(KeyValues.translate_key(' ', self.game.settings),
 | 
					        self.assertEqual(KeyValues.translate_key(' ', self.game.settings),
 | 
				
			||||||
                         KeyValues.SPACE)
 | 
					                         KeyValues.SPACE)
 | 
				
			||||||
        self.assertEqual(KeyValues.translate_key('plop', self.game.settings),
 | 
					        self.assertEqual(KeyValues.translate_key('plop', self.game.settings),
 | 
				
			||||||
@@ -227,6 +230,12 @@ class TestGame(unittest.TestCase):
 | 
				
			|||||||
        self.assertEqual(new_y, y)
 | 
					        self.assertEqual(new_y, y)
 | 
				
			||||||
        self.assertEqual(new_x, x - 1)
 | 
					        self.assertEqual(new_x, x - 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        explosion = Explosion()
 | 
				
			||||||
 | 
					        self.game.map.add_entity(explosion)
 | 
				
			||||||
 | 
					        self.assertIn(explosion, self.game.map.entities)
 | 
				
			||||||
 | 
					        self.game.handle_key_pressed(KeyValues.WAIT)
 | 
				
			||||||
 | 
					        self.assertNotIn(explosion, self.game.map.entities)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.game.handle_key_pressed(KeyValues.SPACE)
 | 
					        self.game.handle_key_pressed(KeyValues.SPACE)
 | 
				
			||||||
        self.assertEqual(self.game.state, GameMode.MAINMENU)
 | 
					        self.assertEqual(self.game.state, GameMode.MAINMENU)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -297,13 +306,13 @@ class TestGame(unittest.TestCase):
 | 
				
			|||||||
        self.game.handle_key_pressed(KeyValues.ENTER)
 | 
					        self.game.handle_key_pressed(KeyValues.ENTER)
 | 
				
			||||||
        self.assertEqual(self.game.state, GameMode.SETTINGS)
 | 
					        self.assertEqual(self.game.state, GameMode.SETTINGS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Define the "move up" key to 'w'
 | 
					        # Define the "move up" key to 'h'
 | 
				
			||||||
        self.assertFalse(self.game.settings_menu.waiting_for_key)
 | 
					        self.assertFalse(self.game.settings_menu.waiting_for_key)
 | 
				
			||||||
        self.game.handle_key_pressed(KeyValues.ENTER)
 | 
					        self.game.handle_key_pressed(KeyValues.ENTER)
 | 
				
			||||||
        self.assertTrue(self.game.settings_menu.waiting_for_key)
 | 
					        self.assertTrue(self.game.settings_menu.waiting_for_key)
 | 
				
			||||||
        self.game.handle_key_pressed(None, 'w')
 | 
					        self.game.handle_key_pressed(None, 'h')
 | 
				
			||||||
        self.assertFalse(self.game.settings_menu.waiting_for_key)
 | 
					        self.assertFalse(self.game.settings_menu.waiting_for_key)
 | 
				
			||||||
        self.assertEqual(self.game.settings.KEY_UP_PRIMARY, 'w')
 | 
					        self.assertEqual(self.game.settings.KEY_UP_PRIMARY, 'h')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Navigate to "move left"
 | 
					        # Navigate to "move left"
 | 
				
			||||||
        self.game.handle_key_pressed(KeyValues.DOWN)
 | 
					        self.game.handle_key_pressed(KeyValues.DOWN)
 | 
				
			||||||
@@ -324,7 +333,7 @@ class TestGame(unittest.TestCase):
 | 
				
			|||||||
        self.assertEqual(self.game.settings.KEY_LEFT_PRIMARY, 'a')
 | 
					        self.assertEqual(self.game.settings.KEY_LEFT_PRIMARY, 'a')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Navigate to "texture pack"
 | 
					        # Navigate to "texture pack"
 | 
				
			||||||
        for ignored in range(10):
 | 
					        for ignored in range(11):
 | 
				
			||||||
            self.game.handle_key_pressed(KeyValues.DOWN)
 | 
					            self.game.handle_key_pressed(KeyValues.DOWN)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Change texture pack
 | 
					        # Change texture pack
 | 
				
			||||||
@@ -496,8 +505,8 @@ class TestGame(unittest.TestCase):
 | 
				
			|||||||
        self.assertEqual(self.game.state, GameMode.PLAY)
 | 
					        self.assertEqual(self.game.state, GameMode.PLAY)
 | 
				
			||||||
        self.assertTrue(self.game.logs.messages)
 | 
					        self.assertTrue(self.game.logs.messages)
 | 
				
			||||||
        # Ensure that the message is a good message
 | 
					        # Ensure that the message is a good message
 | 
				
			||||||
        self.assertIn(self.game.logs.messages[1][16:],
 | 
					        self.assertTrue(any(self.game.logs.messages[1].endswith(msg)
 | 
				
			||||||
                      Sunflower().dialogue_option)
 | 
					                            for msg in Sunflower().dialogue_option))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Test all directions to detect the friendly entity
 | 
					        # Test all directions to detect the friendly entity
 | 
				
			||||||
        self.game.player.move(3, 6)
 | 
					        self.game.player.move(3, 6)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,6 +52,7 @@ class TestTranslations(unittest.TestCase):
 | 
				
			|||||||
                         "Touche pour jeter un objet de l'inventaire")
 | 
					                         "Touche pour jeter un objet de l'inventaire")
 | 
				
			||||||
        self.assertEqual(_("Key used to talk to a friendly entity"),
 | 
					        self.assertEqual(_("Key used to talk to a friendly entity"),
 | 
				
			||||||
                         "Touche pour parler à une entité pacifique")
 | 
					                         "Touche pour parler à une entité pacifique")
 | 
				
			||||||
 | 
					        self.assertEqual(_("Key used to wait"), "Touche pour attendre")
 | 
				
			||||||
        self.assertEqual(_("Texture pack"), "Pack de textures")
 | 
					        self.assertEqual(_("Texture pack"), "Pack de textures")
 | 
				
			||||||
        self.assertEqual(_("Language"), "Langue")
 | 
					        self.assertEqual(_("Language"), "Langue")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user