Refuel - Added ability to refuel fuel sources
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
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?
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
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.
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 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 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 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
@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.
@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 Fixed the isNull( cases and added newlines to every file.
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?
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.