diff --git a/src/game/EventManager.py b/src/game/EventManager.py index 7880882..0b5fe7a 100644 --- a/src/game/EventManager.py +++ b/src/game/EventManager.py @@ -106,7 +106,9 @@ class EventManager: if keys[pygame.K_u]: while True: try: - self.player.gotoToTarget(Random().choice(self.game.map.entities), self.game.map) + from src.entities.Interactable import Interactable + self.player.gotoToTarget(Random().choice(self.game.map.getEntitiesByType(Interactable)), + self.game.map) break except IndexError: pass