1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 08:29:11 +00:00

(svn r677) -newgrf: Fix some custom electric trains appearing in maglev depots (pasky).

This commit is contained in:
darkvater
2004-11-19 19:13:32 +00:00
parent d51daeab1a
commit 249438be88
3 changed files with 50 additions and 57 deletions

View File

@@ -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;