Currently, I have gotten the old mod working in 0.17 and have successfully added additional items into the "colors" array. Fluids, however, are not working.
The section of control.lua that reads the train contents and looks up the appropriate item color in the array is:
Code: Select all
if(train.state == defines.train_state.on_the_path and not train.manual_mode and #train.cargo_wagons > 0) then
local total = 0
local hit = 0
calc = {}
for name, count in pairs(train.get_contents()) do
for key, color in pairs(colors) do
if(key[name] ~= nil) then
if(calc[key] ~= nil) then
calc[key] = calc[key] + count
else
hit = hit + 1
calc[key] = count
end
total = total + count
end
end
end
Code: Select all
and #train.cargo_wagons > 0