Friendly entities can now talk to the player, a sunflower entity was added to test this new feature. Related to issue #22

This commit is contained in:
eichhornchen
2020-11-27 18:35:52 +01:00
parent d987e60006
commit fbd9f0045b
5 changed files with 39 additions and 8 deletions

View File

@@ -80,6 +80,8 @@ class Player(FightingEntity):
return True
elif entity.is_item():
entity.hold(self)
elif entity.is_friendly():
self.map.logs.add_message(entity.talk_to(self))
return super().check_move(y, x, move_if_possible)
def recalculate_paths(self, max_distance: int = 8) -> None: