-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add Ability to Edit a Weapon's Loaded Magazine(s) in the Limited Arsenal #433
Add Ability to Edit a Weapon's Loaded Magazine(s) in the Limited Arsenal #433
Conversation
Initial implementation only kinda works. Can't set empty mag; doesn't give ammo back to arsenal when selection changed; doesn't seem to work (for reason unknown) when weapon changed.
weapon, handgun. Still has issues with adding ammo back to arsenal, removing loaded mag
…T AI arsenel to feature same functionality.
That's reeeeeeeeelly cool, I just hope it won't merge conflict with #396 |
From a quick look, that doesn't touch any of the same functions I did. Should merge just fine. |
Published (unlisted) to Steam workshop as an extender for easy testing: https://steamcommunity.com/sharedfiles/filedetails/?id=3400474022 |
Looks fine, is nice and simple to use from some quick testing with vanilla I did get an error after selecting a secondary muzzle 40mm HE grenade for the AK-15 GL, though it still worked and selected a grenade 14:43:54 Error in expression <;
private _min = jna_minItemMember select _index;
_min = A3A_arsenalLimits >
14:43:54 Error position: <select _index;
_min = A3A_arsenalLimits >
14:43:54 Error Zero divisor
14:43:54 File x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf..., line 146
14:43:54 ➥ Context: [] L1 ()
[] L184 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L1044 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L184 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L1320 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L1321 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L184 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L1589 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf)
[] L151 (x\A3A\addons\jeroen_arsenal\JNA\fn_arsenal.sqf) |
Fixed. Incidentally, this fix also makes the items you don't have unlimited quantity of yellow text like in the other item tabs, something I wasn't able to figure out before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think considering more muzzles is a necessity, even if you can add more the vanilla arsenal wouldn't be able to support it either.
LGTM
This hasn't been merged due to a conflict with (i'm assuming) #396 |
Almost certainly 396. Should just be a couple spots where I fixed indentation. Will fix (rebase / merge unstable into this pr) when I get home. |
@SilenceIsFatto should be good now |
What type of PR is this?
What have you changed and why?
Information:
Adds ability to edit weapons' loaded magazines (main magazine and underbarrel / alternate muzzle magazine, if applicable) within the arsenal, similar to ACE3 arsenal and POLPOX's Enhanced Arsenal.
Works for both the main player arsenal and the AI loadout arsenal.
Two primary benefits :
Does not use any ACE3 or Enhanced Arsenal code.
Please specify which Issue this PR Resolves (If Applicable).
"This PR closes #387!"
Please verify the following.
Is further testing or are further changes required?
As with my last PR, needs some testing across all supported factions / weapons / modsets. None of the code should be mod-specific, but there may be edge cases either not considered or not implemented. Also see Notes:.
How can the changes be tested?
Steps:
Try out the new and improved arsenal?
Notes:
Editing the loaded magazine for secondary muzzles is currently hardcoded to only consider one non-primary muzzle. I'm not sure if any supported weapons have multiple additional muzzles, and if they do how this would be implemented without adding a bunch of additional tabs. Additionally, it's hardcoded to add / remove only one 'ammo' from the muzzle magazine (I was thinking of single shot grenade launchers as the primary / only use case). The only thing I can think of where this could be an issue is if there's a mod that add underbarrel shotguns or other multi-shot weapons, for which we'd need to add / remove an appropriate amount of ammo for those. Easy to do, just not sure if it's needed or not.
Lastly, @wersal454 was right. Arsenal code is a ****ing *****