Improve NPC sound ignoring logic to reduce activity interruptions. #29207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Bugfixes "Improve NPC sound ignoring logic to reduce activity interruptions."
Purpose of change
Couldn't find an existing issue, but have seen people discussing this - when digging a pit or chopping a tree, friendly NPCs will keep whining about the noise, and interrupting your activity.
Describe the solution
I've added a new sound_type - destructive_activity.
new logic is :
allies will not comment or investigate any sound the player produces except for combat / alert noises ( shouting etc )
If the player dosnt see it, and neither does the NPC and it's medium priority or higher sounds ( movement, speech etc ) they will investigate.
Neutral NPCS will investigate and comment on destructive activities the player produces ( drilling, sawing , pickaxing, etc ) but ignore all other activities ( digging, chopping trees ) that the player produces.
They will investigate medium priority or higher sounds they dont see and the player dosnt see.
Hostile NPCs will investigate irrespective of whether the player produced it or not.
This abstracts out the mechanism by which a player might tell neutral or friendly NPCS "dont worry! it was just me making that noise"
Drilling walls with a jackhammer in their base though should still prompt them to be curious.
Describe alternatives you've considered
N/A
Additional context
N/A