Automatic Train Station Names


Automatically set names of newly built train stations. Dirty update to Factorio 2.0 by Kamsta99

Utilities
24 days ago
2.0
122
Transportation Trains

g Does not update name on building train stops

28 days ago
(updated 26 days ago)

this is because, in the function on_new_entity_1, local entity is set to event.created_entity. It has changed in factorio 2.0 to just event.entity like in on_new_entity_2
https://lua-api.factorio.com/latest/events.html#on_built_entity

EDIT: changed to created_entity

28 days ago
(updated 28 days ago)

deleted

27 days ago

as im poor in coding, how you fixed this ?

26 days ago

in control.lua change line 227 from:

local entity = event.created_entity

to

local entity = event.entity

that should fix it, I don't think I changed anything else, to my recollection.

26 days ago

Thanks it fixed issue i tried to solve, i will upload fixed version soon

New response