Linting and tests for chests

This commit is contained in:
eichhornchen
2021-01-08 23:32:47 +01:00
parent bdbf214d8d
commit 2eb42668c8
5 changed files with 67 additions and 8 deletions

View File

@ -341,7 +341,7 @@ class Game:
self.display_actions(DisplayActions.UPDATE)
# Ensure that the cursor has a good position
menu.position = min(menu.position, len(menu.values) - 1)
def handle_key_pressed_chest(self, key: KeyValues) -> None:
"""
In a chest menu, we can take or put items or close the menu.
@ -367,7 +367,7 @@ class Game:
else self.player
buyer = self.player if self.is_in_chest_menu \
else self.chest_menu.chest
flag = item.be_sold(buyer, owner, for_free = True)
item.be_sold(buyer, owner, for_free=True)
self.display_actions(DisplayActions.UPDATE)
# Ensure that the cursor has a good position
menu.position = min(menu.position, len(menu.values) - 1)