The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: koa_jp on January 23, 2025, 03:25:36 PM

Title: [r11590] parameter "rotation" of command.build_station is wrong
Post by: koa_jp on January 23, 2025, 03:25:36 PM
When I use command.build_station in ver123.0.1(r10421), 4th parameter "rotation" was output correctly.
But in r11590, rotation=1 is station office dir=dir.east, rotation=2 is station office dir=dir.south,
rotation=4 is station office dir=dir.north(It's right), rotation=8 is station office dir=dir.north.
OK_sta_office.png
wrong_sta_office1.png
wrong_sta_office2.png
wrong_sta_office3.png

Has the behavior of build_station changed recently?
Title: Re: [r11590] parameter "rotation" of command.build_station is wrong
Post by: prissi on January 24, 2025, 08:35:54 AM
There was an error in the old code. Station buildings can have up to 16 rotations (layouts) but there are only four dirs. Thus the correct behaviour is to submit the layout, not a dir or a ribi.

I am not sure what your code outputs. I would need to see the squirrel source.