The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on January 31, 2021, 12:45:15 AM

Title: [command_x(tool_build_way) ]No longer builds river crossings
Post by: Yona-TYT on January 31, 2021, 12:45:15 AM


This is a recent problem, when building a track over a river it should automatically place a crossing (at least in pak128 it is like that), but something broke and is no longer working.
    local t = command_x(tool_build_way)     
    local c_start1 = coord3d(18,34,2)
    local c_end1 = coord3d(18,28,2)
    local err = t.work(player_x(1), c_start1, c_end1, "Road_070")

I attach a test script with a savegame.
Title: Re: [command_x(tool_build_way) ]No longer builds river crossings
Post by: Andarix on January 31, 2021, 12:55:43 AM
This is due to the crossing batch, which requires an adjustment of the crossings in the sets.

r9410 + r9431
Title: Re: [command_x(tool_build_way) ]No longer builds river crossings
Post by: Yona-TYT on January 31, 2021, 01:03:22 AM
Quote from: Andarix on January 31, 2021, 12:55:43 AM
This is due to the crossing batch, which requires an adjustment of the crossings in the sets.

r9410 + r9431

Maybe, but in that case the same should happen when using the way tool, but here it works without problem.
Title: Re: [command_x(tool_build_way) ]No longer builds river crossings
Post by: Dwachs on January 31, 2021, 10:15:20 AM
This is an effect of the change to crossing selection: the speed limit of the crossing is to low to support a crossing by the high-speed road. This affects human players as well, and is not a bug in the scripting system.
Title: Re: [command_x(tool_build_way) ]No longer builds river crossings
Post by: Yona-TYT on January 31, 2021, 12:20:14 PM
Quote from: Dwachs on January 31, 2021, 10:15:20 AMThis is an effect of the change to crossing selection: the speed limit of the crossing is to low to support a crossing by the high-speed road. This affects human players as well, and is not a bug in the scripting system.
Thank you! I just have to change the name of the road.
It is good to know that it is not an error in the script or in the code. 8)