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

Arsenal - Changes for CBA Disposable hashs #9998

Merged
merged 3 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion addons/arsenal/functions/fnc_onSelChangedRight.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ switch (_currentItemsIndex) do {
// Secondary weapon
case IDX_CURR_SECONDARY_WEAPON_ITEMS: {
private _currentItemInSlot = (GVAR(currentItems) select IDX_CURR_SECONDARY_WEAPON_ITEMS) select _itemIndex;
private _isDisposable = CBA_disposable_replaceDisposableLauncher && {!isNil {CBA_disposable_loadedLaunchers getVariable (secondaryWeapon GVAR(center))}};
private _isDisposable = CBA_disposable_replaceDisposableLauncher && {!isNil "CBA_disposable_loadedLaunchers"} &&
{
if (typeName CBA_disposable_loadedLaunchers == "HASHMAP") then { // after cba 3.18
PabstMirror marked this conversation as resolved.
Show resolved Hide resolved
(secondaryWeapon GVAR(center)) in CBA_disposable_loadedLaunchers
} else {
(secondaryWeapon GVAR(center)) in allVariables CBA_disposable_loadedLaunchers
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
}
};

// If removal
if (_item == "") then {
Expand Down