Dynamic Train Stops


Rename Train Stations based on Circuit Network Input

Content
8 years ago
0.13 - 0.14
10
Trains

g Source?

8 years ago
(updated 8 years ago)

Any chance you could share the source for this? I'd been thinking about trying to make a Train Stop that can get a serialized name string letter by letter on the wire (and serialize it's name out the same way), and this seems like a perfect base for that!

(Of course I can unpack the zip, but that makes git history that's harder to send back! :)

8 years ago

What's your reasoning for doing the switcharoo() instead of just setting the train stop's backer_name directly?

8 years ago

If the backer_name property is set without the DynamicControl station temporarily also having that name, the name gets updated in all the schedules that contain that name as well.
For example, a train with Iron|Green in the schedule, when the station sets its name to Iron|Red, the schedule will just update to Iron|Red without a second station there to preserve the Iron|Green name. Destroying a station leaves the name intact in the schedules.
Potentially when a change is triggered, you could destroy the changing station and recreate it with the new name -- but you'd need to find and recreate all the circuit network connections to it as well. Having a designated swap station was an easier approach to implement.

8 years ago

Happy to share the source, but this is my first mod and I have zero experience with source management tools.

8 years ago

Ah, I hadn't considered schedule updates!

I recommend you learn git and use it for every project that has files! it'll save you a ton of time trying to figure out what you broke one day :)

New response