diff --git a/addons/flags/XEH_preInit.sqf b/addons/flags/XEH_preInit.sqf index e88eaf0efb..255436f8c4 100644 --- a/addons/flags/XEH_preInit.sqf +++ b/addons/flags/XEH_preInit.sqf @@ -6,6 +6,8 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -ADDON = true; +#include "initSettings.sqf" GVAR(flagItemCache) = createHashMap; + +ADDON = true; diff --git a/addons/flags/functions/fnc_addActions.sqf b/addons/flags/functions/fnc_addActions.sqf index 1e9cc19096..17ea7918e0 100644 --- a/addons/flags/functions/fnc_addActions.sqf +++ b/addons/flags/functions/fnc_addActions.sqf @@ -32,7 +32,7 @@ private _actions = []; params ["_player", "", "_item"]; [_player, _item] call FUNC(placeFlag); }, - {true}, + {GVAR(enablePlacing)}, {}, _x ] call EFUNC(interact_menu,createAction), @@ -50,7 +50,7 @@ private _actions = []; params ["_player", "", "_item"]; [_player, _item] call FUNC(carryFlag); }, - {!([_this select 0] call FUNC(carriesFlag))}, // Should not carry flag already + {GVAR(enableCarrying) && {!([_this select 0] call FUNC(carriesFlag))}}, // Should not carry flag already {}, _x ] call EFUNC(interact_menu,createAction), diff --git a/addons/flags/initSettings.sqf b/addons/flags/initSettings.sqf new file mode 100644 index 0000000000..2664644149 --- /dev/null +++ b/addons/flags/initSettings.sqf @@ -0,0 +1,17 @@ +private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(SettingCategory)]; + +[ + QGVAR(enablePlacing), "CHECKBOX", + [LSTRING(AllowPlacingFlags), LSTRING(AllowPlacingFlagsTooltip)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(enableCarrying), "CHECKBOX", + [LSTRING(AllowCarryingFlags), LSTRING(AllowCarryingFlagsTooltip)], + _category, + true, + 0 +] call CBA_fnc_addSetting; diff --git a/addons/flags/stringtable.xml b/addons/flags/stringtable.xml index 2eff8c2036..0752041ceb 100644 --- a/addons/flags/stringtable.xml +++ b/addons/flags/stringtable.xml @@ -1,6 +1,28 @@ + + + Flags + Flaggen + + + Allow placing flags + Erlaube Flaggen zu platzieren + + + Adds the actions to place flags when the corresponding item is in the inventory. + Fügt Aktionen zum Platzieren von Flaggen hinzu, wenn das jeweilige Item im Inventar ist. + + + Allow carrying flags + Erlaube Flaggen zu tragen + + + Adds the actions to carry flags when the corresponding item is in the inventory. + Fügt Aktionen zum Tragen von Flaggen hinzu, wenn das jeweilige Item im Inventar ist. + + Flag (White)