Automatic Train Painter


Automatically colors locomotives and wagons based on their contents.

Tweaks
11 months ago
0.17 - 1.1
79.6K
Trains

i [Implemented] Unpaint empty trains as nil

2 years ago

Hello, I really really love this mod, and use it in just about every single map :)

In working on some of my own train mods, I found that in order to set the default color for a locomotive, you can just do locomotive.color = nil instead of specifying EA1100 hex code. However it seems you've got a check in place to make sure the unpainted color is an actual hex color, so if I put nil then the mod gives me an invalid color message in chat.

Would it be possible to add an additional filter to your unpainted color check that allows nil as a valid color?

This would be helpful for my mod Train Trails, which creates colored glowing trails following any train with a color ~= nil, so then if I put nil as the unpainted color the trails won't be created for empty trains.

Thank you :D

2 years ago

Hey, I think it got it working. Let me know if it behaves as you intend! Awesome mod, by the way -- I'll definitely be using it myself!

2 years ago

I got the update and it's all working wonderfully, thank you! Leaving the input box empty is much more elegant than writing nil

New response