forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dialogue conditions: make is_safe work for tiles without monster groups
The dialogue condition is_safe checks whether the overmap terrain tile is_safe(), and that in turn checks if there are any unsafe monster groups on the tile. If a tile has no monster groups (and many don't), the tile is safe. This results is some weirdness when an avatar and an NPC are in hand-to-hand combat with zombies and the NPC is perfectly willing to train the avatar in lockpicking. Add a new "is_safe()" function to talker, talker_npc, and npc, and have the npc version return false if the NPC's ai_cache.total_danger is greater than 0, and then return the union of the tile's is_safe() and the talker's is_safe(). That seems to resolve the issue.
- Loading branch information
1 parent
5f38296
commit e57e97e
Showing
6 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters