Patch: Close airports

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Patch: Close airports

Post by DaleStan »

There's another part to it too. Adding an airport may be a big change, but consistency of related items is also important. The vehicle-type buttons should all behave the same way, and since some of them could be enabled with small changes, all should be enable/disable. The close airport button is, IMO, sufficiently unrelated that it can choose its own way.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Re: Patch: Close airports

Post by CobraA1 »

I have just reread your post three times and I still do not get what point you are trying to make
I think it's a bit like this:

-If it can be enabled somehow, it should be greyed out.

-If it can't be enabled somehow, it should disappear.
is that if more buttons are later added,
Well, I see some other options:

1) Allow it to perform some similar option for other vehicle types, so it never has to disappear

2) Only allow aircraft-only buttons on the same line, so that they can all appear or disappear.

3) Place it somewhere else where it won't have that issue.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

I've rebased the patch against current nightly (r11537) and included a fix (thanks to glx) to a reported compilation warning.

EDIT: Updated the patch to r11542 and applied the proper fix.
Attachments
airport-close-v5-r11542.patch
(6.71 KiB) Downloaded 210 times
nfp
Engineer
Engineer
Posts: 1
Joined: 11 Dec 2007 11:54

Re: Patch: Close airports

Post by nfp »

this is good patch.

But meybe is whole idea of waiting planes in the air bad. In real life if you want to close airport and you want to rebuild it, you probably stop all trafic, so all planes are hidden on other airports or hangars. That can be applied to all other vehicles (trains, ships).

So what i propose is that every vehicle or ship or train or plane which wants to go to stoped station will be sent to closest depo or hangar. In case of planes not the hangar of stopped airport.
And than after you open the station all previously stopped vehicles will be unstopped.
Here can be some issue, iem not sure if its possible you must store exactly which vehicles was stopped.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Close airports

Post by Bilbo »

I suggest moving to next airport in orders in case of closed airport ... so for planes going between 3 airports, they start going between 2 of them, for planes between 2 airports they'll basically stay at the other airport. Or perhaps make it an option - move to next possible target or circle around? While circling around is less logical, it may be better from the perspective of comfort (planes will just wait a bit longer and will not spread to nearby hangars)

Also, you'll have to handle some pathological cases that the closed airport is the only one left or if both airports in the orders gets closed, etc ....
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

nfp wrote:But meybe is whole idea of waiting planes in the air bad. In real life if you want to close airport and you want to rebuild it, you probably stop all trafic, so all planes are hidden on other airports or hangars. That can be applied to all other vehicles (trains, ships).
Note that this issue is not new with this patch. It also happens if you demolish an airport with aircraft heading to it; they will arrive and circle around the now airportless station.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Close airports

Post by Bilbo »

cirdan wrote:they will arrive and circle around the now airportless station.
Once the station "decays" and disappear, airport will head to next station, or nearest hangar (no usable station in orders) and i case it was the last airport in existence, it will "run out of fuel" and crash.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Bilbo wrote:
cirdan wrote:they will arrive and circle around the now airportless station.
Once the station "decays" and disappear, airport will head to next station, or nearest hangar (no usable station in orders) and i case it was the last airport in existence, it will "run out of fuel" and crash.
And what if the station does not "decay", because it still has a bus stop, for instance? If I recall correctly, aircraft will get into the dummy airport finite state machine and happily circle around forever.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: Close airports

Post by pavel1269 »

Friendly update to this patch ;) I like this one :)
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Updated against nightly r11927.
Attachments
airport-close-v6-r11927.patch
(8.01 KiB) Downloaded 321 times
Stargazer
Engineer
Engineer
Posts: 11
Joined: 23 Jan 2008 19:46
Location: Dunstable, Beds, UK

Re: Patch: Close airports

Post by Stargazer »

I'll hopefully be giving this a go tonight...

I just want to be sure... Will this latest version cause the Desync problem like the one mentioned in the first post?
If I were Human, I believe my response would be, 'Go to Hell'...
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Stargazer wrote:I just want to be sure... Will this latest version cause the Desync problem like the one mentioned in the first post?
No, only the two first versions had that problem.

As you can see, the latest version of the patch is against r11927. Please tell me if it no longer applies cleanly, or if it breaks/doesn't work/whatever (bug reports always welcome).
imcfarla
Engineer
Engineer
Posts: 2
Joined: 10 Mar 2008 11:08

Re: Patch: Close airports

Post by imcfarla »

Hi,

This is really useful when you have very busy airports!

I have updated the patch
1) to apply to beta4
2) to keep the button in the right place when resizing the station_gui window
3) to hide the close airport button when the station is not an airport
4) to hide the close airport button when in the rating screen

Regards,

Iain
Attachments
airport-close-v7-beta4.patch
(7.97 KiB) Downloaded 222 times
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: Patch: Close airports

Post by LordAzamath »

why not to apply to beta5 :O?
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
imcfarla
Engineer
Engineer
Posts: 2
Joined: 10 Mar 2008 11:08

Re: Patch: Close airports

Post by imcfarla »

I hadn't noticed beta5 was out when I posted the patch

It does apply (with a bit of fuzziness) I just checked

Regards,

Iain
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

imcfarla wrote:Hi,

This is really useful when you have very busy airports!

I have updated the patch
1) to apply to beta4
2) to keep the button in the right place when resizing the station_gui window
Thanks for the update. I have been offline for a week, so I have not seen it until today.
imcfarla wrote:3) to hide the close airport button when the station is not an airport
Hmm, there was some discussion about this, and I think we did not reach an agreement about whether the button should be disabled or hidden in that case.

Anyway, just for the record, I stopped updating of this patch as trunk is currently in a feature freeze. I will resume development as soon as 0.6.0 is released.
User avatar
jez
Traffic Manager
Traffic Manager
Posts: 158
Joined: 23 Aug 2003 21:24

Re: Patch: Close airports

Post by jez »

(retracted, sorry!)
=== Jez ===
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

I've updated the patch against 0.6.0.

The only significant change is that the close-airport button now spans the whole width of the station window. This is required for switching between accepts and ratings views to work properly.
Attachments
airport-close-v6-0.6.0.patch
(9.82 KiB) Downloaded 1103 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Close airports

Post by planetmaker »

I updated to current trunk (r13119).
Attachments
close_airport_r13119.diff
close airport v6 updated to trunk r13119
(9.58 KiB) Downloaded 194 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Close airports

Post by planetmaker »

Update to current trunk
Attachments
close_airport_r13226.diff
updated to trunk r13226
(9.63 KiB) Downloaded 203 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 17 guests