When an item is bought, remove it from the merchant inventory. Fixes #37
This commit is contained in:
		@@ -193,7 +193,9 @@ class Game:
 | 
			
		||||
            self.store_menu.go_down()
 | 
			
		||||
        if self.store_menu.values and not self.player.dead:
 | 
			
		||||
            if key == KeyValues.ENTER:
 | 
			
		||||
                self.player.add_to_inventory(self.store_menu.validate())
 | 
			
		||||
                item = self.store_menu.validate()
 | 
			
		||||
                self.player.add_to_inventory(item)
 | 
			
		||||
                self.store_menu.merchant.inventory.remove(item)
 | 
			
		||||
            # 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