ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Refuel - Added ability to refuel fuel sources

Open Quantx opened this issue 3 years ago • 3 comments

When merged this pull request will:

  • Added ability to refuel fuel truck's tanks and jerry cans
  • Fuel counter now behaves the same for both limited and unlimited fuel sources
  • Improved fuel transfer process to ensure that no fuel is lost during the transfer
  • Added action to jerry cans to check how much fuel is left
  • Prevented fuel source objects from being loaded into vehicles while they are being refueled or are refueling something

This PR is intended to supplant #7039 by @BaerMitUmlaut

Quantx avatar Jul 25 '22 03:07 Quantx

I noticed that fuel trucks with big fuel containers can take ages to fill compared to vehicles with smaller tanks. The HEMTT fuel truck for example has fuel tank capacity of about 600 liters, while it can store up to 10,000 liters. Should we implement some sort of flow rate multiplier for refilling fuel trucks' containers vs their tanks?

Quantx avatar Jul 25 '22 04:07 Quantx

From gameplay standpoint multiplier definitely should be implemented. From IRL it should consider source pump performance, hose diameter and target fitting size. Aircrafts refuel at 1500-2200 L/min

severgun avatar Jul 27 '22 12:07 severgun

From gameplay standpoint multiplier definitely should be implemented. From IRL it should consider source pump performance, hose diameter and target fitting size. Aircrafts refuel at 1500-2200 L/min

It would be nice if each vehicle had max intake rate and sources had max flow rate. It would then pick lower of the two values.

LupusTheCanine avatar Aug 12 '22 19:08 LupusTheCanine

I completely agree with both of the above comments. For now I've implemented a separate flow rate multiplier option for filling cargo fuel sources. It's 10x the standard refueling rate by default which should make filling huge tanks less of a pain. Adding dedicated input/output flow rates for each tank is a great idea and I'll probably implement something like this in t he future.

Quantx avatar Nov 23 '22 06:11 Quantx

@Quantx would you be able to make your variable names a little more verbose? Stuff like _bb, _ll, and _rr makes it a little hard to understand.

Drofseh avatar Nov 26 '22 04:11 Drofseh

@Drofseh I didn't actually write the specific section of code you're referencing. However, I do intend to rewrite that section as part of a different PR after this one gets merged. If you really want I guess I could go through and refactor it now as part of this PR though.

Quantx avatar Nov 26 '22 04:11 Quantx

@Quantx Oh my bad, if you're willing to do it that'd be great, but I don't think it has to be in this PR

Drofseh avatar Nov 26 '22 08:11 Drofseh

@Dystopian I've gone through and added the space between all instances of getNumber and isNumber I could find. I'm pretty sure that should cover all of the instances of that specific spacing issue.

Quantx avatar Nov 26 '22 12:11 Quantx

@Dystopian I've gone through and added the space between all instances

At least you missed isNull( cases. Should probably use regex to find such instances.

Also there are still no newlines at the end of some files. You can see it in Files changed section of this PR (red circles at the end of file).

Dystopian avatar Nov 26 '22 12:11 Dystopian

@Dystopian Fixed the isNull( cases and added newlines to every file.

Quantx avatar Nov 27 '22 04:11 Quantx

I read thru the changes & it looks like both requests were fulfilled - is there something else holding feature back or just that we need to bump?

Mirviriam avatar Jan 23 '23 02:01 Mirviriam

I have nothing left to add to this feature at this point and I've made all the requested changes. So unless there are any other suggestions or changes anyone wants to make, this should be good to merge.

Quantx avatar Jan 24 '23 05:01 Quantx