mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Add init/remove local events to Arsenal creation/destruction (#9064)
* Added two local events to arsenal * onInitArsenal fired when Arsenal got initiated * onRemoveArsenal fired when Arsenal got removed * added them to the arsenal event listing in the docs * Update addons/arsenal/functions/fnc_removeBox.sqf Co-authored-by: BrettMayson <brett@mayson.io> * Update addons/arsenal/functions/fnc_removeBox.sqf Co-authored-by: BrettMayson <brett@mayson.io> * Renamed events in accordance with event naming patterns sans "on" * Apply suggestions from code review Co-authored-by: BrettMayson <brett@mayson.io> * Improved Docs Co-authored-by: BrettMayson <brett@mayson.io>
This commit is contained in:
parent
1208f7a2ce
commit
95a5fb040a
@ -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;
|
||||
};
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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) |
|
||||
|
Loading…
Reference in New Issue
Block a user