Fixing item pickup action after completing the movement

This commit is contained in:
Marcin Kostrzewski 2020-05-13 19:47:53 +02:00
parent a51661ae6e
commit effa48d7c3

View File

@ -156,9 +156,11 @@ class Entity(pygame.sprite.Sprite):
if self.move(nextMove): if self.move(nextMove):
self.movesList.remove(nextMove) self.movesList.remove(nextMove)
if not self.movesList: if not self.movesList:
# if self.canPickup: # Attempt to interact with the target.
# self.pickUp() try:
# self.canPickup = False self.movementTarget.on_interaction(self)
except AttributeError:
pass
self.movementTarget = None self.movementTarget = None
def update(self): def update(self):