Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for bionic weaponry #1227

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

chaosvolt
Copy link
Member

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

  1. Added the 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.
  2. Removed the 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

  1. Checked affected files for syntax and load errors.
  2. Tested that bionic weapons still wield, deactivate, commit their use_action, and fire (in the case of ranged weapons) with the NO_DROP flag.
  3. Tested to confirm that killing someone with a bionic melee weapon equipped has it clean up properly.
  4. Confirmed that you can't try to install Chain Lightning on an NPC in the autodoc without it having 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.

@Coolthulhu Coolthulhu self-assigned this Jan 5, 2022
@Coolthulhu Coolthulhu merged commit af9f1fd into cataclysmbnteam:upload Jan 5, 2022
@chaosvolt chaosvolt deleted the cbm-fixes-go-nyoom branch January 5, 2022 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPCs will drop bionic weapons if slain
2 participants