ACE3/addons/field_rations/XEH_preInit.sqf
Grim 31e1ad0cff
Arsenal - Add Tools category and moveOnOverwrite parameter to FUNC(addCustomRightPanelButton) (#9247)
* add tools tab and setting

* move to preinit

* fix icon, add restart warning

* derp

Co-authored-by: Dystopian <sddex@ya.ru>

* Update addons/arsenal/stringtable.xml

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* remove setting

* add keepIfOverriden parameter

* docs again

* documentation whitespace

* docs grammar, change parameter name

* fix docs

* more docs fixes

* magazine support

* deprecate spare barrel item

* more docs, improve condition

---------

Co-authored-by: Dystopian <sddex@ya.ru>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-07-21 22:39:48 +03:00

29 lines
891 B
Plaintext

#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.sqf"
#define ARSENAL_CATEGORY_ICON QPATHTOF(ui\icon_survival.paa)
// Init arrays of status modifiers
GVAR(thirstModifiers) = [];
GVAR(hungerModifiers) = [];
private _cache = call (uiNamespace getVariable [QGVAR(cacheP3Ds), {ERROR("no cache")}]); // cache built at preStart
// List of p3d water sources (case sensitive) for objects that report `typeOf == ""`
GVAR(waterSourceP3Ds) = _cache select 0;
// List of refill action offsets corresponding to the p3ds in the array above
GVAR(waterSourceOffsets) = _cache select 1;
// Custom Arsenal Tab
if (["ace_arsenal"] call EFUNC(common,isModLoaded)) then {
[keys FIELD_RATIONS_ITEMS, LLSTRING(DisplayName), ARSENAL_CATEGORY_ICON, -1, true] call EFUNC(arsenal,addRightPanelButton);
};
ADDON = true;