mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Allow loading fuel canister (#5493)
Fix #5438 - Also block cargo action when being used
This commit is contained in:
parent
ecd688647c
commit
2a8e758390
@ -432,6 +432,12 @@ class CfgVehicles {
|
|||||||
GVAR(size) = 2; // 1 = small, 2 = large
|
GVAR(size) = 2; // 1 = small, 2 = large
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Fuel Canister (ace_refuel)
|
||||||
|
class Land_CanisterFuel_F: Items_base_F {
|
||||||
|
GVAR(size) = 1;
|
||||||
|
GVAR(canLoad) = 1;
|
||||||
|
};
|
||||||
|
|
||||||
// objects
|
// objects
|
||||||
class Lamps_base_F;
|
class Lamps_base_F;
|
||||||
class RoadCone_F: ThingX {
|
class RoadCone_F: ThingX {
|
||||||
|
@ -108,6 +108,7 @@ private _attachPosModel = _sink worldToModel (ASLtoAGL _bestPosASL);
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
[QEGVAR(common,setVectorDirAndUp), [_nozzle, _dirAndUp], _nozzle] call CBA_fnc_targetEvent;
|
[QEGVAR(common,setVectorDirAndUp), [_nozzle, _dirAndUp], _nozzle] call CBA_fnc_targetEvent;
|
||||||
|
if (_nozzle isKindOf "Land_CanisterFuel_F") then { _nozzle setVariable [QEGVAR(cargo,canLoad), false, true]; };
|
||||||
_nozzle setVariable [QGVAR(sink), _sink, true];
|
_nozzle setVariable [QGVAR(sink), _sink, true];
|
||||||
_nozzle setVariable [QGVAR(isConnected), true, true];
|
_nozzle setVariable [QGVAR(isConnected), true, true];
|
||||||
_sink setVariable [QGVAR(nozzle), _nozzle, true];
|
_sink setVariable [QGVAR(nozzle), _nozzle, true];
|
||||||
|
@ -22,6 +22,7 @@ private _sink = _nozzle getVariable [QGVAR(sink), objNull];
|
|||||||
if (isNull _sink) exitWith {};
|
if (isNull _sink) exitWith {};
|
||||||
|
|
||||||
_sink setVariable [QGVAR(nozzle), nil, true];
|
_sink setVariable [QGVAR(nozzle), nil, true];
|
||||||
|
if (_nozzle isKindOf "Land_CanisterFuel_F") then { _nozzle setVariable [QEGVAR(cargo,canLoad), true, true]; };
|
||||||
_nozzle setVariable [QGVAR(sink), nil, true];
|
_nozzle setVariable [QGVAR(sink), nil, true];
|
||||||
_nozzle setVariable [QGVAR(isConnected), false, true];
|
_nozzle setVariable [QGVAR(isConnected), false, true];
|
||||||
[objNull, _nozzle, true] call FUNC(dropNozzle);
|
[objNull, _nozzle, true] call FUNC(dropNozzle);
|
||||||
|
@ -43,6 +43,7 @@ if (_maxFuel == 0) then {
|
|||||||
if (!alive _source || {!alive _sink}) exitWith {
|
if (!alive _source || {!alive _sink}) exitWith {
|
||||||
[objNull, _nozzle] call FUNC(dropNozzle);
|
[objNull, _nozzle] call FUNC(dropNozzle);
|
||||||
_nozzle setVariable [QGVAR(isConnected), false, true];
|
_nozzle setVariable [QGVAR(isConnected), false, true];
|
||||||
|
if (_nozzle isKindOf "Land_CanisterFuel_F") then { _nozzle setVariable [QEGVAR(cargo,canLoad), true, true]; };
|
||||||
_nozzle setVariable [QGVAR(sink), nil, true];
|
_nozzle setVariable [QGVAR(sink), nil, true];
|
||||||
_sink setVariable [QGVAR(nozzle), nil, true];
|
_sink setVariable [QGVAR(nozzle), nil, true];
|
||||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||||
@ -54,6 +55,7 @@ if (_maxFuel == 0) then {
|
|||||||
|
|
||||||
[objNull, _nozzle] call FUNC(dropNozzle);
|
[objNull, _nozzle] call FUNC(dropNozzle);
|
||||||
_nozzle setVariable [QGVAR(isConnected), false, true];
|
_nozzle setVariable [QGVAR(isConnected), false, true];
|
||||||
|
if (_nozzle isKindOf "Land_CanisterFuel_F") then { _nozzle setVariable [QEGVAR(cargo,canLoad), true, true]; };
|
||||||
_nozzle setVariable [QGVAR(sink), nil, true];
|
_nozzle setVariable [QGVAR(sink), nil, true];
|
||||||
_sink setVariable [QGVAR(nozzle), nil, true];
|
_sink setVariable [QGVAR(nozzle), nil, true];
|
||||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user