Merge branch 'master' into village
This commit is contained in:
commit
d39427f978
|
@ -170,6 +170,7 @@ class Sword(Weapon) :
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.name = "sword"
|
self.name = "sword"
|
||||||
|
|
||||||
|
|
||||||
class BodySnatchPotion(Item):
|
class BodySnatchPotion(Item):
|
||||||
"""
|
"""
|
||||||
The body-snatch potion allows to exchange all characteristics with a random
|
The body-snatch potion allows to exchange all characteristics with a random
|
||||||
|
|
|
@ -140,6 +140,29 @@ class Game:
|
||||||
self.state = GameMode.STORE
|
self.state = GameMode.STORE
|
||||||
|
|
||||||
|
|
||||||
|
def handle_key_pressed_inventory(self, key: KeyValues) -> None:
|
||||||
|
"""
|
||||||
|
In the inventory menu, we can interact with items or close the menu.
|
||||||
|
"""
|
||||||
|
if key == KeyValues.SPACE or key == KeyValues.INVENTORY:
|
||||||
|
self.state = GameMode.PLAY
|
||||||
|
elif key == KeyValues.UP:
|
||||||
|
self.inventory_menu.go_up()
|
||||||
|
elif key == KeyValues.DOWN:
|
||||||
|
self.inventory_menu.go_down()
|
||||||
|
if self.inventory_menu.values and not self.player.dead:
|
||||||
|
if key == KeyValues.USE:
|
||||||
|
self.inventory_menu.validate().use()
|
||||||
|
elif key == KeyValues.EQUIP:
|
||||||
|
self.inventory_menu.validate().equip()
|
||||||
|
elif key == KeyValues.DROP:
|
||||||
|
self.inventory_menu.validate().drop()
|
||||||
|
|
||||||
|
# Ensure that the cursor has a good position
|
||||||
|
self.inventory_menu.position = min(self.inventory_menu.position,
|
||||||
|
len(self.inventory_menu.values)
|
||||||
|
- 1)
|
||||||
|
|
||||||
def handle_key_pressed_inventory(self, key: KeyValues) -> None:
|
def handle_key_pressed_inventory(self, key: KeyValues) -> None:
|
||||||
"""
|
"""
|
||||||
In the inventory menu, we can interact with items or close the menu.
|
In the inventory menu, we can interact with items or close the menu.
|
||||||
|
|
|
@ -349,6 +349,8 @@ class Entity:
|
||||||
Rabbit, TeddyBear
|
Rabbit, TeddyBear
|
||||||
from squirrelbattle.entities.friendly import Merchant,Sunflower
|
from squirrelbattle.entities.friendly import Merchant,Sunflower
|
||||||
return [BodySnatchPotion, Bomb, Heart, Hedgehog, Rabbit, TeddyBear,Sunflower,Tiger]
|
return [BodySnatchPotion, Bomb, Heart, Hedgehog, Rabbit, TeddyBear,Sunflower,Tiger]
|
||||||
|
return [BodySnatchPotion, Bomb, Heart, Hedgehog,
|
||||||
|
Rabbit, TeddyBear, Tiger]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_all_entity_classes_in_a_dict() -> dict:
|
def get_all_entity_classes_in_a_dict() -> dict:
|
||||||
|
|
|
@ -9,10 +9,14 @@ 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"
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
"POT-Creation-Date: 2020-12-01 17:10+0100\n"
|
"POT-Creation-Date: 2020-12-01 17:10+0100\n"
|
||||||
=======
|
=======
|
||||||
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
||||||
>>>>>>> master
|
>>>>>>> master
|
||||||
|
=======
|
||||||
|
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
||||||
|
>>>>>>> master
|
||||||
"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"
|
||||||
|
@ -206,7 +210,6 @@ msgstr "Bombe"
|
||||||
#: squirrelbattle/tests/translations_test.py:66
|
#: squirrelbattle/tests/translations_test.py:66
|
||||||
msgid "heart"
|
msgid "heart"
|
||||||
msgstr "Herz"
|
msgstr "Herz"
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
#: squirrelbattle/display/statsdisplay.py:34
|
#: squirrelbattle/display/statsdisplay.py:34
|
||||||
msgid "Inventory:"
|
msgid "Inventory:"
|
||||||
|
@ -266,5 +269,3 @@ msgstr "Blumenmacht!!"
|
||||||
#: squirrelbattle/entities/friendly.py:31
|
#: squirrelbattle/entities/friendly.py:31
|
||||||
msgid "The sun is warm today"
|
msgid "The sun is warm today"
|
||||||
msgstr "Die Sonne ist warm heute"
|
msgstr "Die Sonne ist warm heute"
|
||||||
=======
|
|
||||||
>>>>>>> master
|
|
||||||
|
|
|
@ -8,11 +8,9 @@ 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"
|
||||||
<<<<<<< HEAD
|
|
||||||
"POT-Creation-Date: 2020-12-01 17:10+0100\n"
|
"POT-Creation-Date: 2020-12-01 17:10+0100\n"
|
||||||
=======
|
|
||||||
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
||||||
>>>>>>> master
|
"POT-Creation-Date: 2020-12-05 14:46+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"
|
||||||
|
@ -33,10 +31,8 @@ msgstr "Inventaire :"
|
||||||
msgid "YOU ARE DEAD"
|
msgid "YOU ARE DEAD"
|
||||||
msgstr "VOUS ÊTES MORT"
|
msgstr "VOUS ÊTES MORT"
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#: squirrelbattle/interfaces.py:394 squirrelbattle/interfaces.py:398
|
#: squirrelbattle/interfaces.py:394 squirrelbattle/interfaces.py:398
|
||||||
#: squirrelbattle/interfaces.py:408
|
#: squirrelbattle/interfaces.py:408
|
||||||
=======
|
|
||||||
#. The bomb is exploding.
|
#. The bomb is exploding.
|
||||||
#. Each entity that is close to the bomb takes damages.
|
#. Each entity that is close to the bomb takes damages.
|
||||||
#. The player earn XP if the entity was killed.
|
#. The player earn XP if the entity was killed.
|
||||||
|
@ -74,17 +70,13 @@ msgstr ""
|
||||||
"Votre sauvegarde semble corrompue. Elle a été supprimée."
|
"Votre sauvegarde semble corrompue. Elle a été supprimée."
|
||||||
|
|
||||||
#: squirrelbattle/interfaces.py:400
|
#: squirrelbattle/interfaces.py:400
|
||||||
>>>>>>> master
|
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{name} hits {opponent}."
|
msgid "{name} hits {opponent}."
|
||||||
msgstr "{name} frappe {opponent}."
|
msgstr "{name} frappe {opponent}."
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#: squirrelbattle/interfaces.py:405 squirrelbattle/interfaces.py:410
|
#: squirrelbattle/interfaces.py:405 squirrelbattle/interfaces.py:410
|
||||||
#: squirrelbattle/interfaces.py:420
|
#: squirrelbattle/interfaces.py:420
|
||||||
=======
|
|
||||||
#: squirrelbattle/interfaces.py:412
|
#: squirrelbattle/interfaces.py:412
|
||||||
>>>>>>> master
|
|
||||||
#, 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."
|
||||||
|
@ -185,7 +177,6 @@ msgstr "Pack de textures"
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "Langue"
|
msgstr "Langue"
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#: squirrelbattle/interfaces.py:407 squirrelbattle/interfaces.py:412
|
#: squirrelbattle/interfaces.py:407 squirrelbattle/interfaces.py:412
|
||||||
#: squirrelbattle/interfaces.py:422
|
#: squirrelbattle/interfaces.py:422
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
|
@ -194,9 +185,7 @@ msgstr "{name} meurt."
|
||||||
|
|
||||||
#: squirrelbattle/tests/translations_test.py:47
|
#: squirrelbattle/tests/translations_test.py:47
|
||||||
#: squirrelbattle/tests/translations_test.py:49
|
#: squirrelbattle/tests/translations_test.py:49
|
||||||
=======
|
|
||||||
#: squirrelbattle/tests/translations_test.py:57
|
#: squirrelbattle/tests/translations_test.py:57
|
||||||
>>>>>>> master
|
|
||||||
msgid "player"
|
msgid "player"
|
||||||
msgstr "joueur"
|
msgstr "joueur"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue