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 - Add init/remove local events to Arsenal creation/destruction #9064

Merged
merged 8 commits into from
Oct 22, 2022
2 changes: 2 additions & 0 deletions addons/arsenal/functions/fnc_initBox.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@ if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0})
[_object, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject);

[_object, _items, false] call FUNC(addVirtualItems);

[QGVAR(boxInitialized), [_object, _items]] call CBA_fnc_localEvent;
};
};
3 changes: 2 additions & 1 deletion addons/arsenal/functions/fnc_removeBox.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if (_global && {isMultiplayer}) then {
[QGVAR(removeBox), [_object, false]] call CBA_fnc_globalEvent;
};
} else {
_object setVariable [QGVAR(virtualItems), nil, false];
_object setVariable [QGVAR(virtualItems), nil, false];
[_object, 0, ["ACE_MainActions", QGVAR(interaction)]] call EFUNC(interact_menu,removeActionFromObject);
[QGVAR(boxRemoved), _object] call CBA_fnc_localEvent;
};
2 changes: 2 additions & 0 deletions docs/wiki/framework/arsenal-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ All are local.

| Name | Arguments | Added in |
| ------------- | ------------- | ------------- |
| ace_arsenal_boxInitialized | Arsenal box (OBJECT), items (BOOL or ARRAY) |
| ace_arsenal_boxRemoved | Arsenal box (OBJECT) |
| ace_arsenal_displayOpened | Arsenal display (DISPLAY) |
| ace_arsenal_displayClosed | None |
| ace_arsenal_leftPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) |
Expand Down