mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
1dae884fff
Add replacement items for editor inventory management
17 lines
556 B
Plaintext
17 lines
556 B
Plaintext
#include "script_component.hpp"
|
|
|
|
// Notepad item to magazine
|
|
[QGVAR(notepad_Item), QXGVAR(notepad)] call EFUNC(common,registerItemReplacement);
|
|
|
|
// Only handle loadout change when on map or have open controls
|
|
["loadout", {
|
|
if (!visibleMap && {GVAR(controlsGroups) isEqualTo []}) exitWith {};
|
|
call FUNC(handleLoadout);
|
|
}, true] call CBA_fnc_addPlayerEventHandler;
|
|
|
|
// Check loadout when map is opened
|
|
["visibleMap", {
|
|
params ["", "_visibleMap"];
|
|
if (_visibleMap) then {call FUNC(handleLoadout)};
|
|
}, true] call CBA_fnc_addPlayerEventHandler;
|