Use a key to use ladders
This commit is contained in:
parent
663fc0eecd
commit
d06a405120
|
@ -47,6 +47,7 @@ class KeyValues(Enum):
|
||||||
SPACE = auto()
|
SPACE = auto()
|
||||||
CHAT = auto()
|
CHAT = auto()
|
||||||
WAIT = auto()
|
WAIT = auto()
|
||||||
|
LADDER = auto()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def translate_key(key: str, settings: Settings) -> Optional["KeyValues"]:
|
def translate_key(key: str, settings: Settings) -> Optional["KeyValues"]:
|
||||||
|
@ -81,4 +82,6 @@ class KeyValues(Enum):
|
||||||
return KeyValues.CHAT
|
return KeyValues.CHAT
|
||||||
elif key == settings.KEY_WAIT:
|
elif key == settings.KEY_WAIT:
|
||||||
return KeyValues.WAIT
|
return KeyValues.WAIT
|
||||||
|
elif key == settings.KEY_LADDER:
|
||||||
|
return KeyValues.LADDER
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -102,38 +102,6 @@ class Game:
|
||||||
self.handle_key_pressed(
|
self.handle_key_pressed(
|
||||||
KeyValues.translate_key(key, self.settings), key)
|
KeyValues.translate_key(key, self.settings), key)
|
||||||
|
|
||||||
# FIXME This code should not be there, but rather in Map.tick
|
|
||||||
y, x = self.player.y, self.player.x
|
|
||||||
if self.map.tiles[y][x].is_ladder():
|
|
||||||
# We move up on the ladder of the beginning,
|
|
||||||
# down at the end of the stage
|
|
||||||
move_down = y != self.map.start_y and x != self.map.start_x
|
|
||||||
old_map = self.map
|
|
||||||
self.map_index += 1 if move_down else -1
|
|
||||||
if self.map_index == -1:
|
|
||||||
self.map_index = 0
|
|
||||||
return
|
|
||||||
while self.map_index >= len(self.maps):
|
|
||||||
self.maps.append(Map.load(ResourceManager.get_asset_path(
|
|
||||||
"example_map_2.txt")))
|
|
||||||
new_map = self.map
|
|
||||||
old_map.remove_entity(self.player)
|
|
||||||
new_map.add_entity(self.player)
|
|
||||||
if move_down:
|
|
||||||
self.player.move(self.map.start_y, self.map.start_x)
|
|
||||||
elif KeyValues.translate_key(key, self.settings) \
|
|
||||||
in [KeyValues.UP, KeyValues.DOWN,
|
|
||||||
KeyValues.LEFT, KeyValues.RIGHT]:
|
|
||||||
ladder_y, ladder_x = -1, -1
|
|
||||||
for y in range(self.map.height):
|
|
||||||
for x in range(self.map.width):
|
|
||||||
if (y, x) != (self.map.start_y, self.map.start_x) \
|
|
||||||
and self.map.tiles[y][x].is_ladder():
|
|
||||||
ladder_y, ladder_x = y, x
|
|
||||||
break
|
|
||||||
self.player.move(ladder_y, ladder_x)
|
|
||||||
self.display_actions(DisplayActions.UPDATE)
|
|
||||||
|
|
||||||
def handle_key_pressed(self, key: Optional[KeyValues], raw_key: str = '')\
|
def handle_key_pressed(self, key: Optional[KeyValues], raw_key: str = '')\
|
||||||
-> None:
|
-> None:
|
||||||
"""
|
"""
|
||||||
|
@ -186,6 +154,40 @@ class Game:
|
||||||
self.waiting_for_friendly_key = True
|
self.waiting_for_friendly_key = True
|
||||||
elif key == KeyValues.WAIT:
|
elif key == KeyValues.WAIT:
|
||||||
self.map.tick()
|
self.map.tick()
|
||||||
|
elif key == KeyValues.LADDER:
|
||||||
|
# On a ladder, we switch level
|
||||||
|
y, x = self.player.y, self.player.x
|
||||||
|
if not self.map.tiles[y][x].is_ladder():
|
||||||
|
return
|
||||||
|
|
||||||
|
# We move up on the ladder of the beginning,
|
||||||
|
# down at the end of the stage
|
||||||
|
move_down = y != self.map.start_y and x != self.map.start_x
|
||||||
|
old_map = self.map
|
||||||
|
self.map_index += 1 if move_down else -1
|
||||||
|
if self.map_index == -1:
|
||||||
|
self.map_index = 0
|
||||||
|
return
|
||||||
|
while self.map_index >= len(self.maps):
|
||||||
|
# TODO: generate a new map
|
||||||
|
self.maps.append(Map.load(ResourceManager.get_asset_path(
|
||||||
|
"example_map_2.txt")))
|
||||||
|
new_map = self.map
|
||||||
|
old_map.remove_entity(self.player)
|
||||||
|
new_map.add_entity(self.player)
|
||||||
|
if move_down:
|
||||||
|
self.player.move(self.map.start_y, self.map.start_x)
|
||||||
|
else:
|
||||||
|
# Find the ladder of the end of the game
|
||||||
|
ladder_y, ladder_x = -1, -1
|
||||||
|
for y in range(self.map.height):
|
||||||
|
for x in range(self.map.width):
|
||||||
|
if (y, x) != (self.map.start_y, self.map.start_x) \
|
||||||
|
and self.map.tiles[y][x].is_ladder():
|
||||||
|
ladder_y, ladder_x = y, x
|
||||||
|
break
|
||||||
|
self.player.move(ladder_y, ladder_x)
|
||||||
|
self.display_actions(DisplayActions.UPDATE)
|
||||||
|
|
||||||
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 18:02+0100\n"
|
"POT-Creation-Date: 2021-01-06 14:53+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"
|
||||||
|
@ -17,19 +17,19 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: squirrelbattle/display/menudisplay.py:139
|
#: squirrelbattle/display/menudisplay.py:160
|
||||||
msgid "INVENTORY"
|
msgid "INVENTORY"
|
||||||
msgstr "BESTAND"
|
msgstr "BESTAND"
|
||||||
|
|
||||||
#: squirrelbattle/display/menudisplay.py:164
|
#: squirrelbattle/display/menudisplay.py:202
|
||||||
msgid "STALL"
|
msgid "STALL"
|
||||||
msgstr "STAND"
|
msgstr "STAND"
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:33
|
#: squirrelbattle/display/statsdisplay.py:34
|
||||||
msgid "Inventory:"
|
msgid "Inventory:"
|
||||||
msgstr "Bestand:"
|
msgstr "Bestand:"
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:52
|
#: squirrelbattle/display/statsdisplay.py:53
|
||||||
msgid "YOU ARE DEAD"
|
msgid "YOU ARE DEAD"
|
||||||
msgstr "SIE WURDEN GESTORBEN"
|
msgstr "SIE WURDEN GESTORBEN"
|
||||||
|
|
||||||
|
@ -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:205 squirrelbattle/tests/game_test.py:573
|
#: squirrelbattle/game.py:277 squirrelbattle/tests/game_test.py:592
|
||||||
msgid "The buyer does not have enough money"
|
msgid "The buyer does not have enough money"
|
||||||
msgstr "Der Kaufer hat nicht genug Geld"
|
msgstr "Der Kaufer hat nicht genug Geld"
|
||||||
|
|
||||||
#: squirrelbattle/game.py:249
|
#: squirrelbattle/game.py:320
|
||||||
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:257
|
#: squirrelbattle/game.py:328
|
||||||
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:277
|
#: squirrelbattle/game.py:348
|
||||||
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."
|
||||||
|
@ -86,22 +86,22 @@ msgstr ""
|
||||||
"Die JSON-Datei ist nicht korrekt.\n"
|
"Die JSON-Datei ist nicht korrekt.\n"
|
||||||
"Ihre Speicherung scheint korrumpiert. Sie wurde gelöscht."
|
"Ihre Speicherung scheint korrumpiert. Sie wurde gelöscht."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:429
|
#: squirrelbattle/interfaces.py:451
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} hits {opponent}."
|
msgid "{name} hits {opponent}."
|
||||||
msgstr "{name} schlägt {opponent}."
|
msgstr "{name} schlägt {opponent}."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:441
|
#: squirrelbattle/interfaces.py:463
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} takes {amount} damage."
|
msgid "{name} takes {amount} damage."
|
||||||
msgstr "{name} nimmt {amount} Schadenspunkte."
|
msgstr "{name} nimmt {amount} Schadenspunkte."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:443
|
#: squirrelbattle/interfaces.py:465
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} dies."
|
msgid "{name} dies."
|
||||||
msgstr "{name} stirbt."
|
msgstr "{name} stirbt."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:477
|
#: squirrelbattle/interfaces.py:499
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{entity} said: {message}"
|
msgid "{entity} said: {message}"
|
||||||
msgstr "{entity} hat gesagt: {message}"
|
msgstr "{entity} hat gesagt: {message}"
|
||||||
|
@ -110,8 +110,8 @@ msgstr "{entity} hat gesagt: {message}"
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "Zurück"
|
msgstr "Zurück"
|
||||||
|
|
||||||
#: squirrelbattle/tests/game_test.py:344 squirrelbattle/tests/game_test.py:347
|
#: squirrelbattle/tests/game_test.py:358 squirrelbattle/tests/game_test.py:361
|
||||||
#: squirrelbattle/tests/game_test.py:350 squirrelbattle/tests/game_test.py:353
|
#: squirrelbattle/tests/game_test.py:364 squirrelbattle/tests/game_test.py:367
|
||||||
#: squirrelbattle/tests/translations_test.py:16
|
#: squirrelbattle/tests/translations_test.py:16
|
||||||
msgid "New game"
|
msgid "New game"
|
||||||
msgstr "Neu Spiel"
|
msgstr "Neu Spiel"
|
||||||
|
@ -197,57 +197,61 @@ msgid "Key used to wait"
|
||||||
msgstr "Wartentaste"
|
msgstr "Wartentaste"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:56
|
#: squirrelbattle/tests/translations_test.py:56
|
||||||
|
msgid "Key used to use ladders"
|
||||||
|
msgstr "Leitertaste"
|
||||||
|
|
||||||
|
#: squirrelbattle/tests/translations_test.py:58
|
||||||
msgid "Texture pack"
|
msgid "Texture pack"
|
||||||
msgstr "Textur-Packung"
|
msgstr "Textur-Packung"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:57
|
#: squirrelbattle/tests/translations_test.py:59
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "Sprache"
|
msgstr "Sprache"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:60
|
#: squirrelbattle/tests/translations_test.py:62
|
||||||
msgid "player"
|
msgid "player"
|
||||||
msgstr "Spieler"
|
msgstr "Spieler"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:62
|
#: squirrelbattle/tests/translations_test.py:64
|
||||||
msgid "hedgehog"
|
msgid "hedgehog"
|
||||||
msgstr "Igel"
|
msgstr "Igel"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:63
|
#: squirrelbattle/tests/translations_test.py:65
|
||||||
msgid "merchant"
|
msgid "merchant"
|
||||||
msgstr "Kaufmann"
|
msgstr "Kaufmann"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:64
|
#: squirrelbattle/tests/translations_test.py:66
|
||||||
msgid "rabbit"
|
msgid "rabbit"
|
||||||
msgstr "Kanninchen"
|
msgstr "Kanninchen"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:65
|
#: squirrelbattle/tests/translations_test.py:67
|
||||||
msgid "sunflower"
|
msgid "sunflower"
|
||||||
msgstr "Sonnenblume"
|
msgstr "Sonnenblume"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:66
|
#: squirrelbattle/tests/translations_test.py:68
|
||||||
msgid "teddy bear"
|
msgid "teddy bear"
|
||||||
msgstr "Teddybär"
|
msgstr "Teddybär"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:67
|
#: squirrelbattle/tests/translations_test.py:69
|
||||||
msgid "tiger"
|
msgid "tiger"
|
||||||
msgstr "Tiger"
|
msgstr "Tiger"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:69
|
#: squirrelbattle/tests/translations_test.py:71
|
||||||
msgid "body snatch potion"
|
msgid "body snatch potion"
|
||||||
msgstr "Leichenfleddererzaubertrank"
|
msgstr "Leichenfleddererzaubertrank"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:70
|
#: squirrelbattle/tests/translations_test.py:72
|
||||||
msgid "bomb"
|
msgid "bomb"
|
||||||
msgstr "Bombe"
|
msgstr "Bombe"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:71
|
#: squirrelbattle/tests/translations_test.py:73
|
||||||
msgid "explosion"
|
msgid "explosion"
|
||||||
msgstr "Explosion"
|
msgstr "Explosion"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:72
|
#: squirrelbattle/tests/translations_test.py:74
|
||||||
msgid "heart"
|
msgid "heart"
|
||||||
msgstr "Herz"
|
msgstr "Herz"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:73
|
#: squirrelbattle/tests/translations_test.py:75
|
||||||
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 18:02+0100\n"
|
"POT-Creation-Date: 2021-01-06 14:53+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"
|
||||||
|
@ -17,19 +17,19 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: squirrelbattle/display/menudisplay.py:139
|
#: squirrelbattle/display/menudisplay.py:160
|
||||||
msgid "INVENTORY"
|
msgid "INVENTORY"
|
||||||
msgstr "INVENTORIO"
|
msgstr "INVENTORIO"
|
||||||
|
|
||||||
#: squirrelbattle/display/menudisplay.py:164
|
#: squirrelbattle/display/menudisplay.py:202
|
||||||
msgid "STALL"
|
msgid "STALL"
|
||||||
msgstr "PUESTO"
|
msgstr "PUESTO"
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:33
|
#: squirrelbattle/display/statsdisplay.py:34
|
||||||
msgid "Inventory:"
|
msgid "Inventory:"
|
||||||
msgstr "Inventorio :"
|
msgstr "Inventorio :"
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:52
|
#: squirrelbattle/display/statsdisplay.py:53
|
||||||
msgid "YOU ARE DEAD"
|
msgid "YOU ARE DEAD"
|
||||||
msgstr "ERES MUERTO"
|
msgstr "ERES MUERTO"
|
||||||
|
|
||||||
|
@ -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:205 squirrelbattle/tests/game_test.py:573
|
#: squirrelbattle/game.py:277 squirrelbattle/tests/game_test.py:592
|
||||||
msgid "The buyer does not have enough money"
|
msgid "The buyer does not have enough money"
|
||||||
msgstr "El comprador no tiene suficiente dinero"
|
msgstr "El comprador no tiene suficiente dinero"
|
||||||
|
|
||||||
#: squirrelbattle/game.py:249
|
#: squirrelbattle/game.py:320
|
||||||
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:257
|
#: squirrelbattle/game.py:328
|
||||||
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:277
|
#: squirrelbattle/game.py:348
|
||||||
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."
|
||||||
|
@ -85,22 +85,22 @@ msgstr ""
|
||||||
"El JSON archivo no es correcto.\n"
|
"El JSON archivo no es correcto.\n"
|
||||||
"Su guarda parece corrupta. Fue eliminada."
|
"Su guarda parece corrupta. Fue eliminada."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:429
|
#: squirrelbattle/interfaces.py:451
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} hits {opponent}."
|
msgid "{name} hits {opponent}."
|
||||||
msgstr "{name} golpea a {opponent}."
|
msgstr "{name} golpea a {opponent}."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:441
|
#: squirrelbattle/interfaces.py:463
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} takes {amount} damage."
|
msgid "{name} takes {amount} damage."
|
||||||
msgstr "{name} recibe {amount} daño."
|
msgstr "{name} recibe {amount} daño."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:443
|
#: squirrelbattle/interfaces.py:465
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} dies."
|
msgid "{name} dies."
|
||||||
msgstr "{name} se muere."
|
msgstr "{name} se muere."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:477
|
#: squirrelbattle/interfaces.py:499
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{entity} said: {message}"
|
msgid "{entity} said: {message}"
|
||||||
msgstr "{entity} dijo : {message}"
|
msgstr "{entity} dijo : {message}"
|
||||||
|
@ -109,8 +109,8 @@ msgstr "{entity} dijo : {message}"
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "Volver"
|
msgstr "Volver"
|
||||||
|
|
||||||
#: squirrelbattle/tests/game_test.py:344 squirrelbattle/tests/game_test.py:347
|
#: squirrelbattle/tests/game_test.py:358 squirrelbattle/tests/game_test.py:361
|
||||||
#: squirrelbattle/tests/game_test.py:350 squirrelbattle/tests/game_test.py:353
|
#: squirrelbattle/tests/game_test.py:364 squirrelbattle/tests/game_test.py:367
|
||||||
#: squirrelbattle/tests/translations_test.py:16
|
#: squirrelbattle/tests/translations_test.py:16
|
||||||
msgid "New game"
|
msgid "New game"
|
||||||
msgstr "Nuevo partido"
|
msgstr "Nuevo partido"
|
||||||
|
@ -196,57 +196,61 @@ msgid "Key used to wait"
|
||||||
msgstr "Tecla para espera"
|
msgstr "Tecla para espera"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:56
|
#: squirrelbattle/tests/translations_test.py:56
|
||||||
|
msgid "Key used to use ladders"
|
||||||
|
msgstr "Tecla para el uso de las escaleras"
|
||||||
|
|
||||||
|
#: squirrelbattle/tests/translations_test.py:58
|
||||||
msgid "Texture pack"
|
msgid "Texture pack"
|
||||||
msgstr "Paquete de texturas"
|
msgstr "Paquete de texturas"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:57
|
#: squirrelbattle/tests/translations_test.py:59
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "Languaje"
|
msgstr "Languaje"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:60
|
#: squirrelbattle/tests/translations_test.py:62
|
||||||
msgid "player"
|
msgid "player"
|
||||||
msgstr "jugador"
|
msgstr "jugador"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:62
|
#: squirrelbattle/tests/translations_test.py:64
|
||||||
msgid "hedgehog"
|
msgid "hedgehog"
|
||||||
msgstr "erizo"
|
msgstr "erizo"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:63
|
#: squirrelbattle/tests/translations_test.py:65
|
||||||
msgid "merchant"
|
msgid "merchant"
|
||||||
msgstr "comerciante"
|
msgstr "comerciante"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:64
|
#: squirrelbattle/tests/translations_test.py:66
|
||||||
msgid "rabbit"
|
msgid "rabbit"
|
||||||
msgstr "conejo"
|
msgstr "conejo"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:65
|
#: squirrelbattle/tests/translations_test.py:67
|
||||||
msgid "sunflower"
|
msgid "sunflower"
|
||||||
msgstr "girasol"
|
msgstr "girasol"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:66
|
#: squirrelbattle/tests/translations_test.py:68
|
||||||
msgid "teddy bear"
|
msgid "teddy bear"
|
||||||
msgstr "osito de peluche"
|
msgstr "osito de peluche"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:67
|
#: squirrelbattle/tests/translations_test.py:69
|
||||||
msgid "tiger"
|
msgid "tiger"
|
||||||
msgstr "tigre"
|
msgstr "tigre"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:69
|
#: squirrelbattle/tests/translations_test.py:71
|
||||||
msgid "body snatch potion"
|
msgid "body snatch potion"
|
||||||
msgstr "poción de intercambio"
|
msgstr "poción de intercambio"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:70
|
#: squirrelbattle/tests/translations_test.py:72
|
||||||
msgid "bomb"
|
msgid "bomb"
|
||||||
msgstr "bomba"
|
msgstr "bomba"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:71
|
#: squirrelbattle/tests/translations_test.py:73
|
||||||
msgid "explosion"
|
msgid "explosion"
|
||||||
msgstr "explosión"
|
msgstr "explosión"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:72
|
#: squirrelbattle/tests/translations_test.py:74
|
||||||
msgid "heart"
|
msgid "heart"
|
||||||
msgstr "corazón"
|
msgstr "corazón"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:73
|
#: squirrelbattle/tests/translations_test.py:75
|
||||||
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 18:02+0100\n"
|
"POT-Creation-Date: 2021-01-06 14:53+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"
|
||||||
|
@ -17,19 +17,19 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: squirrelbattle/display/menudisplay.py:139
|
#: squirrelbattle/display/menudisplay.py:160
|
||||||
msgid "INVENTORY"
|
msgid "INVENTORY"
|
||||||
msgstr "INVENTAIRE"
|
msgstr "INVENTAIRE"
|
||||||
|
|
||||||
#: squirrelbattle/display/menudisplay.py:164
|
#: squirrelbattle/display/menudisplay.py:202
|
||||||
msgid "STALL"
|
msgid "STALL"
|
||||||
msgstr "STAND"
|
msgstr "STAND"
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:33
|
#: squirrelbattle/display/statsdisplay.py:34
|
||||||
msgid "Inventory:"
|
msgid "Inventory:"
|
||||||
msgstr "Inventaire :"
|
msgstr "Inventaire :"
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:52
|
#: squirrelbattle/display/statsdisplay.py:53
|
||||||
msgid "YOU ARE DEAD"
|
msgid "YOU ARE DEAD"
|
||||||
msgstr "VOUS ÊTES MORT"
|
msgstr "VOUS ÊTES MORT"
|
||||||
|
|
||||||
|
@ -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:205 squirrelbattle/tests/game_test.py:573
|
#: squirrelbattle/game.py:277 squirrelbattle/tests/game_test.py:592
|
||||||
msgid "The buyer does not have enough money"
|
msgid "The buyer does not have enough money"
|
||||||
msgstr "L'acheteur n'a pas assez d'argent"
|
msgstr "L'acheteur n'a pas assez d'argent"
|
||||||
|
|
||||||
#: squirrelbattle/game.py:249
|
#: squirrelbattle/game.py:320
|
||||||
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:257
|
#: squirrelbattle/game.py:328
|
||||||
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:277
|
#: squirrelbattle/game.py:348
|
||||||
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."
|
||||||
|
@ -86,22 +86,22 @@ msgstr ""
|
||||||
"Le fichier JSON de sauvegarde est incorrect.\n"
|
"Le fichier JSON de sauvegarde est incorrect.\n"
|
||||||
"Votre sauvegarde semble corrompue. Elle a été supprimée."
|
"Votre sauvegarde semble corrompue. Elle a été supprimée."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:429
|
#: squirrelbattle/interfaces.py:451
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} hits {opponent}."
|
msgid "{name} hits {opponent}."
|
||||||
msgstr "{name} frappe {opponent}."
|
msgstr "{name} frappe {opponent}."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:441
|
#: squirrelbattle/interfaces.py:463
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} takes {amount} damage."
|
msgid "{name} takes {amount} damage."
|
||||||
msgstr "{name} prend {amount} points de dégât."
|
msgstr "{name} prend {amount} points de dégât."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:443
|
#: squirrelbattle/interfaces.py:465
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} dies."
|
msgid "{name} dies."
|
||||||
msgstr "{name} meurt."
|
msgstr "{name} meurt."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:477
|
#: squirrelbattle/interfaces.py:499
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{entity} said: {message}"
|
msgid "{entity} said: {message}"
|
||||||
msgstr "{entity} a dit : {message}"
|
msgstr "{entity} a dit : {message}"
|
||||||
|
@ -110,8 +110,8 @@ msgstr "{entity} a dit : {message}"
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "Retour"
|
msgstr "Retour"
|
||||||
|
|
||||||
#: squirrelbattle/tests/game_test.py:344 squirrelbattle/tests/game_test.py:347
|
#: squirrelbattle/tests/game_test.py:358 squirrelbattle/tests/game_test.py:361
|
||||||
#: squirrelbattle/tests/game_test.py:350 squirrelbattle/tests/game_test.py:353
|
#: squirrelbattle/tests/game_test.py:364 squirrelbattle/tests/game_test.py:367
|
||||||
#: squirrelbattle/tests/translations_test.py:16
|
#: squirrelbattle/tests/translations_test.py:16
|
||||||
msgid "New game"
|
msgid "New game"
|
||||||
msgstr "Nouvelle partie"
|
msgstr "Nouvelle partie"
|
||||||
|
@ -197,57 +197,61 @@ msgid "Key used to wait"
|
||||||
msgstr "Touche pour attendre"
|
msgstr "Touche pour attendre"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:56
|
#: squirrelbattle/tests/translations_test.py:56
|
||||||
|
msgid "Key used to use ladders"
|
||||||
|
msgstr "Touche pour utiliser les échelles"
|
||||||
|
|
||||||
|
#: squirrelbattle/tests/translations_test.py:58
|
||||||
msgid "Texture pack"
|
msgid "Texture pack"
|
||||||
msgstr "Pack de textures"
|
msgstr "Pack de textures"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:57
|
#: squirrelbattle/tests/translations_test.py:59
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "Langue"
|
msgstr "Langue"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:60
|
#: squirrelbattle/tests/translations_test.py:62
|
||||||
msgid "player"
|
msgid "player"
|
||||||
msgstr "joueur"
|
msgstr "joueur"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:62
|
#: squirrelbattle/tests/translations_test.py:64
|
||||||
msgid "hedgehog"
|
msgid "hedgehog"
|
||||||
msgstr "hérisson"
|
msgstr "hérisson"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:63
|
#: squirrelbattle/tests/translations_test.py:65
|
||||||
msgid "merchant"
|
msgid "merchant"
|
||||||
msgstr "marchand"
|
msgstr "marchand"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:64
|
#: squirrelbattle/tests/translations_test.py:66
|
||||||
msgid "rabbit"
|
msgid "rabbit"
|
||||||
msgstr "lapin"
|
msgstr "lapin"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:65
|
#: squirrelbattle/tests/translations_test.py:67
|
||||||
msgid "sunflower"
|
msgid "sunflower"
|
||||||
msgstr "tournesol"
|
msgstr "tournesol"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:66
|
#: squirrelbattle/tests/translations_test.py:68
|
||||||
msgid "teddy bear"
|
msgid "teddy bear"
|
||||||
msgstr "nounours"
|
msgstr "nounours"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:67
|
#: squirrelbattle/tests/translations_test.py:69
|
||||||
msgid "tiger"
|
msgid "tiger"
|
||||||
msgstr "tigre"
|
msgstr "tigre"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:69
|
#: squirrelbattle/tests/translations_test.py:71
|
||||||
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:70
|
#: squirrelbattle/tests/translations_test.py:72
|
||||||
msgid "bomb"
|
msgid "bomb"
|
||||||
msgstr "bombe"
|
msgstr "bombe"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:71
|
#: squirrelbattle/tests/translations_test.py:73
|
||||||
msgid "explosion"
|
msgid "explosion"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:72
|
#: squirrelbattle/tests/translations_test.py:74
|
||||||
msgid "heart"
|
msgid "heart"
|
||||||
msgstr "cœur"
|
msgstr "cœur"
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:73
|
#: squirrelbattle/tests/translations_test.py:75
|
||||||
msgid "sword"
|
msgid "sword"
|
||||||
msgstr "épée"
|
msgstr "épée"
|
||||||
|
|
|
@ -33,6 +33,7 @@ class Settings:
|
||||||
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.KEY_WAIT = ['w', 'Key used to wait']
|
||||||
|
self.KEY_LADDER = ['<', 'Key used to use ladders']
|
||||||
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']
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,8 @@ class TestTranslations(unittest.TestCase):
|
||||||
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(_("Key used to wait"), "Touche pour attendre")
|
||||||
|
self.assertEqual(_("Key used to use ladders"),
|
||||||
|
"Touche pour utiliser les échelles")
|
||||||
self.assertEqual(_("Texture pack"), "Pack de textures")
|
self.assertEqual(_("Texture pack"), "Pack de textures")
|
||||||
self.assertEqual(_("Language"), "Langue")
|
self.assertEqual(_("Language"), "Langue")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue