Automatic Train Station Names


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

Utilities
2 years ago
2.0
580
Transportation Trains

g Does not update name on building train stops

2 years ago
(updated 2 years 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

2 years ago
(updated 2 years ago)

deleted

2 years ago

as im poor in coding, how you fixed this ?

2 years 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.

2 years ago

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

New response