Skip to content

Commit

Permalink
Fortify - Add onDeployStop event for cancelling before confirming (ac…
Browse files Browse the repository at this point in the history
…emod#9854)

* onDeployStop event

* Updated wiki with new event

* Fixed params

* Revert "onDeployStop event"

This reverts commit c3dae82.

* Uses deployCanceled

* Re-added fortify stop event

* Update fnc_deployObject.sqf

---------

Co-authored-by: johnb432 <[email protected]>
  • Loading branch information
DartRuffian and johnb432 authored Mar 25, 2024
1 parent 80417b1 commit 31217ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/fortify/functions/fnc_deployObject.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down
1 change: 1 addition & 0 deletions docs/wiki/framework/fortify-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 31217ae

Please sign in to comment.