I don't know if this is going into the Trunk, but it would be unlikely given that it's my first project and uses some really nasty stuff to work at the moment. The main thing I couldn't work out in the MiniIN is how to make a widget lowered. The new widget stuff in the trunk makes this easy, but can anyone point me to some current MiniIN code that lowers a widget that I could duplicate for the MiniIN version ?
The bulk of the code is now in place, if someone wants to put together a circling path that aircraft could use until their next destination opened up that would be great.
I'm just grabbing the Airport queueing stuff now, and have grabbed a version of the 6612 trunk (which is what the current patch is for) and I'll have a look. At first glance, it appears that there is a section that checks if an aircraft can land, so I'll have a look there and see what I can come up with.
EDIT: Well that was easy ! Aircraft now simply circle a closed airport. Much easier than looking for a new airport, and going to the hangar. I simply changed :
Code: Select all
if (!AirportHasBlock(v, current, Airport)) {
in aircraft_cmd.c:AircraftEventHandler_Flying
to
Code: Select all
if ((!AirportHasBlock(v, current, Airport)) && (can_land)) {
And earlier in the function did this :
Code: Select all
can_land=!IsStationClosedForVehicle(st,v);
And it works ! Don't know why I didn't investigate this earlier. I was thinking too hard about diverting to other airports instead of simply blocking aircraft from landing at a closed airport.
I just did a test with 16 aircraft, and it looks really odd with 16 aircraft circling an airport.
Just wondering though, would it be an idea for a diversion to be put in place to send an aircraft to another airport if all of its orders are to closed airports ? Or just leave them to circle ?