mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disallow refueling with running engine
This commit is contained in:
parent
f13517980b
commit
0b3abd55d3
@ -27,4 +27,5 @@ if (isNull _unit ||
|
|||||||
!(_nozzle getVariable [QGVAR(isRefueling), false]) &&
|
!(_nozzle getVariable [QGVAR(isRefueling), false]) &&
|
||||||
{[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} &&
|
{[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} &&
|
||||||
{!isNull (_nozzle getVariable [QGVAR(sink), objNull])} &&
|
{!isNull (_nozzle getVariable [QGVAR(sink), objNull])} &&
|
||||||
{(fuel (_nozzle getVariable QGVAR(sink))) < 1}
|
{(fuel (_nozzle getVariable QGVAR(sink))) < 1} &&
|
||||||
|
{!(isEngineOn (_nozzle getVariable QGVAR(sink)))}
|
||||||
|
@ -52,6 +52,9 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >>
|
|||||||
private _finished = false;
|
private _finished = false;
|
||||||
private _fueling = _nozzle getVariable [QGVAR(isRefueling), false];
|
private _fueling = _nozzle getVariable [QGVAR(isRefueling), false];
|
||||||
if (_fueling) then {
|
if (_fueling) then {
|
||||||
|
if (isEngineOn _sink) exitWith {
|
||||||
|
_nozzle setVariable [QGVAR(isRefueling), false, true];
|
||||||
|
};
|
||||||
private _fuelInSource = [_source] call FUNC(getFuel);
|
private _fuelInSource = [_source] call FUNC(getFuel);
|
||||||
if (_fuelInSource == 0) exitWith {
|
if (_fuelInSource == 0) exitWith {
|
||||||
[LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured);
|
[LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured);
|
||||||
|
Loading…
Reference in New Issue
Block a user