mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed returnNozzle function, Moved Return action up
This commit is contained in:
parent
68489c456e
commit
68370f63d7
@ -18,13 +18,6 @@
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = PATHTOF(ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class GVAR(CheckFuel) { \
|
||||
displayName = CSTRING(CheckFuel); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(getFuel) >= 0); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkFuel)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = PATHTOF(ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class GVAR(Return) { \
|
||||
displayName = CSTRING(Return); \
|
||||
condition = QUOTE([ARR_1(_player)] call FUNC(canConnectNozzle)); \
|
||||
@ -32,6 +25,13 @@
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = PATHTOF(ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class GVAR(CheckFuel) { \
|
||||
displayName = CSTRING(CheckFuel); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(getFuel) >= 0); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkFuel)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = PATHTOF(ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
@ -25,9 +25,15 @@ _nozzle = _unit getVariable QGVAR(nozzle);
|
||||
|
||||
if (_source != _target || {isNil "_nozzle"}) exitWith {false};
|
||||
|
||||
_source setVariable [QGVAR(isConnected), false, true];
|
||||
ropeDestroy (_nozzle getVariable QGVAR(rope));
|
||||
deleteVehicle _nozzle;
|
||||
_unit setVariable [QGVAR(nozzle), nil];
|
||||
detach _nozzle;
|
||||
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
||||
_unit selectWeapon (_unit getVariable QGVAR(selectedWeaponOnRefuel));
|
||||
_unit setVariable [QGVAR(selectedWeaponOnRefuel), nil];
|
||||
_unit setVariable [QGVAR(isRefueling), false];
|
||||
|
||||
_target setVariable [QGVAR(isConnected), false, true];
|
||||
ropeDestroy (_nozzle getVariable QGVAR(rope));
|
||||
deleteVehicle _nozzle;
|
||||
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user