-
Notifications
You must be signed in to change notification settings - Fork 735
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
Arsenal - Fix #9040 bugs/regressions #9293
Conversation
if (_forEachIndex in [4, 5]) then { | ||
_uniqueBaseCfgText = (getText (_cfgMagazines >> _x >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); | ||
_x params ["_magazine"]; | ||
_uniqueBaseCfgText = (getText (_cfgMagazines >> _magazine >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); | ||
|
||
if (_uniqueBaseCfgText != "") then { | ||
_weaponsInfo set [_forEachIndex, _uniqueBaseCfgText]; |
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.
is it a problem that we lose the ammo count?
should this be something like
_weaponsInfo set [_forEachIndex, [_uniqueBaseCfgText, _x # 1]];
``
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.
It still works and refills the magazine. I don't think it's a problem.
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.
Have you tested saving a loadout and reloading it?
I'm have a feeling that this fix can't work, as I had to write this for weapons not in containers. getUnitLoadout
returns weapons in containers in the same format as weapons not in containers, so I presume the code should be the same and I forgot to correct that in #9040.
I'll take a in-depth look tonight.
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.
It's as I thought unfortunately.
I fixed it in #9297.
Makes sense for most use cases. However, if the magazine is unique, do we want that? |
You can already refill unique mags by switching to and from any other magazine anyway. We'd have to keep the magazine's ammo count and restore it if we want consistency. |
When merged this pull request will:
Missed while testing #9040.
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.