Whoa! Stop with that double and quadruple-posting, or our benevolent dictator might become less benevolent.
My apologies. I read the rules when I first registered here, but I've not been able to spare anywhere near as much time on simutrans as I'd like. As a result, I've posted only infrequently, and forgot the rules. I just reviewed them and saw that we're not supposed to post a second message on a given thread within 24 hours. So I'll put my responses to all the message I've a response to, in a single message.
They were created this morning, to answer your request
A schedule entry is used for vehicle routing. If the entry belongs to a station then get_halt() will return the station object.
What are you trying to achieve with these stations?
The recent announcement of a new version of simutrans caused me to take a look at the scenario scripting documentation for the first time. When I did, I realized that it would make it a lot easier to implement an idea I'd had for some time.
The scenario involves a disaster that requires a rapid reconfiguration of the transportation network. The government has temporarily given the player emergency control of those parts of the transportation network that will need the biggest changes, and a budget big enough to last until the new network becomes profitable (if managed carefully). However, in order to allow the human player to concentrate attention on that part of the network, the parts of the network that should not need significant reconfiguration are left in the hands of AI players. Those players should be cooperating with the human player, not competing. The government has assigned a specific domain of responsibility for each player, human and AI, delimited by geography, waytype, and good category, so they won't interfere with each other. I'm using the forbid*() functions to implement many of those restrictions, but I'm also defining the is_schedule_allowed() function.
In particular, some of the restrictions I'm applying to non-air schedules depend upon whether or not one of the stops on the schedule is at an airport station. An airport station means any station containing at least one tile where building_desc_x::get_type() == station and building_desc_x::get_waytype() == wt_air. The function halt_x::get_tile_list() makes it a lot easier to check that.
Another restriction I'm applying depends upon which goods are intended to be transported by a given line. I don't have the power to veto an AI player's choice of which convoys to assign to a given schedule, so checking convoy_x::get_goods_catg_index() isn't an option, but calling halt_x::get_factory_list() for each halt in a schedule, would allow me to identify likely candidates.
I considered imposing similar restrictions on the human player, but ended up deciding against it. Letting the AI players run part of the transportation network was meant to remove distractions, but if the AI players mess something up, being unable to fix it would be an even bigger distraction.