when I copy a Train stop name via Shift-click or via CTRL-C blueprint onto another stop, the resulting on_entity_renamed event does not contain the player_index field in the EventData.
The following code:
Code: Select all
script.on_event(defines.events.on_entity_renamed, function (event)
log("------ on_entity_renamed -------")
log("---- TYPE : " .. event.entity.type)
log(serpent.block(event))
end)
Code: Select all
96.603 Script @__test__/control.lua:3: ------ on_entity_renamed -------
96.603 Script @__test__/control.lua:4: ---- TYPE : train-stop
96.603 Script @__test__/control.lua:5: {
by_script = false,
entity = {
__self = "userdata"
},
name = 59,
old_name = "Igor Timurov",
player_index = 1,
tick = 3130
}
106.387 Script @__test__/control.lua:3: ------ on_entity_renamed -------
106.387 Script @__test__/control.lua:4: ---- TYPE : train-stop
106.388 Script @__test__/control.lua:5: {
by_script = false,
entity = {
__self = "userdata"
},
name = 59,
old_name = "Nicolas the Hamstroll",
tick = 3717
}
then I buld another stop and SHIFT-right click the first stop
Second event: paste the data to the second stop with SHIFT-left click
Then I did the same with a spidertron and the second event had the player_index in the EvenData as expected, that is in the log too