-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refueling fuel containers #7039
Conversation
@@ -1,44 +1,5 @@ | |||
#define MACRO_NOZZLE_ACTIONS \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not also be removed? I don't think anyone could have included this file from a built mod as it has config in it, it had to be copied, so it's safe to remove.
@@ -6,6 +6,7 @@ | |||
* Arguments: | |||
* 0: Unit <OBJECT> | |||
* 1: Nozzle <OBJECT> | |||
* 2: Refuel container (optional) <BOOL> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 2: Refuel container (optional) <BOOL> | |
* 2: Refuel container <BOOL> (default: false) |
{[_source] call FUNC(getFuel) != 0} && | ||
{!isNull _sink} && | ||
{!_isFull} && | ||
{!(_refuelContainer && {_source == _sink})} && // No endless container ot itself loop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{!(_refuelContainer && {_source == _sink})} && // No endless container ot itself loop | |
{!(_refuelContainer && {_source == _sink})} && // No endless container of itself loop |
* | ||
* Arguments: | ||
* 0: Unit <OBJECT> | ||
* 0: Unit <OBJECT> (optional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 0: Unit <OBJECT> (optional) | |
* 0: Unit <OBJECT> (default: objNull - drop on floor) |
// Air and sea vehicles have that value properly defined in liters, unlike ground vehicles which is is formula of (range * tested factor) - different fuel consumption system than ground vehicles | ||
if (_maxFuel == 0) then { | ||
_maxFuel = getNumber (_config >> "fuelCapacity"); | ||
private _rate = if (isNumber (configFile >> "CfgVehicles" >> typeOf _sink >> QGVAR(flowRate))) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate this if assignment construct, I'd write it as:
private _cfgFlowRate = configFile >> "CfgVehicles" >> typeOf _sink >> QGVAR(flowRate);
private _rate = GVAR(rate); // Default to 1 (jerry cans for example have no flow rate defined)
if (isNumber _cfgFlowRate) then {
_rate = _rate * getNumber _cfgFlowRate;
};
Also less commands due to config stored in variable.
But up to you.
Completed in #8981, if I am wrong feel free to re-open |
Hi, I'm struggling to work out how this is done in game. I can't attach a nozzle to any fuel container from another. I'm not sure if this just a code capability because I can see that from a console you can set the fuel containers fullness with "ace_refuel_fnc_setFuel"? Ohh, I see it's in the pre-release now (https://github.com/acemod/ACE3/releases/tag/v3.16.0-RC1). Sorry! |
When merged this pull request will: