Page 1 of 1

[LTN 1.7.1] copy ltn stop name bug

Posted: Thu Feb 01, 2018 2:51 pm
by Zanostra
I'm pretty sure I found a bug when using shift+mouse to copy/paste a ltn stop name.
I have all versions up to date and I can recreate the bug whenever I want to.
When there are more ltn-stops sharing the same name, say "station 1", and you use shift+mousebuttons to copy/paste another ltn-stops name and settings "station 2" over the ltn-stop "station 1" until there is only one "station 1" left, that stop becomes invalid.
The game doesn't crash, but you get a notification every second until you change the name of that stop, even changing it into the name it already had will do.

Re: copy ltn stop name bug

Posted: Thu Feb 01, 2018 4:04 pm
by Optera
Only Depots may share names.
Stations with duplicate name will go into an error state signaled by pink led.

Re: copy ltn stop name bug

Posted: Thu Feb 01, 2018 4:32 pm
by Zanostra
that's not the problem, it doesn't matter if they are depot or not.

this is the situation with the names:
situation 1.png
situation 1.png (219.65 KiB) Viewed 2459 times
I used shift+rightmouse to copy station "bye", and shift+leftmouse to paste it to one of the stations "hy".
situation 2.png
situation 2.png (277.98 KiB) Viewed 2459 times
station "hy" is the last of his name, depot or not, started with 25 duplicates or 2, or in whatever order you paste them away, all doesn't matter.
the last single station that stays behind when his duplicates are pasted over, will give this message.

Re: copy ltn stop name bug

Posted: Thu Feb 01, 2018 4:44 pm
by steinio
Can reproduce.

Actions:
- place 3 LTN train stops
- shift+right click on 1st, shift+left click on 2nd - no error
- shift+right click on 3rd, shift+left click on 2nd - error invalid station
Debug Log

Re: copy ltn stop name bug

Posted: Thu Feb 01, 2018 5:54 pm
by Optera
Fixed in next release.

Added an additional check against removing wrong stop ids and turned off rename handling for on_pre_entity_settings_pasted.
If I recall i added rename handling to on_pre_entity_settings_pasted back in 0.14 when on_entity_renamed wasn't reliable.