From c3dae82915f7d36754096feaf5ae2249688742e7 Mon Sep 17 00:00:00 2001 From: DartRuffian Date: Wed, 13 Mar 2024 16:08:51 -0500 Subject: [PATCH] onDeployStop event --- addons/fortify/functions/fnc_deployConfirm.sqf | 9 ++++++--- addons/fortify/functions/fnc_deployObject.sqf | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/fortify/functions/fnc_deployConfirm.sqf b/addons/fortify/functions/fnc_deployConfirm.sqf index 37e0d4fb9d..96c1052225 100644 --- a/addons/fortify/functions/fnc_deployConfirm.sqf +++ b/addons/fortify/functions/fnc_deployConfirm.sqf @@ -50,9 +50,12 @@ private _perframeCheck = { [ _totalTime, [_unit, _side, _typeOf, _posASL, _vectorDir, _vectorUp, _cost], - QGVAR(deployFinished), - QGVAR(deployCanceled), + QGVAR(deployFinished), { + params ["_unit", "", "_typeOf"]; + private _cost = _this select 6; + [QGVAR(deployCanceled), _this] call CBA_fnc_localEvent; + [QGVAR(onDeployStop), [_unit, _typeOf, _cost]] call CBA_fnc_localEvent; + }, LLSTRING(progressBarTitle), _perframeCheck ] call EFUNC(common,progressBar); - diff --git a/addons/fortify/functions/fnc_deployObject.sqf b/addons/fortify/functions/fnc_deployObject.sqf index 4895b261bc..a95051ffa5 100644 --- a/addons/fortify/functions/fnc_deployObject.sqf +++ b/addons/fortify/functions/fnc_deployObject.sqf @@ -70,6 +70,7 @@ private _mouseClickID = [_player, "DefaultAction", {GVAR(isPlacing) == PLACE_WAI [_unit, _object] call FUNC(deployConfirm); } else { TRACE_1("deleting object",_object); + [QGVAR(onDeployStop), [_unit, typeOf _object, _cost]] call CBA_fnc_localEvent; deleteVehicle _object; }; };