World.NpcListChanged not being called when monsters are added
thejcannon opened this issue ยท 2 comments
Describe the bug
Monsters (like slimes) aren't in the Added
list when they are added to the game state. When I enter a new mine level, I would expect to see a list of the added monsters in my callback.
To Reproduce
Log the Name
of each NPC that gets Added
in World.NpcListChanged
. Go to the mine, and see that it doesn't get called for new monsters.
NpcListChanged
is raised when monsters are added/removed in an existing location, but it's not raised for monsters that were already in the location when it was created. That's by design, since the event tracks changes to the NPC list for each location (and nothing changed if they were already there). I can document that more explicitly, but feedback is always welcome if that implementation is confusing.