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 "Fix bionic weapons not cleaning up on NPC death, prevent installing buggy ranged weapons on NPCs"
Purpose of change
Some basic fixes to CBM stuff per recent discussion.
Describe the solution
NO_DROP
to all psuedo-items used as bionic weapons and bionic guns, ensuring they're erased as expected if someone dies with them active.BIONIC_NPC_USABLE
flag from bionic ranged weapons, avoiding the related issue found during testing where an NPC will treat bionic guns like bionic melee weapons.Describe alternatives you've considered
If anyone can confirm if ranged CBMs are working for NPCs in DDA, and can find a particular PR that fixes it, link me and I can see about doing that instead of point two.
Right now I can't even confirm if DDA NPCs can properly select bionic weapons at all, as I couldn't get them to even try equipping Chain Lightning if given the option, and debug-deleting their inventory causes hostile DDA NPCs to stop trying to kill you in favor of standing in place ignoring you. So they're a mite broken compared to BN right now.
Testing
NO_DROP
flag.BIONIC_NPC_USABLE
.Additional context
Fixes #1218
As noted though, this doesn't fix whatever weirdness is causing NPCs to try and treat bionic ranged weapons like bionic melee weapons, just prevents the player from running into it in vanilla.