2015-01-18 20:01:18 +00:00
|
|
|
// by CAA-Picard
|
2015-01-17 20:32:34 +00:00
|
|
|
|
|
|
|
//["Soldier", {_player = ACE_player; if (currentWeapon _player in (_player getVariable [QGVAR(safedWeapons), []])) then {[false] call FUNC(setSafeModeVisual)}] call EFUNC(common,addInfoDisplayEventHandler);
|
|
|
|
//@todo addEventHandler infoDisplayChanged with select 1 == "Soldier"
|
2015-01-18 20:01:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Add keybinds
|
|
|
|
["ACE3",
|
|
|
|
localize "STR_ACE_SafeMode_SafeMode",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
|
|
|
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
|
|
|
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);
|
|
|
|
true
|
|
|
|
},
|
|
|
|
[41, [false, true, false]],
|
|
|
|
false,
|
|
|
|
"keydown"
|
|
|
|
] call cba_fnc_registerKeybind;
|