Player now pays for what he buys and buying a heart does not put it in the inventory. Solves #38 and #36
This commit is contained in:
@ -194,8 +194,10 @@ class Game:
|
||||
if self.store_menu.values and not self.player.dead:
|
||||
if key == KeyValues.ENTER:
|
||||
item = self.store_menu.validate()
|
||||
item.hold(self.player)
|
||||
self.store_menu.merchant.inventory.remove(item)
|
||||
flag = item.be_sold(self.player, self.store_menu.merchant, self)
|
||||
if not flag :
|
||||
self.message = _("You do not have enough money")
|
||||
self.display_actions(DisplayActions.UPDATE)
|
||||
# Ensure that the cursor has a good position
|
||||
self.store_menu.position = min(self.store_menu.position,
|
||||
len(self.store_menu.values) - 1)
|
||||
|
Reference in New Issue
Block a user