From 37aec2b3c3e984417ff0de0227806a61b5661a8b Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 31 Aug 2015 21:22:22 +0200 Subject: [PATCH] enable repairing while on ladder --- addons/repair/CfgVehicles.hpp | 1 + addons/repair/functions/fnc_canRepairTrack.sqf | 2 +- addons/repair/functions/fnc_canReplaceTrack.sqf | 2 +- addons/repair/functions/fnc_canReplaceWheel.sqf | 2 +- addons/repair/functions/fnc_doRepairTrack.sqf | 2 +- addons/repair/functions/fnc_doReplaceTrack.sqf | 2 +- addons/repair/functions/fnc_doReplaceWheel.sqf | 2 +- addons/repair/functions/fnc_repair.sqf | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 47459f532d..27e8890dbc 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -10,6 +10,7 @@ priority = 2; \ icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \ distance = 4; \ + exceptions[] = {"isNotOnLadder"}; \ }; \ }; \ }; diff --git a/addons/repair/functions/fnc_canRepairTrack.sqf b/addons/repair/functions/fnc_canRepairTrack.sqf index 34165068d7..806fa14b2e 100644 --- a/addons/repair/functions/fnc_canRepairTrack.sqf +++ b/addons/repair/functions/fnc_canRepairTrack.sqf @@ -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]; diff --git a/addons/repair/functions/fnc_canReplaceTrack.sqf b/addons/repair/functions/fnc_canReplaceTrack.sqf index 94a62a5289..3f4ae77581 100644 --- a/addons/repair/functions/fnc_canReplaceTrack.sqf +++ b/addons/repair/functions/fnc_canReplaceTrack.sqf @@ -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]; diff --git a/addons/repair/functions/fnc_canReplaceWheel.sqf b/addons/repair/functions/fnc_canReplaceWheel.sqf index 9497504370..e0a2fbbed2 100644 --- a/addons/repair/functions/fnc_canReplaceWheel.sqf +++ b/addons/repair/functions/fnc_canReplaceWheel.sqf @@ -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]; diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf index 4803518e3d..de04e71920 100644 --- a/addons/repair/functions/fnc_doRepairTrack.sqf +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -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]; diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf index 13e53b3f3a..a95a669159 100644 --- a/addons/repair/functions/fnc_doReplaceTrack.sqf +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -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]; diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf index 62db39aa6d..f10712d65d 100644 --- a/addons/repair/functions/fnc_doReplaceWheel.sqf +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -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]; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 8fa7f498bd..4fa1c2d903 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -177,7 +177,7 @@ _processText = getText (_config >> "displayNameProgress"); DFUNC(repair_failure), _text, _callbackProgress, - [] + ["isNotOnLadder"] ] call EFUNC(common,progressBar); // Display Icon