From cba207f98c089beaee042c8e073ac137d1440fa5 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Wed, 13 May 2020 20:17:32 +0200 Subject: [PATCH] Changed item pickup method --- src/game/EventManager.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/game/EventManager.py b/src/game/EventManager.py index 43b5852..ae851c9 100644 --- a/src/game/EventManager.py +++ b/src/game/EventManager.py @@ -75,15 +75,7 @@ class EventManager: # Picking up items if keys[pygame.K_SPACE]: object = self.game.map.getEntityOnCoord(self.player.getFacingCoord()) - # Picked up item gets removed from the map - if type(object) is Pickupable: - object.on_interaction(self.player) - self.game.screen.ui.updateOnPlayerPickup(self.player.statistics, object) - self.game.map.removeSpriteFromMap(object) - elif type(object) is Interactable: - object.on_interaction(self.player) - self.game.screen.ui.updateOnPlayerInteraction(self.player.statistics, object) - + self.player.move(Movement.PICKUP, object) if keys[pygame.K_w]: if not self.game.map.collision(self.player.getFacingCoord()[0], self.player.getFacingCoord()[1]): self.player.move(Movement.FORWARD)