Transport Fever 2

Transport Fever 2

Smart station naming
GordonDry 2023 年 5 月 1 日 上午 11:50
(likely not) possible issue with Freestyle Train Station
Especially during the creation process of a station with
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2363493916
it could be counter intiutive and trigger a crash if the station is renamed while the Freestyle Train Station script still assumes it got the old name.
I'm not sure, this is an assumption.
I ask @lollus by cross-reference:
https://psteamcommunity.yuanyoumao.com/workshop/filedetails/discussion/2363493916/3108016147991274001/?ctp=2#c3825288480069537483

Perhaps limit its functionality to only run when no construction build UI is open?
最后由 GordonDry 编辑于; 2023 年 5 月 5 日 上午 11:59
< >
正在显示第 1 - 7 条,共 7 条留言
lollus 2023 年 5 月 1 日 下午 1:14 
I don't know, I don't use this mod. The freestyle station does not receive an automatic name like ordinary stations, so it always becomes "New Station". It's probably best to teach this mod to ignore freestyle stations.
GordonDry 2023 年 5 月 1 日 下午 1:35 
@lollus:
I just witnessed that a station was renamed from "New Station" to the name of the nearest industry after a couple of seconds.

But you are most likely right, because after loading the save I did prior placing the markers I just waited a little bit after the station was renamed, manually renamed it by myself and then continued adding markers.
It still crashed.
lollus 2023 年 5 月 1 日 下午 1:39 
Does it crash without any other mods enabled? If so, try and send me a savegame with swisstransfer.
Konrad  [开发者] 2023 年 5 月 2 日 上午 10:02 
Thanks for the information - I'll take a look at this when I have a bit more time, but it may take a while and I'm not sure if there can be a real solution to knowing which things do not like being renamed, or what it would look like.
lollus 2023 年 5 月 2 日 上午 11:44 
You can check the construction file name: if it is 'station/rail/lollo_freestyle_train_station/station.con' then skip.
最后由 lollus 编辑于; 2023 年 5 月 2 日 上午 11:44
Konrad  [开发者] 2023 年 5 月 5 日 上午 11:20 
I have looked at this and could not reproduce the issue. In fact, my mod does not react at all to events from the freestyle station mod, because that mod does not send standard constructionBuilder builder.apply GUI events -- at least, it did not while I tested it.

You can test that yourself by adding a "debugPrint(entity)" at line 49: https://github.com/Konrad2023/SmartStationNaming/blob/master/res/config/game_script/smart_station_naming.lua#L49 and observe which events actually even trigger my mod's logic.
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50