mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
exceptions
This commit is contained in:
parent
122a38a6aa
commit
82a8fc8ca3
@ -7,6 +7,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
@ -17,7 +18,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
@ -27,8 +28,8 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Captives_EscortCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
|
||||
statement = QUOTE([ARR_3(_target, _target, true)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
@ -39,7 +40,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
|
||||
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
@ -50,7 +51,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
|
||||
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(loadCaptive));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.2;
|
||||
@ -73,7 +74,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||
condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting));
|
||||
statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
priority = 2.3;
|
||||
hotkey = "C";
|
||||
@ -82,7 +83,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Captives_LoadCaptive";
|
||||
condition = "[_player, objNull, objNull] call ACE_Captives_fnc_canLoadCaptiveIntoVehicle";
|
||||
statement = "[_player, objNull, objNull] call ACE_Captives_fnc_loadCaptiveIntoVehicle";
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
priority = 2.2;
|
||||
hotkey = "K";
|
||||
@ -97,7 +98,7 @@ class CfgVehicles {
|
||||
distance = 4; \
|
||||
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
|
||||
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(loadCaptive)); \
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"}; \
|
||||
exceptions[] = {QGVAR(isNotEscorting)}; \
|
||||
showDisabled = 0; \
|
||||
priority = 1.2; \
|
||||
hotkey = "L"; \
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
//Alive, handcuffed, not being escored, and not unconsious
|
||||
|
||||
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
||||
{isNull (attachedTo _target)} &&
|
||||
{alive _target} &&
|
||||
|
@ -23,7 +23,7 @@ private ["_isAttached"];
|
||||
|
||||
|
||||
if (isNull _target) then {
|
||||
_target = _unit getVariable ["ACE_escortedUnit", objNull];
|
||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||
};
|
||||
|
||||
if (isNull _target) exitWith {
|
||||
|
@ -19,10 +19,6 @@
|
||||
|
||||
PARAMS_3(_unit,_target,_state);
|
||||
|
||||
if !("ACE_Handcuffed" in ([_target] call EFUNC(common,getCaptivityStatus))) exitWith {
|
||||
[localize "STR_ACE_Captives_NoCaptive"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if (_state) then {
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};
|
||||
|
||||
@ -31,12 +27,15 @@ if (_state) then {
|
||||
|
||||
_target attachTo [_unit, [0, 1, 0]];
|
||||
|
||||
_unit setVariable ["ACE_escortedUnit", _target, true];
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize "STR_ACE_Captives_StopEscorting"], "[_unit getVariable ['ACE_escortedUnit', objNull], false] call ACE_Captives_fnc_escortCaptive;", nil, 20, false, true, "", "!isNull (_unit getVariable ['ACE_escortedUnit', objNull])"];
|
||||
_unit setVariable [QGVAR(escortedUnit), _target, true];
|
||||
|
||||
[_target, _actionID] spawn {
|
||||
_target = _this select 0;
|
||||
_actionID = _this select 1;
|
||||
//Add Actionmenu to release captive
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize "STR_ACE_Captives_StopEscorting"],
|
||||
{[(_this select 0), ((_this select 0) getVariable [QGVAR(escortedUnit), objNull]), false] call FUNC(doEscortCaptive);},
|
||||
nil, 20, false, true, "", QUOTE(!isNull (GETVAR(_target,QGVAR(escortedUnit),objNull)))];
|
||||
|
||||
[_unit, _target, _actionID] spawn {
|
||||
PARAMS_3(_unit,_target,_actionID);
|
||||
|
||||
while {_unit getVariable [QGVAR(isEscorting), false]} do {
|
||||
sleep 0.2;
|
||||
@ -52,5 +51,5 @@ if (_state) then {
|
||||
};
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
_unit setVariable ["ACE_escortedUnit", objNull, true];
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
||||
|
@ -18,14 +18,11 @@
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
systemChat format ["set %1", _this];
|
||||
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("setHandcuffed unit not local");
|
||||
};
|
||||
|
||||
systemChat format ["set %1 %2 ", _state, (_unit getVariable [QGVAR(isHandcuffed), false])];
|
||||
|
||||
if (_state isEqualTo (_unit getVariable [QGVAR(isHandcuffed), false])) exitWith {
|
||||
ERROR("new state equals current");
|
||||
};
|
||||
@ -50,7 +47,7 @@ if (_state) then {
|
||||
};
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
||||
[_unit, "ACE_Handcuffed", false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
|
||||
if (vehicle _unit == _unit) then {
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ GVAR(isOpeningDoor) = false;
|
||||
localize "STR_ACE_Interaction_InteractionMenu",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", QEGVAR(captives,isNotEscorting), "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(isNull (findDisplay 1713999)) exitWith {false};
|
||||
@ -38,7 +38,7 @@ GVAR(isOpeningDoor) = false;
|
||||
localize "STR_ACE_Interaction_InteractionMenu",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", QEGVAR(captives,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};
|
||||
@ -56,7 +56,7 @@ GVAR(isOpeningDoor) = false;
|
||||
localize "STR_ACE_Interaction_InteractionMenuSelf",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming", "ACE_Common_notOnMap"];
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", QEGVAR(captives,isNotEscorting), "ACE_Interaction_isNotSwimming", "ACE_Common_notOnMap"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(isNull (findDisplay 1713999)) exitWith {false};
|
||||
@ -74,7 +74,7 @@ GVAR(isOpeningDoor) = false;
|
||||
localize "STR_ACE_Interaction_InteractionMenuSelf",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", QEGVAR(captives,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};
|
||||
|
Loading…
Reference in New Issue
Block a user