Automatic Train Painter


Automatically colors locomotives and wagons based on their contents.

Tweaks
9 months ago
0.17 - 1.1
76.7K
Trains

g [Fixed] Exemptions

5 years ago

Hi, really loving this mod with LTN integration, is it possible however to make exemptions for certain trains, specifically for me its ones with my Shuttle Train module installed in them, its really annoying that my personal train unpaints itself every time i get out (because its empty)

5 years ago

Do your shuttles have wagons? If they don't, then this requires a very minor change that can be implemented shortly. Otherwise, I'm not seeing too many options here since that behavior is fundamental to the mod (when that option is enabled, of course). Perhaps it there could be a GUI add-on that allows one to make a list of Train IDs not to be painted, but that is beyond my abilities at the moment.

5 years ago

Well my personal shuttle doesn't have wagons but I know some people do use it with them.
I had a quick look and I believe it should be possible to just exempt any trains carrying a specific module in their equipment grid by just adding a conditional to the top of your control.lua and then only applying your code to trains that do/don't fulfill that conditional but I haven't had time to test that theory yet.

5 years ago

Yeah it worked pretty much as i expected, I've uploaded a copy of my modified control.lua to my Google Drive if its of any use to you :)

https://drive.google.com/open?id=1BKIMy-tyjv3NexRd0npa9jgmkkmcSokL

5 years ago

This will actually work really well for any number of exceptions. I will probably implement it slightly differently with the exception checker in an external function lua, but the idea would be the same. Thanks for your input!

btw, I've already fixed the script to not unpaint loco-only trains. I'll likely push that update later today/tonight.

5 years ago

Yeah it seemed like the easiest way to do it, exempting loco-only trains is fine for me but I'm guessing other people may want exemptions for other reasons, keep up the good work :D

5 years ago

I know I'm a little late to the discussion, but this is exactly the feature i was looking for. My use case being: FARL, construction supply, and trash trains. I like to have these colored the same as my shuttle trains as I generally use them manually. I'm currently trying to kludge my way around it by using shuttle trains but it'd be nice to have an option to disable it for the FARL module as well. Seems like a relatively simple edit that, while not ideal, would give us an option for longer trains that doesn't cause them to be automatically used as shuttles.

5 years ago

No problem, I'll put it in the next update!

New response