Skip to content

Commit

Permalink
JNG save fuel
Browse files Browse the repository at this point in the history
  • Loading branch information
StefArma committed Nov 26, 2017
1 parent af49da3 commit dd2e7e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions AntistasiOfficial.Altis/JeroenArsenal/JNG/defineCommon.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@
private _ammoClassic = _data select 7;\
private _ammoPylon = _data select 8;\
private _damage = _data select 9;\
private _attachItem = _data select 10;
private _attachItem = _data select 10;\
private _fuel = _data select 11;\
private _fuelcargo = _data select 12;
#define COMPILE_SAVE\
if(isnil "_name" || isnil "_beingChanged" || isnil "_locked" || isnil "_lockedName" || isnil "_type" || isnil "_texture" || isnil "_animations" || isnil "_ammoClassic"|| isnil "_ammoPylon"|| isnil "_ammoClassic" || isnil "_damage")then{\
if(isnil "_name" || isnil "_beingChanged" || isnil "_locked" || isnil "_lockedName" || isnil "_type" || isnil "_texture" || isnil "_animations" || isnil "_ammoClassic"|| isnil "_ammoPylon"|| isnil "_ammoClassic" || isnil "_damage" || isnil "_fuel" || isnil "_fuelcargo")then{\
["Error: ERROR COMPILE_SAVE"] call BIS_fnc_error;\
_error_compile_save = "ERROR COMPILE_SAVE fn_garage.sqf (JGA)";\
};\
private _data = [_name, _beingChanged, _locked, _lockedName, _type, _texture, _animations, _ammoClassic, _ammoPylon, _damage, _attachItem];\
private _data = [_name, _beingChanged, _locked, _lockedName, _type, _texture, _animations, _ammoClassic, _ammoPylon, _damage, _attachItem, _fuel, _fuelcargo];\
private _datastr = str _data;
#define SPLIT_REARM\
private _magazine = _data select 0;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ private _attachItem = [];
};
} forEach attachedObjects _vehicle;

//fuel stef
private _fuel = fuel _vehicle;
private _fuelcargo = if(getfuelcargo _vehicle >=0) then {getfuelcargo _vehicle} else {[_vehicle] call ace_refuel_fnc_getFuel;};

//set defaults
private _beingChanged = "";
Expand Down

2 comments on commit dd2e7e5

@StefArma
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this 39e8070

@StefArma
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT: this update ISN'T COMPATIBLE with previous SAVE unless you remove the whole garage vehicles manually from the savegame.

Please sign in to comment.