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

Fire action accounts for all kinds of shoulder straps #78744

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewhr
Copy link
Contributor

Summary

Bugfixes "Fire action works with all shoulder straps"

Purpose of change

I've noticed only "adjustable strap" works with the fire action to drawn weapon, and only with default format (hanging like backpack). Happens that code checks for that specific item ID.

Describe the solution

Check for any BELTED gunmod, assuming straps will make the weapon "BELTED".

Describe alternatives you've considered

  • Keep checking by item ID, and include the missing ones (that approach is fragile and not extensible).
  • Create a new flag.

Testing

Boot game, wear weapon and invoke fire action. Modify attachment to (front), wear and invoke fire action again.

Additional context

@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Dec 23, 2024
@GuardianDll
Copy link
Member

GuardianDll commented Jan 9, 2025

monster_throwing_sanity_test do not pass very consistenty for a random error, do you happen to know can your PR affect it somehow?
https://github.com/CleverRaven/Cataclysm-DDA/actions/runs/12472899435/job/35311930526?pr=78744

I've noticed only "adjustable strap" works with the fire action to drawn
weapon, and only with default format (hanging like backpack). Happens
that code checks for that specific item. Solution is to check for a flag
instead, and so works with all kinds of attachments
@andrewhr andrewhr force-pushed the fix-shoulder-strap-fire-action branch from 10210a2 to 3567abe Compare January 10, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants