Automatic Train Station Names


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

Utilities
9 months ago
2.0
389
Transportation Trains

g Does not update name on building train stops

10 months ago
(updated 9 months 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

10 months ago
(updated 10 months ago)

deleted

9 months ago

as im poor in coding, how you fixed this ?

9 months 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.

9 months ago

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

New response