-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Implement integral magazines as magazine items #32331
Conversation
item::is_reloadable_helper should only be checking whether the itype_id it is given can be reloaded into the specific item it is called from and not any items in that item's contents. As integral magazines are now separate items to the items they provide ammo for, the only reloadable item types are now watertight containers and magazines, as well as items that can be reloaded with detachable magazines. item::is_reloadable_helper now handles these three cases.
A speedloader may be used to reload an item if some conditions are met. - The item being loaded must be a magazine. - The item being loaded must be empty. - The item being loaded must list the speedloader in its clips array. Usual conditions of ammo availability etc apply.
Excited for this since as you'd mentioned on discord, this should let many guns fire without magazines (emulating the chamber) |
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/pressure-for-pneumatic-weapons/21289/13 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it |
Is this thing dead for good, superseded by another solution, or just on hold? Seems like it will take forever to work through all of the conflicts that accumulated over half a year. |
I intend to get back on it but I couldn't say when. Having done this once I'll probably go from scratch and do some things differently. |
Summary
SUMMARY: Infrastructure "Reimplement integral magazines as MAGAZINE items"
Purpose of change
Several areas of code can be simplified if they only have to consider magazines as ammo sources.
Part of #32227.
Describe the solution
Integral magazine loadables are defined for an object as described in #32227. While new code in this branch is written to support more than one magazine, most of the existing code is not so until all relevant code is updated no more than one integral magazine should be defined per item. There should be no significant player visible changes from this PR.
item::info
to display information appropriately for integral magazinesRELOAD_ONE
for magazinesSTR_RELOAD
andRELOAD_EJECT
work with integral magazine items