ACE3/addons/safemode/XEH_postInit.sqf
jonpas e11e102a76 Underwater actions support (#4984)
* Enable majority of actions underwater

* Remove log

* Add logistics_wirecutter support (don't play kneel animations underwater - looks silly)

* Don't perform kneel animations when repairing or medicaling underwater

* Fix interaction menu rendering underwater (was moving based on player eye level due to height max used for large vehicles)

* Fix attach underwater (LIW does not work underwater, LIS does), Add attach scan drawing define

* Remove left-over systemChat

* Remove vehiclelock from Plane, Disallow linking belt underwater, Allow checking ammo when sitting via action (was already possible via keybind), Use param for LIS
2017-08-22 13:30:56 -05:00

24 lines
1023 B
Plaintext

// by esteldunedain
#include "script_component.hpp"
if (!hasInterface) exitWith {};
// IGNORE_PRIVATE_WARNING(_player)
//["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"
// add keybinds
["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode),
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player} && {currentWeapon ACE_player != ""}) exitWith {false};
// Statement
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);
true
},
{false},
[41, [false, true, false]], false] call CBA_fnc_addKeybind;