mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Setting For Gestures - Fix BI* gestures
This commit is contained in:
parent
0599b35fc6
commit
3d560108a3
11
addons/gestures/ACE_Settings.hpp
Normal file
11
addons/gestures/ACE_Settings.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(showOnInteractionMenu) {
|
||||
value = 2;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 1;
|
||||
category = ECSTRING(interact_menu,Category_InteractionMenu);
|
||||
displayName = CSTRING(showOnInteractionMenu_displayName);
|
||||
description = CSTRING(showOnInteractionMenu_description);
|
||||
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(justKeybinds), CSTRING(keysAndInteractionMenu)};
|
||||
};
|
||||
};
|
@ -5,7 +5,7 @@ class CfgVehicles {
|
||||
class ACE_SelfActions {
|
||||
class ADDON {
|
||||
displayName = CSTRING(Gestures);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
condition = QUOTE((canStand _target) && GVAR(ReloadMutex) && {GVAR(showOnInteractionMenu) == 2});
|
||||
statement = "";
|
||||
showDisabled = 1;
|
||||
priority = 3.5;
|
||||
|
@ -12,6 +12,7 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgMovesBasic.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -18,10 +18,14 @@
|
||||
TRACE_1("params",_this);
|
||||
|
||||
if (!GVAR(ReloadMutex)) exitWith {false};
|
||||
if (GVAR(showOnInteractionMenu) == 0) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
private _gesture = if (_this select [0,2] == "BI") then {
|
||||
private _gesture = if ((_this select [0,2]) == "BI") then {
|
||||
//If it starts with BI, just strip off the leading BI and use it directly
|
||||
_this select [2]
|
||||
} else {
|
||||
//Adjust gesture based on stance:
|
||||
if (((animationState ACE_player) select [0, 12]) in ["amovpercmstp", "amovpercmwlk", "amovpercmtac"] && weaponLowered ACE_player) then {
|
||||
format ["%1StandLowered", _this]
|
||||
} else {
|
||||
@ -29,5 +33,6 @@ private _gesture = if (_this select [0,2] == "BI") then {
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("playing gesture",_gesture);
|
||||
ACE_player playAction _gesture;
|
||||
true
|
||||
|
@ -3,11 +3,15 @@
|
||||
{
|
||||
_x params ["_currentName","_key"];
|
||||
|
||||
if (_currentName select [0,1] == "BI") then {
|
||||
_currentName = _currentName select [2];
|
||||
private _signalName = format [QGVAR(%1), _currentName];
|
||||
if (_currentName select [0,2] == "BI") then {
|
||||
//Don't add "ace_gestures_" prefix to BI gestures
|
||||
_signalName = _currentName;
|
||||
};
|
||||
|
||||
private _code = (compile format [QUOTE(QUOTE(QGVAR(%1)) call FUNC(playSignal);), _currentName]);
|
||||
private _code = (compile format [QUOTE('%1' call FUNC(playSignal);), _signalName]);
|
||||
|
||||
TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key);
|
||||
|
||||
[
|
||||
"ACE3 Gestures",
|
||||
|
@ -194,5 +194,17 @@
|
||||
<Portuguese>Atacar</Portuguese>
|
||||
<Italian>Attaccare</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_showOnInteractionMenu_displayName">
|
||||
<English>Show Gestures On Interaction Menu</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_showOnInteractionMenu_description">
|
||||
<English>Show the gestures on the self interaction menu, or just keybinds, or disable completely</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_justKeybinds">
|
||||
<English>Just Keybinds</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_keysAndInteractionMenu">
|
||||
<English>KeyBinds + Interaction Menu</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user