Merge pull request #2320 from acemod/322notonladder

disable all actions while being on a ladder by default, close #2289
This commit is contained in:
commy2 2015-08-31 21:31:54 +02:00
commit d85f96eac0
12 changed files with 20 additions and 18 deletions

View File

@ -122,7 +122,7 @@ _actions = if (_isMan) then {
// Dummy statement so it's not collapsed when there's no available actions
true
},
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)},
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder"]] call EFUNC(common,canInteractWith)},
{},
{},
"Spine3",

View File

@ -18,7 +18,7 @@ if (GVAR(openedMenuType) == _menuType) exitWith {true};
// Conditions: canInteract (these don't apply to zeus)
if ((isNull curatorCamera) && {
!([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith))
!([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder"]] call EFUNC(common,canInteractWith))
}) exitWith {false};
while {dialog} do {

View File

@ -191,7 +191,7 @@ class CfgVehicles {
class ACE_TeamManagement {
displayName = CSTRING(TeamManagement);
condition = QUOTE(GVAR(EnableTeamManagement));
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = "";
showDisabled = 1;
priority = 3.2;
@ -201,7 +201,7 @@ class CfgVehicles {
class ACE_JoinTeamRed {
displayName = CSTRING(JoinTeamRed);
condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.4;
@ -211,7 +211,7 @@ class CfgVehicles {
class ACE_JoinTeamGreen {
displayName = CSTRING(JoinTeamGreen);
condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.3;
@ -221,7 +221,7 @@ class CfgVehicles {
class ACE_JoinTeamBlue {
displayName = CSTRING(JoinTeamBlue);
condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.2;
@ -231,7 +231,7 @@ class CfgVehicles {
class ACE_JoinTeamYellow {
displayName = CSTRING(JoinTeamYellow);
condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.1;
@ -242,7 +242,7 @@ class CfgVehicles {
class ACE_LeaveTeam {
displayName = CSTRING(LeaveTeam);
condition = QUOTE(assignedTeam _player != 'MAIN');
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.5;
@ -252,7 +252,7 @@ class CfgVehicles {
class ACE_BecomeLeader {
displayName = CSTRING(BecomeLeader);
condition = QUOTE(_this call DFUNC(canBecomeLeader));
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE(_this call DFUNC(doBecomeLeader));
showDisabled = 1;
priority = 1.0;
@ -262,7 +262,7 @@ class CfgVehicles {
class ACE_LeaveGroup {
displayName = CSTRING(LeaveGroup);
condition = QUOTE(count (units group _player) > 1);
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
showDisabled = 1;
priority = 1.2;
@ -379,7 +379,7 @@ class CfgVehicles {
class ACE_Equipment {
displayName = CSTRING(Equipment);
condition = QUOTE(true);
exceptions[] = {"isNotInside","notOnMap", "isNotSitting"};
exceptions[] = {"isNotInside", "notOnMap", "isNotSitting"};
statement = "";
showDisabled = 1;
priority = 4.5;

View File

@ -82,3 +82,4 @@ private ["_team"];
[29, [false, false, false]], false] call cba_fnc_addKeybind;
["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition);
["isNotOnLadder", {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "ACE_isLadder") != 1}] call EFUNC(common,addCanInteractWithCondition);

View File

@ -10,6 +10,7 @@
priority = 2; \
icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \
distance = 4; \
exceptions[] = {"isNotOnLadder"}; \
}; \
}; \
};

View File

@ -30,7 +30,7 @@ if (typeName _wheel == "OBJECT") then {
_wheel = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
if ([_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {
_wheel = _x;
};
} forEach nearestObjects [_unit, ["ACE_Track"], 5];

View File

@ -31,7 +31,7 @@ if (typeName _track == "OBJECT") then {
_track = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
if ([_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {
_track = _x;
};
} forEach nearestObjects [_unit, ["ACE_Track"], 5];

View File

@ -37,7 +37,7 @@ if (typeName _wheel == "OBJECT") then {
_wheel = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
if ([_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {
_wheel = _x;
};
} forEach nearestObjects [_unit, ["ACE_Wheel"], 5];

View File

@ -27,7 +27,7 @@ private ["_hitPointDamage", "_newDamage", "_wheel"];
_wheel = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
if ([_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {
_wheel = _x;
};
} forEach nearestObjects [_unit, ["ACE_Track"], 5];

View File

@ -27,7 +27,7 @@ private["_hitPointDamage", "_wheel"];
_wheel = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
if ([_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {
_wheel = _x;
};
} forEach nearestObjects [_unit, ["ACE_Track"], 5];

View File

@ -27,7 +27,7 @@ private ["_hitPointDamage", "_wheel"];
_wheel = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
if ([_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {
_wheel = _x;
};
} forEach nearestObjects [_unit, ["ACE_Wheel"], 5];

View File

@ -177,7 +177,7 @@ _processText = getText (_config >> "displayNameProgress");
DFUNC(repair_failure),
_text,
_callbackProgress,
[]
["isNotOnLadder"]
] call EFUNC(common,progressBar);
// Display Icon