OpenTTD

Tasklist

FS#6009 - Warn about fast planes on small airports

Attached to Project: OpenTTD
Opened by 3298 (3298) - Tuesday, 06 May 2014, 09:38 GMT
Last edited by Ingo von Borstel (planetmaker) - Tuesday, 06 May 2014, 20:58 GMT
Type Patch
Category Interface
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

A few months ago Simons Mith collected a list of UI suggestions (http://www.tt-forums.net/viewtopic.php?f=32&t=69835). This patch addresses problem 5.9.0 on that list: there is no UI feedback for fast planes ordered to land on small airports. With this patch an additional news message is inserted into the check for problems in order lists.
The check for a fast plane on a small airport has been inserted into the else-branch of the check for stations without the necessary facilities so we can be sure that the station actually has an airport facility once we know that the vehicle is a plane. The new check also includes "&& problem_type == -1" to ensure previously collected more severe warnings (e.g. invalid stations) are not overwritten.
There are a few magic numbers floating around in that function, and it only allows one warning per vehicle. Should I fix that as well?
This task depends upon

Closed by  Ingo von Borstel (planetmaker)
Tuesday, 06 May 2014, 20:58 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r26566
Comment by Ingo von Borstel (planetmaker) - Tuesday, 06 May 2014, 16:07 GMT
Only checks for void orders and invalid stations are done prior to this - too few orders and duplicate entries after this. Yet this sort order is ok for me.

I'd go for a clearer warning message, though, which explicitly tells about the too short landing strip.
Comment by 3298 (3298) - Tuesday, 06 May 2014, 17:20 GMT
Wrt. message priorities: I'm not too sure whether this one or "too few orders" should have higher priority, but other than that, a fast plane on a small airport should have a low priority. After all, the plane can use the airport (okay, with a risk), so the order is not as pointless as e.g. one with a station without any landing strip.
Wrt. message text: "{VEHICLE} has a too small airport in its orders" sounded weird to me, so I substituted "too small" for "unsuitable". I undid that in the attached version. I'm still not satisfied because now it feels like we're telling the user that the plane cannot land somewhere at all. If you have a better text, I assume you know how to deal with language files. ;)
Something else I forgot: if _settings_game.vehicle.plane_crashes is 0, not only the random crashes, but also the fast-plane-on-small-airport crashes are disabled. The warning would have triggered still, so I inserted the missing check for that in the attached version.
Comment by 3298 (3298) - Tuesday, 06 May 2014, 17:24 GMT
Crap, uploaded the old version again, and I still do not know how to edit comments (if that's possible at all)... let's try again.
Comment by Ingo von Borstel (planetmaker) - Tuesday, 06 May 2014, 20:58 GMT
Thanks for the patch and the update, I missed that setting for no crashes, too :)
You missed the place where the warnings are cleared in DeleteOrderWarnings (see r26566).

To answer your other question: unless you're an admin of the bug tracker you cannot edit entries. Amending new versions to the tracker is quite fine

Loading...