mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Safemode - Fix indicator when switching units (#6612)
* Fix safe mode indicator when switching units * Use DIK macro instead of magic number
This commit is contained in:
parent
4d5f2d0de2
commit
a90dd7210e
@ -1,15 +1,10 @@
|
|||||||
// by esteldunedain
|
// by esteldunedain
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
// IGNORE_PRIVATE_WARNING(_player)
|
["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode), {
|
||||||
//["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
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
@ -18,6 +13,9 @@ if (!hasInterface) exitWith {};
|
|||||||
// Statement
|
// Statement
|
||||||
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);
|
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);
|
||||||
true
|
true
|
||||||
},
|
}, {false}, [DIK_GRAVE, [false, true, false]], false] call CBA_fnc_addKeybind;
|
||||||
{false},
|
|
||||||
[41, [false, true, false]], false] call CBA_fnc_addKeybind;
|
["unit", {
|
||||||
|
private _weaponSafe = currentWeapon ACE_player in (ACE_player getVariable [QGVAR(safedWeapons), []]);
|
||||||
|
[!_weaponSafe] call FUNC(setSafeModeVisual);
|
||||||
|
}] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user