diff options
author | darkvater <darkvater@openttd.org> | 2004-11-19 19:13:32 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-11-19 19:13:32 +0000 |
commit | 249438be886bfc9be4f8048ac7a6b0e695dcc2ac (patch) | |
tree | 5c9ff0e5738b435a8d51a83e7e7abdf5ea641c61 /engine_gui.c | |
parent | d51daeab1add65308ed8ddf193fd43a7348b2ce1 (diff) | |
download | openttd-249438be886bfc9be4f8048ac7a6b0e695dcc2ac.tar.xz |
(svn r677) -newgrf: Fix some custom electric trains appearing in maglev depots (pasky).
Diffstat (limited to 'engine_gui.c')
-rw-r--r-- | engine_gui.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engine_gui.c b/engine_gui.c index 476d7122a..5217a459b 100644 --- a/engine_gui.c +++ b/engine_gui.c @@ -15,14 +15,16 @@ void DrawShipEngineInfo(int engine, int x, int y, int maxw); StringID GetEngineCategoryName(byte engine) { - if (engine < NUM_NORMAL_RAIL_ENGINES) - return STR_8102_RAILROAD_LOCOMOTIVE; - - if (engine < NUM_NORMAL_RAIL_ENGINES + NUM_MONORAIL_ENGINES) - return STR_8106_MONORAIL_LOCOMOTIVE; - - if (engine < NUM_TRAIN_ENGINES) - return STR_8107_MAGLEV_LOCOMOTIVE; + if (engine < NUM_TRAIN_ENGINES) { + switch (_engines[engine].railtype) { + case 0: + return STR_8102_RAILROAD_LOCOMOTIVE; + case 1: + return STR_8106_MONORAIL_LOCOMOTIVE; + case 2: + return STR_8107_MAGLEV_LOCOMOTIVE; + } + } if (engine < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES) return STR_8103_ROAD_VEHICLE; |