The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on April 07, 2017, 04:35:44 PM

Title: [FIXED] "is_schedule_allowed" does not work with empty schedule
Post by: Yona-TYT on April 07, 2017, 04:35:44 PM
I already mentioned this here:
Quote from: Yona-TYT on April 02, 2017, 06:34:51 PM
The problem is that "is_schedule_allowed (pl, schedule)" only works when there is more than one station, therefore there is no way to know if the station was selected. I can solve using the "Marked Tile" to determine if the stop was selected.

(https://www.mediafire.com/convkey/3b42/ydil4tmfx508f7t6g.jpg)

I changed line 548 in "/dataobj/scenario.cc":
if (schedule->empty()  ||  env_t::server) {

by:
if (env_t::server) {

It works well for me.
Title: Re: "is_schedule_allowed" does not work with a waypoint.
Post by: Dwachs on April 07, 2017, 07:09:23 PM
Ok: this is changed in r8198
Title: Re: "is_schedule_allowed" does not work with a waypoint.
Post by: Yona-TYT on April 07, 2017, 11:37:39 PM
Thank you very much, now I can solve some problems with the scenario.  ;D