mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
108ff4f644
Regex used: \[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\) [$1,$3,$2] call CBA_fnc_targetEvent E?FUNC\((common,)?(server|global|local)Event\) CBA_fnc_$2Event E?FUNC\((common,)?(add|remove)EventHandler\) CBA_fnc_$2EventHandler
41 lines
1015 B
Plaintext
41 lines
1015 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Resets a fuel vehicle in case is got bugged
|
|
*
|
|
* Arguments:
|
|
* 0: Fuel truck <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [truck] call ace_refuel_fnc_reset
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params [["_target", objNull, [objNull]]];
|
|
|
|
[_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set);
|
|
_target setVariable [QGVAR(isConnected), false, true];
|
|
|
|
private _nozzle = _target getVariable [QGVAR(ownedNozzle), nil];
|
|
if !(isNil "_nozzle") then {
|
|
private _nozzleTarget = _nozzle getVariable [QGVAR(sink), nil];
|
|
if !(isNil "_nozzleTarget") then {
|
|
_nozzleTarget setVariable [QGVAR(nozzle), nil, true];
|
|
};
|
|
|
|
private _rope = _nozzle getVariable [QGVAR(rope), objNull];
|
|
if !(isNull _rope) then {
|
|
ropeDestroy _rope;
|
|
};
|
|
|
|
{
|
|
[QGVAR(resetLocal), [_x, _nozzle], _x] call CBA_fnc_targetEvent;
|
|
} count allPlayers;
|
|
deleteVehicle _nozzle;
|
|
};
|
|
_target setVariable [QGVAR(ownedNozzle), nil, true];
|