diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp index 1457c4ddee..496ed6fd73 100644 --- a/addons/tacticalladder/CfgVehicles.hpp +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -68,7 +68,7 @@ class CfgVehicles { class ACE_MainActions { selection = "roadway"; distance = 5; - condition = "true"; + condition = QUOTE(_target call FUNC(isLadderEmpty)); class ACE_PickUp { selection = ""; diff --git a/addons/tacticalladder/XEH_preInit.sqf b/addons/tacticalladder/XEH_preInit.sqf index cb1d3a8cf3..3423e4d3b0 100644 --- a/addons/tacticalladder/XEH_preInit.sqf +++ b/addons/tacticalladder/XEH_preInit.sqf @@ -10,6 +10,7 @@ PREP(handleInteractMenuOpened); PREP(handlePlayerChanged); PREP(handleScrollWheel); PREP(handleUnconscious); +PREP(isLadderEmpty); PREP(pickupTL); PREP(positionTL); diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf index 0b64d89610..c22141ca24 100644 --- a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf +++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf @@ -40,9 +40,9 @@ if (GETMVAR(ACE_Modifier,0) == 0) then { }; }; } else { - // Tilting - GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 30; - GVAR(ladder) animate ["rotate", GVAR(currentAngle)]; + // Tilting (disabled due to sinking, interaction point offset and unsuitable animation) + //GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 30; + //GVAR(ladder) animate ["rotate", GVAR(currentAngle)]; }; true diff --git a/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf b/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf new file mode 100644 index 0000000000..8267faf3c4 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf @@ -0,0 +1,31 @@ +/* + * Author: Jonpas + * Checks if Tactical Ladder is empty (no one climbing it). + * + * Arguments: + * 0: Ladder + * + * Return Value: + * Can Be Picked Up + * + * Example: + * [ladder] call ace_tacticalladder_fnc_isLadderEmpty; + * + * Public: No + */ +#include "script_component.hpp" + +params ["_ladder"]; + +private _unitsNearLadder = nearestObjects [_ladder, ["CAManBase"], 4]; +TRACE_1("Near Ladder",_unitsNearLadder); + +private _ladderEmpty = true; +{ + if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _x >> "ACE_isLadder") == 1) exitWith { + _ladderEmpty = false; + TRACE_1("On Ladder",_x); + }; +} forEach _unitsNearLadder; + +_ladderEmpty diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index 1e7f0db209..0ee3b8861f 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -42,7 +42,8 @@ GVAR(currentStep) = 3; GVAR(currentAngle) = 0; // add mouse buttons and hints -[localize LSTRING(Deploy), localize LSTRING(Drop), localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint); +//private _adjustText = format ["%1, +%2", localize LSTRING(Adjust), localize LSTRING(AdjustTilt)]; // Tilting disabled due to sinking, interaction point offset and unsuitable animation +[localize LSTRING(Deploy), localize LSTRING(Drop), /*_adjustText*/ localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint); _unit setVariable [QGVAR(Deploy), [ _unit, "DefaultAction", diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index 602be09855..2e17586597 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -38,12 +38,20 @@ Derrubar escada - Extend, +Ctrl tilt - Ausfahren, +Strg kippen - Rozłóż, +Ctrl nachyl - Extender, +Ctrl tilt - Разложить, +Ctrl наклонить - Prodloužit, +Ctrl naklonit + Extend + Ausfahren + Rozłóż + Extender + Разложить + Prodloužit + + + Ctrl tilt + Strg kippen + Ctrl nachyl + Ctrl tilt + Ctrl наклонить + Ctrl naklonit Position ladder @@ -70,4 +78,4 @@ Pegar escada - \ No newline at end of file +