Automatic Train Station Names


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

Utilities
1 year, 3 days ago
2.0
418
Transportation Trains

g Does not update name on building train stops

1 year, 7 days ago
(updated 1 year, 5 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

1 year, 7 days ago
(updated 1 year, 7 days ago)

deleted

1 year, 6 days ago

as im poor in coding, how you fixed this ?

1 year, 5 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.

1 year, 5 days ago

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

New response