Merge branch 'master' into village
This commit is contained in:
commit
d39427f978
@ -170,6 +170,7 @@ class Sword(Weapon) :
|
||||
super().__init__(*args, **kwargs)
|
||||
self.name = "sword"
|
||||
|
||||
|
||||
class BodySnatchPotion(Item):
|
||||
"""
|
||||
The body-snatch potion allows to exchange all characteristics with a random
|
||||
|
@ -140,6 +140,29 @@ class Game:
|
||||
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:
|
||||
"""
|
||||
In the inventory menu, we can interact with items or close the menu.
|
||||
|
@ -349,6 +349,8 @@ class Entity:
|
||||
Rabbit, TeddyBear
|
||||
from squirrelbattle.entities.friendly import Merchant,Sunflower
|
||||
return [BodySnatchPotion, Bomb, Heart, Hedgehog, Rabbit, TeddyBear,Sunflower,Tiger]
|
||||
return [BodySnatchPotion, Bomb, Heart, Hedgehog,
|
||||
Rabbit, TeddyBear, Tiger]
|
||||
|
||||
@staticmethod
|
||||
def get_all_entity_classes_in_a_dict() -> dict:
|
||||
|
@ -9,10 +9,14 @@ msgstr ""
|
||||
"Project-Id-Version: squirrelbattle 3.14.1\n"
|
||||
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
"POT-Creation-Date: 2020-12-01 17:10+0100\n"
|
||||
=======
|
||||
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
||||
>>>>>>> master
|
||||
=======
|
||||
"POT-Creation-Date: 2020-12-05 14:46+0100\n"
|
||||
>>>>>>> master
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -206,7 +210,6 @@ msgstr "Bombe"
|
||||
#: squirrelbattle/tests/translations_test.py:66
|
||||
msgid "heart"
|
||||
msgstr "Herz"
|
||||
<<<<<<< HEAD
|
||||
|
||||
#: squirrelbattle/display/statsdisplay.py:34
|
||||
msgid "Inventory:"
|
||||
@ -266,5 +269,3 @@ msgstr "Blumenmacht!!"
|
||||
#: squirrelbattle/entities/friendly.py:31
|
||||
msgid "The sun is warm today"
|
||||
msgstr "Die Sonne ist warm heute"
|
||||
=======
|
||||
>>>>>>> master
|
||||
|
@ -8,11 +8,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squirrelbattle 3.14.1\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-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"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -33,10 +31,8 @@ msgstr "Inventaire :"
|
||||
msgid "YOU ARE DEAD"
|
||||
msgstr "VOUS ÊTES MORT"
|
||||
|
||||
<<<<<<< HEAD
|
||||
#: squirrelbattle/interfaces.py:394 squirrelbattle/interfaces.py:398
|
||||
#: squirrelbattle/interfaces.py:408
|
||||
=======
|
||||
#. The bomb is exploding.
|
||||
#. Each entity that is close to the bomb takes damages.
|
||||
#. The player earn XP if the entity was killed.
|
||||
@ -74,17 +70,13 @@ msgstr ""
|
||||
"Votre sauvegarde semble corrompue. Elle a été supprimée."
|
||||
|
||||
#: squirrelbattle/interfaces.py:400
|
||||
>>>>>>> master
|
||||
#, python-brace-format
|
||||
msgid "{name} hits {opponent}."
|
||||
msgstr "{name} frappe {opponent}."
|
||||
|
||||
<<<<<<< HEAD
|
||||
#: squirrelbattle/interfaces.py:405 squirrelbattle/interfaces.py:410
|
||||
#: squirrelbattle/interfaces.py:420
|
||||
=======
|
||||
#: squirrelbattle/interfaces.py:412
|
||||
>>>>>>> master
|
||||
#, python-brace-format
|
||||
msgid "{name} takes {amount} damage."
|
||||
msgstr "{name} prend {amount} points de dégât."
|
||||
@ -185,7 +177,6 @@ msgstr "Pack de textures"
|
||||
msgid "Language"
|
||||
msgstr "Langue"
|
||||
|
||||
<<<<<<< HEAD
|
||||
#: squirrelbattle/interfaces.py:407 squirrelbattle/interfaces.py:412
|
||||
#: squirrelbattle/interfaces.py:422
|
||||
#, python-brace-format
|
||||
@ -194,9 +185,7 @@ msgstr "{name} meurt."
|
||||
|
||||
#: squirrelbattle/tests/translations_test.py:47
|
||||
#: squirrelbattle/tests/translations_test.py:49
|
||||
=======
|
||||
#: squirrelbattle/tests/translations_test.py:57
|
||||
>>>>>>> master
|
||||
msgid "player"
|
||||
msgstr "joueur"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user