mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2170 from jokoho48/codeCleanupLogisticUAVBattery
Code Cleanup Logistic UAV Battery
This commit is contained in:
commit
206ee6e471
@ -16,6 +16,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_caller,_target);
|
||||
params ["_caller", "_target"];
|
||||
|
||||
("ACE_UAVBattery" in (items _caller)) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4}
|
||||
|
@ -15,23 +15,21 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_caller,_target);
|
||||
|
||||
private ["_onFinish", "_onFailure"];
|
||||
params ["_caller", "_target"];
|
||||
|
||||
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
|
||||
|
||||
_onFinish = {
|
||||
EXPLODE_2_PVT((_this select 0),_caller,_target);
|
||||
_caller removeItem "ACE_UAVBattery";
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10];
|
||||
["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local
|
||||
(_this select 0) params ["_caller", "_target"];
|
||||
_caller removeItem "ACE_UAVBattery";
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10];
|
||||
["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local
|
||||
};
|
||||
|
||||
_onFailure = {
|
||||
EXPLODE_2_PVT((_this select 0),_caller,_target);
|
||||
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
(_this select 0) params ["_caller", "_target"];
|
||||
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
[_caller, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||
|
Loading…
Reference in New Issue
Block a user