Fortify - Add onDeployStop event for cancelling before confirming (#9854)

* onDeployStop event

* Updated wiki with new event

* Fixed params

* Revert "onDeployStop event"

This reverts commit c3dae82915.

* Uses deployCanceled

* Re-added fortify stop event

* Update fnc_deployObject.sqf

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
Dart 2024-03-25 11:08:06 -05:00 committed by GitHub
parent 80417b114d
commit 31217ae5d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -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, _object, _cost]] call CBA_fnc_localEvent;
deleteVehicle _object;
};
};

View File

@ -119,5 +119,6 @@ Event Name | Passed Parameter(s) | Locality | Description
`acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Fortify object placed
`acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Fortify object deleted
`acex_fortify_onDeployStart` | [player, object, cost] | Local | Player starts placing object
`ace_fortify_onDeployStop` | [player, object, cost] | Local | Player stops placing object. Raised only if stopped before trying to place (= before progress bar appears). If it's during progress bar, only `ace_fortify_deployCanceled` is raised.
`ace_fortify_deployFinished` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player successfully finishes building object
`ace_fortify_deployCanceled` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player cancels building object