Skip to content
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

add support to refuel trains when low on fuel #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrvn
Copy link
Contributor

@mrvn mrvn commented Oct 16, 2021

Adds a new signal ltn-cleanup-refuel-stop and a min-fuel setting.

When a delivery completes and min-fuel > 0 the trains remaining fuel is checked. If any locomotive is below min-fuel then a refueling station on the same surface matching the network id and train limit is searched for and the train send to refuel.

If no refuel station can be found a warning is given and the train continues till it runs out of fuel.

Note: I enabled the feature by default because when refueling trains at the depot they should never get into a low fuel situation. So no harm is done if refuel stations aren't used. But if refueling at the depot runs out of fuel you get an extra early warning about it which I find kind of nice.

@keombre
Copy link
Owner

keombre commented Oct 31, 2021

This looks cool.
I don't think it will have much use since you usually refuel your trains in the depots. But cleanup is here to help if anyone messes up, so it goes nicely with the rest of the mod.

I just removed the GUI module. Could you look at the conflicts?

@mrvn
Copy link
Contributor Author

mrvn commented Nov 7, 2021

I've rebased the branch. Should work now.

I have depots all over the place and each one would need a train stop to request fuel and depending on the mods another to return the burned fuel result. A single fuel stop can service a lot of trains making depots them self simpler.

I actually made the factory outlet for the train fuel canisters the fuel stop. The factory takes in empty canisters and liquid fuel and makes fuel canisters. The train then stops there to refuel, the spend canisters get removed and returned to the input of the factory and fresh fuel canisters get loaded into the locomotives. So making new fuel canisters for new trains and refueling is all combined into one central factory. Haven't needed a second stop to refuel yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants