Train Refuel Station


Adds a station that trains will automatically go to when they get low on fuel.

Content
2 years ago
1.1
13.8K
Transportation

g Compability with 248k

1 year, 6 months ago
(updated 1 year, 6 months ago)

This mod have train with no fuel, add this to control.lua(because you mod crashes the game):
--- a/control.lua
+++ b/control.lua
@@ -9,6 +9,9 @@ script.on_event({defines.events.on_train_changed_state},
for key,locoArray in pairs(e.train.locomotives) do -- loop through the front and back movers of the train
for index, entity in ipairs(locoArray) do -- loop through the actual locomotives
local fuelInventory = entity.get_fuel_inventory();
+ if not entity.burner then
+ return
+ end
local totalFuelValue = entity.burner.remaining_burning_fuel;
for invIndex=1, #fuelInventory do
local invSlot = fuelInventory[invIndex]

New response