Erabior / RouteManager

Mod for Railroader the game that adds basic automation for passenger routes
13 stars 6 forks source link

Fixed Fuel Detection #20

Closed AdamC1228 closed 10 months ago

AdamC1228 commented 10 months ago

Suggested Fixed fuel detection for all locomotives.

It would appear that the null return in GetLoadInfoForLoco was causing the null checks to never trigger.

Erabior commented 10 months ago

I believe I have just implemented a fix for the issue. let me know if you think it should work

AdamC1228 commented 10 months ago

I will pull and test your new code.

I do suggest that if you have not already, to take a look at the some of the proposed code specifically with regards to defining your minimum fuel quantities as their own variables so it would be easier to update the quantities in the future. Specifically if you decide to allow the user to set their own minimums as a future feature.

AdamC1228 commented 10 months ago

Initial testing does confirm that your solution does indeed resolve the issue. I will close the pull request and generate a new one with the appropriate Quality of life upgrades based off your new code changes.