-
Notifications
You must be signed in to change notification settings - Fork 737
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
Refuel - Add enable setting #7613
Conversation
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.
Tested in local MP on stratis looking at a map pump [getfuelCargo cursorObject, typeOf cursorObject]
server [0,"Land_FuelStation_Feed_F"]
client [1,"Land_FuelStation_Feed_F"]
and can use vanilla refuel
I don't know if setFuelCargo
will work on map objects the way we want
Looks like terrain pumps have local fuel value and they reset it in JIP. I fixed it. I'm implementing pump locations caching now because |
_worldSize * sqrt(2) / 2 but I don't think it will help much 😄 I'm still worried about if e.g. setVariable may work initially but might be lost if player moves away from the area |
Added pumps locations. I don't own Contact DLC so who wants please try |
Now destroyed refuel vehicles burn much longer - like did in vanilla. I didn't find good enough way to catch deadly hit so I implemented it with
Just checked if
|
|
I was curious about another way to get map objects using |
- Use hashmaps wherever possible - Reduced pump search radius by ~30% - Sorted pumps alphabetically and sorted positions by "smallest" first, for consistency
I've updated |
I was testing this. Self-hosted, with a second PC joining as a client. When the host shot a gas pump on Altis, it would burn long for both host and client. However, when the client shot a pump, it was a long burn for the host but a short one for the client. |
I always tested on Stratis and it worked. But it really doesn't work on Altis. I don't have more ideas how to handle this so I decided to remove that PR part. Also I removed it for vehicles because loop logic becomes too messy without terrain pumps. Maybe it would be implemented somehow in another PR but I don't think from me :-( |
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.
LGTM. I've tested some, but it could use some more.
I tried to |
Don't bother with trying to find a solution. If you do, it's best to make another PR at this point imo. |
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.
LGTM
* Add enable setting * Exclude man class init * Fix multiplayer terrain pump fuel sync * Add terrain pumps positions * Add vanilla fuel cargo restoring before destroying * Add Livonia positions by bux * Fix terrain pumps destruction * Improve settings init * Fix double settings category * Check enabled var in public functions * Fix fnc_makeSource * Handle recent CUP Terrains changes * Update includes * Fix issues introduced in acemod#9133 * Change warning Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Optimisations and cleanup - Use hashmaps wherever possible - Reduced pump search radius by ~30% - Sorted pumps alphabetically and sorted positions by "smallest" first, for consistency * Add init debug trace * compileScript in dev * yoda conditions & DFUNC macro * Wait until CBA settings are ready * Update Chernarus 2020 and add more maps configs * Remove vanilla fuel cargo restoring before destroying --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
When merged this pull request will:
Close Logistics enable/disable settings (no more compat 🎉) #7040.
add refuel functionality from Logistics enable/disable settings (no more compat 🎉) #7040 (which looks hard to merge): add enable setting and remove the need for compat addons;
add support for vehicles without ACE refuel config;
add
Land_FuelStation_03_pump_F
config;fix terrain fuel pumps support (not implemented in Logistics enable/disable settings (no more compat 🎉) #7040);
restore big explosion and long burn of refuel vehicles;optimize some code.
add terrain pumps locations
check if
setFuelCargo
is persistent for terrain pumpssearch for workaround for damaged pumps explosion strength