mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
interaction: cba keybinds
This commit is contained in:
parent
47e8282d98
commit
dc55ea517e
@ -16,6 +16,85 @@ GVAR(isOpeningDoor) = false;
|
||||
|
||||
|
||||
// Add keybinds
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenu",
|
||||
{
|
||||
systemChat "A";
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
systemChat "B";
|
||||
// Conditions: specific
|
||||
if !(isNull (findDisplay 1713999)) exitWith {false};
|
||||
systemChat "C";
|
||||
|
||||
// Statement
|
||||
call FUNC(onButtonDown);
|
||||
true
|
||||
},
|
||||
[219, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenu",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
|
||||
|
||||
|
||||
// Statement
|
||||
if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)};
|
||||
true
|
||||
},
|
||||
[219, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenuSelf",
|
||||
{
|
||||
systemChat "A";
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming", "ACE_Common_notOnMap"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
systemChat "B";
|
||||
// Conditions: specific
|
||||
if !(isNull (findDisplay 1713999)) exitWith {false};
|
||||
systemChat "C";
|
||||
// Statement
|
||||
call FUNC(onButtonDownSelf);
|
||||
true
|
||||
},
|
||||
[219, [false, true, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenuSelf",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
|
||||
|
||||
|
||||
// Statement
|
||||
if (GVAR(MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};
|
||||
true
|
||||
},
|
||||
[219, [false, true, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
|
@ -18,33 +18,6 @@ class CfgPatches {
|
||||
|
||||
#include <Menu_Config.hpp>
|
||||
|
||||
class ACE_Default_Keys {
|
||||
class openInteractionMenuNew {
|
||||
displayName = "$STR_ACE_Interaction_InteractionMenu";
|
||||
condition = "true";
|
||||
statement = QUOTE(call FUNC(onButtonDown));
|
||||
conditionUp = QUOTE(!isNull (findDisplay 1713999) && {profileNamespace getVariable [ARR_2(QUOTE(QGVAR(AutoCloseMenu)), false)]});
|
||||
statementUp = QUOTE(if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)};);
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"};
|
||||
key = 219;
|
||||
shift = 0;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
class openInteractionMenuSelfNew {
|
||||
displayName = "$STR_ACE_Interaction_InteractionMenuSelf";
|
||||
condition = "true";
|
||||
statement = QUOTE(call FUNC(onButtonDownSelf));
|
||||
conditionUp = QUOTE(!isNull (findDisplay 1713999) && {profileNamespace getVariable [ARR_2(QUOTE(QGVAR(AutoCloseMenu)), false)]});
|
||||
statementUp = QUOTE(if (EGVAR(interaction,MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};);
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming", "ACE_Common_notOnMap"};
|
||||
key = 219;
|
||||
shift = 0;
|
||||
control = 1;
|
||||
alt = 0;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Options {
|
||||
class Interaction_FlowMenu {
|
||||
displayName = "$STR_ACE_Interaction_FlowMenu";
|
||||
|
Loading…
Reference in New Issue
Block a user