Finish keybind conversion for old interact

This commit is contained in:
PabstMirror 2015-03-10 12:47:58 -05:00
parent 7173037cb0
commit 1dd270812d
2 changed files with 12 additions and 45 deletions

View File

@ -22,37 +22,22 @@ GVAR(isOpeningDoor) = false;
_exceptions = []; _exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false}; if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific // Conditions: specific
if !(!GVAR(isOpeningDoor) && if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
{[2] call FUNC(getDoor) select 1 != ''}
) exitWith {false};
// Statement // Statement
call EFUNC(interaction,openDoor); call EFUNC(interaction,openDoor);
true true
}, },
{},
[57, [false, true, false]], false] call cba_fnc_addKeybind;
["ACE3",
localize "STR_ACE_Interaction_OpenDoor",
{ {
// Conditions: canInteract //Probably don't want any condidtions here, so variable never gets locked down
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(GVAR(isOpeningDoor)) exitWith {false};
// Statement // Statement
GVAR(isOpeningDoor) = false; GVAR(isOpeningDoor) = false;
true true
}, },
[57, [false, true, false]], [57, [false, true, false]], false] call cba_fnc_addKeybind; //Key CTRL+Space
false,
"keyup"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_Interaction_TapShoulder", ["ACE3", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder",
{ {
// Conditions: canInteract // Conditions: canInteract
_exceptions = []; _exceptions = [];
@ -64,13 +49,10 @@ localize "STR_ACE_Interaction_TapShoulder",
[ACE_player, cursorTarget] call FUNC(tapShoulder); [ACE_player, cursorTarget] call FUNC(tapShoulder);
true true
}, },
[20, [true, false, false]], {false},
false, [20, [true, false, false]], false] call cba_fnc_addKeybind;
"keydown"
] call cba_fnc_registerKeybind;
["ACE3", ["ACE3", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey",
localize "STR_ACE_Interaction_ModifierKey",
{ {
// Conditions: canInteract // Conditions: canInteract
_exceptions = ["ACE_Drag_isNotDragging"]; _exceptions = ["ACE_Drag_isNotDragging"];
@ -81,24 +63,9 @@ localize "STR_ACE_Interaction_ModifierKey",
// Return false so it doesn't block other actions // Return false so it doesn't block other actions
false false
}, },
[29, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_Interaction_ModifierKey",
{ {
// Conditions: canInteract //Probably don't want any condidtions here, so variable never gets locked down
_exceptions = ["ACE_Drag_isNotDragging"];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Statement
ACE_Modifier = 0; ACE_Modifier = 0;
// Return false so it doesn't block other actions false;
false
}, },
[29, [false, false, false]], [29, [false, false, false]], false] call cba_fnc_addKeybind;
false,
"keyup"
] call cba_fnc_registerKeybind;

View File

@ -47,7 +47,7 @@ playSound "ACE_Sound_Click";
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1} !GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
}; };
if (!_usedMouseWheel && {time < _time}) then { if (!_usedMouseWheel && {time < _time} && {[] call EGVAR(common,canInteract)}) then {
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5); _phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
{_house animate [_x, _phase]} forEach _animations; {_house animate [_x, _phase]} forEach _animations;