diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index efedfa031b..6169616f2b 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -63,7 +63,11 @@ private _fnc_onFailure = { // Reset animation [_unit, "", 1] call EFUNC(common,doAnimation); }; -[(_digTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(DiggingTrench)] call EFUNC(common,progressBar); +private _fnc_condition = { + (_this select 0) params ["_unit"]; + "ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems)) +}; +[(_digTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(DiggingTrench), _fnc_condition] call EFUNC(common,progressBar); if(_actualProgress == 0) then { [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 1.0], _vecDirAndUp, _actualProgress] call FUNC(setTrenchPlacement); diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf index 3a549eb16f..db29587a21 100644 --- a/addons/trenches/functions/fnc_removeTrench.sqf +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -61,7 +61,11 @@ private _fnc_onFailure = { // Reset animation [_unit, "", 1] call EFUNC(common,doAnimation); }; -[(_removeTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(RemovingTrench)] call EFUNC(common,progressBar); +private _fnc_condition = { + (_this select 0) params ["_unit"]; + "ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems)) +}; +[(_removeTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(RemovingTrench), _fnc_condition] call EFUNC(common,progressBar); private _progressLeft = ((1 - _actualProgress) * 10) + 1;