mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add setting to hide place or carry actions
This commit is contained in:
parent
8a78b1b62e
commit
37cd98a4ee
@ -6,6 +6,8 @@ PREP_RECOMPILE_START;
|
|||||||
#include "XEH_PREP.hpp"
|
#include "XEH_PREP.hpp"
|
||||||
PREP_RECOMPILE_END;
|
PREP_RECOMPILE_END;
|
||||||
|
|
||||||
ADDON = true;
|
#include "initSettings.sqf"
|
||||||
|
|
||||||
GVAR(flagItemCache) = createHashMap;
|
GVAR(flagItemCache) = createHashMap;
|
||||||
|
|
||||||
|
ADDON = true;
|
||||||
|
@ -32,7 +32,7 @@ private _actions = [];
|
|||||||
params ["_player", "", "_item"];
|
params ["_player", "", "_item"];
|
||||||
[_player, _item] call FUNC(placeFlag);
|
[_player, _item] call FUNC(placeFlag);
|
||||||
},
|
},
|
||||||
{true},
|
{GVAR(enablePlacing)},
|
||||||
{},
|
{},
|
||||||
_x
|
_x
|
||||||
] call EFUNC(interact_menu,createAction),
|
] call EFUNC(interact_menu,createAction),
|
||||||
@ -50,7 +50,7 @@ private _actions = [];
|
|||||||
params ["_player", "", "_item"];
|
params ["_player", "", "_item"];
|
||||||
[_player, _item] call FUNC(carryFlag);
|
[_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
|
_x
|
||||||
] call EFUNC(interact_menu,createAction),
|
] call EFUNC(interact_menu,createAction),
|
||||||
|
17
addons/flags/initSettings.sqf
Normal file
17
addons/flags/initSettings.sqf
Normal file
@ -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;
|
@ -1,6 +1,28 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Flags">
|
<Package name="Flags">
|
||||||
|
<Container name="settings">
|
||||||
|
<Key ID="STR_ACE_Flags_SettingCategory">
|
||||||
|
<English>Flags</English>
|
||||||
|
<German>Flaggen</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Flags_AllowPlacingFlags">
|
||||||
|
<English>Allow placing flags</English>
|
||||||
|
<German>Erlaube Flaggen zu platzieren</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Flags_AllowPlacingFlagsTooltip">
|
||||||
|
<English>Adds the actions to place flags when the corresponding item is in the inventory.</English>
|
||||||
|
<German>Fügt Aktionen zum Platzieren von Flaggen hinzu, wenn das jeweilige Item im Inventar ist.</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Flags_AllowCarryingFlags">
|
||||||
|
<English>Allow carrying flags</English>
|
||||||
|
<German>Erlaube Flaggen zu tragen</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Flags_AllowCarryingFlagsTooltip">
|
||||||
|
<English>Adds the actions to carry flags when the corresponding item is in the inventory.</English>
|
||||||
|
<German>Fügt Aktionen zum Tragen von Flaggen hinzu, wenn das jeweilige Item im Inventar ist.</German>
|
||||||
|
</Key>
|
||||||
|
</Container>
|
||||||
<Container name="displayNames">
|
<Container name="displayNames">
|
||||||
<Key ID="STR_ACE_Flags_White">
|
<Key ID="STR_ACE_Flags_White">
|
||||||
<Original>Flag (White)</Original>
|
<Original>Flag (White)</Original>
|
||||||
|
Loading…
Reference in New Issue
Block a user