ACE3/addons/intelitems/XEH_postInit.sqf
johnb432 1dae884fff
General - Add replacement items for editor inventory management (#10216)
Add replacement items for editor inventory management
2024-08-21 22:48:36 -05:00

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;