diff options
author | planetmaker <planetmaker@openttd.org> | 2014-05-06 20:50:58 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2014-05-06 20:50:58 +0000 |
commit | 34b1d89dbe9534c1215c2d599cbf23fae2d068c4 (patch) | |
tree | c88336a26894ee14f39b460006cca2c0b8b558b8 /src | |
parent | 64c6811e42606f3a1223178f9c9380a09f5b66bb (diff) | |
download | openttd-34b1d89dbe9534c1215c2d599cbf23fae2d068c4.tar.xz |
(svn r26566) -Add [FS#6009]: Give a warning when a plane's orders tell it to use a runway which is too short for it (3298)
Diffstat (limited to 'src')
-rw-r--r-- | src/lang/english.txt | 1 | ||||
-rw-r--r-- | src/order_cmd.cpp | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt index 093d381c9..81ada1d9f 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -816,6 +816,7 @@ STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}{VEHICLE STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} has a void order STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} has duplicate orders STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} has an invalid station in its orders +STR_NEWS_PLANE_USES_TOO_SHORT_RUNWAY :{WHITE}{VEHICLE} has an airport with a too short runway in its orders # end of order system STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} is getting old diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 9aff6cde4..2fcc7bdcd 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -27,6 +27,7 @@ #include "waypoint_base.h" #include "company_base.h" #include "order_backup.h" +#include "cheat_type.h" #include "table/strings.h" @@ -657,6 +658,7 @@ static void DeleteOrderWarnings(const Vehicle *v) DeleteVehicleNews(v->index, STR_NEWS_VEHICLE_HAS_VOID_ORDER); DeleteVehicleNews(v->index, STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY); DeleteVehicleNews(v->index, STR_NEWS_VEHICLE_HAS_INVALID_ENTRY); + DeleteVehicleNews(v->index, STR_NEWS_PLANE_USES_TOO_SHORT_RUNWAY); } /** @@ -1788,7 +1790,16 @@ void CheckOrders(const Vehicle *v) const Station *st = Station::Get(order->GetDestination()); n_st++; - if (!CanVehicleUseStation(v, st)) problem_type = 3; + if (!CanVehicleUseStation(v, st)) { + problem_type = 3; + } else if (v->type == VEH_AIRCRAFT && + (AircraftVehInfo(v->engine_type)->subtype & AIR_FAST) && + (st->airport.GetFTA()->flags & AirportFTAClass::SHORT_STRIP) && + _settings_game.vehicle.plane_crashes != 0 && + !_cheats.no_jetcrash.value && + problem_type == -1) { + problem_type = 4; + } } } |