summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine.h1
-rw-r--r--engine_gui.c2
-rw-r--r--newgrf.c8
-rw-r--r--table/engines.h240
-rw-r--r--train_cmd.c6
-rw-r--r--train_gui.c2
6 files changed, 130 insertions, 129 deletions
diff --git a/engine.h b/engine.h
index 3f3ff5507..be8e21aa7 100644
--- a/engine.h
+++ b/engine.h
@@ -16,6 +16,7 @@ typedef struct RailVehicleInfo {
uint16 power;
uint16 weight;
byte running_cost_base;
+ byte running_cost_class;
byte engclass; // 0: steam, 1: diesel, 2: electric
byte capacity;
byte cargo_type;
diff --git a/engine_gui.c b/engine_gui.c
index 401c19def..da33fac3d 100644
--- a/engine_gui.c
+++ b/engine_gui.c
@@ -131,7 +131,7 @@ static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
SetDParam(3, rvi->power << multihead);
SetDParam(1, rvi->weight << multihead);
- SetDParam(4, rvi->running_cost_base * _price.running_rail[rvi->engclass] >> 8 << multihead);
+ SetDParam(4, rvi->running_cost_base * _price.running_rail[rvi->running_cost_class] >> 8 << multihead);
if (rvi->capacity != 0) {
SetDParam(5, _cargoc.names_long[rvi->cargo_type]);
diff --git a/newgrf.c b/newgrf.c
index 908e719f9..989677d22 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -262,9 +262,9 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
uint32 base = grf_load_dword(&buf);
switch (base) {
- case 0x4C30: rvi[i].engclass = 0; break;
- case 0x4C36: rvi[i].engclass = 1; break;
- case 0x4C3C: rvi[i].engclass = 2; break;
+ case 0x4C30: rvi[i].running_cost_class = 0; break;
+ case 0x4C36: rvi[i].running_cost_class = 1; break;
+ case 0x4C3C: rvi[i].running_cost_class = 2; break;
}
dewagonize(base, engine + i);
}
@@ -291,7 +291,7 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
if (rvi[i].flags & RVI_MULTIHEAD) {
// adjust power and running cost if needed
rvi[i].power *= 2;
- rvi[i].running_cost_base /= 2;
+ rvi[i].running_cost_base *= 2;
}
rvi[i].flags &= ~RVI_MULTIHEAD;
}
diff --git a/table/engines.h b/table/engines.h
index df9b9bc25..7926020fd 100644
--- a/table/engines.h
+++ b/table/engines.h
@@ -311,126 +311,126 @@ const EngineInfo orig_engine_info[] = {
#define W RVI_WAGON
const RailVehicleInfo orig_rail_vehicle_info[NUM_TRAIN_ENGINES] = {
// image_index max_speed (kph) running_cost_base callbackmask shortened factor
- // | flags | power (hp) | running_cost_class | powered wagons power
- // | | base_cost | weight | capacity | | powered wagons weight
- // | | | | | | | | | cargo_type | | | visual effects
- // | | | | | | | | | | | | | | |
- { 2, 0, 7, 64, 300, 47, 50, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 0 */
- { 19, 0, 8, 80, 600, 65, 65, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 1 */
- { 2, 0, 10, 72, 400, 85, 90, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 2 */
- { 0, 0, 15, 96, 900, 130, 130, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 3 */
- { 1, 0, 19, 112, 1000, 140, 145, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 4 */
- { 12, 0, 16, 120, 1400, 95, 125, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 5 */
- { 14, 0, 20, 152, 2000, 120, 135, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 6 */
- { 3, 0, 14, 88, 1100, 145, 130, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 7 */
- { 0, 0, 13, 112, 1000, 131, 120, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 8 */
- { 1, 0, 19, 128, 1200, 162, 140, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 9 */
- { 0, 0, 22, 144, 1600, 170, 130, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 10 */
- { 8, M, 11, 112, 600/2,32/2, 85/2, 1, 38, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 11 */
- { 10, M, 14, 120, 700/2,38/2, 70/2, 1, 40, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 12 */
- { 4, 0, 15, 128, 1250, 72, 95, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 13 */
- { 5, 0, 17, 144, 1750, 101, 120, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 14 */
- { 4, 0, 18, 160, 2580, 112, 140, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 15 */
- { 14, 0, 23, 96, 4000, 150, 135, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 16 */
- { 12, 0, 16, 112, 2400, 120, 105, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 17 */
- { 13, 0, 30, 112, 6600, 207, 155, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 18 */
- { 15, 0, 18, 104, 1500, 110, 105, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 19 */
- { 16, M, 35, 160, 3500/2,95/2, 205/2, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 20 */
- { 18, 0, 21, 104, 2200, 120, 145, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 21 */
- { 6, M, 20, 200, 4500/2,70/2, 190/2, 1, 4, CT_MAIL , 0, 0, 0, 0, 0 }, /* 22 */
- { 20, 0, 26, 160, 3600, 84, 180, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 23 */
- { 20, 0, 30, 176, 5000, 82, 205, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 24 */
- { 21, M, 40, 240, 7000/2,90/2, 240/2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 25 */
- { 23, M, 43, 264, 8000/2,95/2, 250/2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 26 */
- { 33, W, 247, 0, 0, 25, 0, 0, 40, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 27 */
- { 35, W, 228, 0, 0, 21, 0, 0, 30, CT_MAIL , 0, 0, 0, 0, 0 }, /* 28 */
- { 34, W, 176, 0, 0, 18, 0, 0, 30, CT_COAL , 0, 0, 0, 0, 0 }, /* 29 */
- { 36, W, 200, 0, 0, 24, 0, 0, 30, CT_OIL , 0, 0, 0, 0, 0 }, /* 30 */
- { 37, W, 192, 0, 0, 20, 0, 0, 25, CT_LIVESTOCK , 0, 0, 0, 0, 0 }, /* 31 */
- { 38, W, 190, 0, 0, 21, 0, 0, 25, CT_GOODS , 0, 0, 0, 0, 0 }, /* 32 */
- { 39, W, 182, 0, 0, 19, 0, 0, 30, CT_GRAIN , 0, 0, 0, 0, 0 }, /* 33 */
- { 40, W, 181, 0, 0, 16, 0, 0, 30, CT_WOOD , 0, 0, 0, 0, 0 }, /* 34 */
- { 41, W, 179, 0, 0, 19, 0, 0, 30, CT_IRON_ORE , 0, 0, 0, 0, 0 }, /* 35 */
- { 42, W, 196, 0, 0, 18, 0, 0, 20, CT_STEEL , 0, 0, 0, 0, 0 }, /* 36 */
- { 43, W, 255, 0, 0, 30, 0, 0, 20, CT_VALUABLES , 0, 0, 0, 0, 0 }, /* 37 */
- { 44, W, 191, 0, 0, 22, 0, 0, 25, CT_FOOD , 0, 0, 0, 0, 0 }, /* 38 */
- { 45, W, 196, 0, 0, 18, 0, 0, 20, CT_PAPER , 0, 0, 0, 0, 0 }, /* 39 */
- { 46, W, 179, 0, 0, 19, 0, 0, 30, CT_COPPER_ORE , 0, 0, 0, 0, 0 }, /* 40 */
- { 47, W, 199, 0, 0, 25, 0, 0, 25, CT_WATER , 0, 0, 0, 0, 0 }, /* 41 */
- { 48, W, 182, 0, 0, 18, 0, 0, 25, CT_FRUIT , 0, 0, 0, 0, 0 }, /* 42 */
- { 49, W, 185, 0, 0, 19, 0, 0, 21, CT_RUBBER , 0, 0, 0, 0, 0 }, /* 43 */
- { 50, W, 176, 0, 0, 19, 0, 0, 30, CT_SUGAR , 0, 0, 0, 0, 0 }, /* 44 */
- { 51, W, 178, 0, 0, 20, 0, 0, 30, CT_COTTON_CANDY , 0, 0, 0, 0, 0 }, /* 45 */
- { 52, W, 192, 0, 0, 20, 0, 0, 30, CT_TOFFEE , 0, 0, 0, 0, 0 }, /* 46 */
- { 53, W, 190, 0, 0, 21, 0, 0, 20, CT_BUBBLES , 0, 0, 0, 0, 0 }, /* 47 */
- { 54, W, 182, 0, 0, 24, 0, 0, 25, CT_COLA , 0, 0, 0, 0, 0 }, /* 48 */
- { 55, W, 181, 0, 0, 21, 0, 0, 25, CT_CANDY , 0, 0, 0, 0, 0 }, /* 49 */
- { 56, W, 183, 0, 0, 21, 0, 0, 20, CT_TOYS , 0, 0, 0, 0, 0 }, /* 50 */
- { 57, W, 196, 0, 0, 18, 0, 0, 22, CT_BATTERIES , 0, 0, 0, 0, 0 }, /* 51 */
- { 58, W, 193, 0, 0, 18, 0, 0, 25, CT_FIZZY_DRINKS , 0, 0, 0, 0, 0 }, /* 52 */
- { 59, W, 191, 0, 0, 18, 0, 0, 30, CT_PLASTIC , 0, 0, 0, 0, 0 }, /* 53 */
- { 25, 0, 52, 304, 9000, 95, 230, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 54 */
- { 26, M, 60, 336, 10000/2,85/2, 240/2, 2, 25, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 55 */
- { 26, 0, 53, 320, 5000, 95, 230, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 56 */
- { 60, W, 247, 0, 0, 25, 0, 0, 45, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 57 */
- { 62, W, 228, 0, 0, 21, 0, 0, 35, CT_MAIL , 0, 0, 0, 0, 0 }, /* 58 */
- { 61, W, 176, 0, 0, 18, 0, 0, 35, CT_COAL , 0, 0, 0, 0, 0 }, /* 59 */
- { 63, W, 200, 0, 0, 24, 0, 0, 35, CT_OIL , 0, 0, 0, 0, 0 }, /* 60 */
- { 64, W, 192, 0, 0, 20, 0, 0, 30, CT_LIVESTOCK , 0, 0, 0, 0, 0 }, /* 61 */
- { 65, W, 190, 0, 0, 21, 0, 0, 30, CT_GOODS , 0, 0, 0, 0, 0 }, /* 62 */
- { 66, W, 182, 0, 0, 19, 0, 0, 35, CT_GRAIN , 0, 0, 0, 0, 0 }, /* 63 */
- { 67, W, 181, 0, 0, 16, 0, 0, 35, CT_WOOD , 0, 0, 0, 0, 0 }, /* 64 */
- { 68, W, 179, 0, 0, 19, 0, 0, 35, CT_IRON_ORE , 0, 0, 0, 0, 0 }, /* 65 */
- { 69, W, 196, 0, 0, 18, 0, 0, 25, CT_STEEL , 0, 0, 0, 0, 0 }, /* 66 */
- { 70, W, 255, 0, 0, 30, 0, 0, 25, CT_VALUABLES , 0, 0, 0, 0, 0 }, /* 67 */
- { 71, W, 191, 0, 0, 22, 0, 0, 30, CT_FOOD , 0, 0, 0, 0, 0 }, /* 68 */
- { 72, W, 196, 0, 0, 18, 0, 0, 25, CT_PAPER , 0, 0, 0, 0, 0 }, /* 69 */
- { 73, W, 179, 0, 0, 19, 0, 0, 35, CT_COPPER_ORE , 0, 0, 0, 0, 0 }, /* 70 */
- { 47, W, 199, 0, 0, 25, 0, 0, 30, CT_WATER , 0, 0, 0, 0, 0 }, /* 71 */
- { 48, W, 182, 0, 0, 18, 0, 0, 30, CT_FRUIT , 0, 0, 0, 0, 0 }, /* 72 */
- { 49, W, 185, 0, 0, 19, 0, 0, 26, CT_RUBBER , 0, 0, 0, 0, 0 }, /* 73 */
- { 50, W, 176, 0, 0, 19, 0, 0, 35, CT_SUGAR , 0, 0, 0, 0, 0 }, /* 74 */
- { 51, W, 178, 0, 0, 20, 0, 0, 35, CT_COTTON_CANDY , 0, 0, 0, 0, 0 }, /* 75 */
- { 52, W, 192, 0, 0, 20, 0, 0, 35, CT_TOFFEE , 0, 0, 0, 0, 0 }, /* 76 */
- { 53, W, 190, 0, 0, 21, 0, 0, 25, CT_BUBBLES , 0, 0, 0, 0, 0 }, /* 77 */
- { 54, W, 182, 0, 0, 24, 0, 0, 30, CT_COLA , 0, 0, 0, 0, 0 }, /* 78 */
- { 55, W, 181, 0, 0, 21, 0, 0, 30, CT_CANDY , 0, 0, 0, 0, 0 }, /* 79 */
- { 56, W, 183, 0, 0, 21, 0, 0, 25, CT_TOYS , 0, 0, 0, 0, 0 }, /* 80 */
- { 57, W, 196, 0, 0, 18, 0, 0, 27, CT_BATTERIES , 0, 0, 0, 0, 0 }, /* 81 */
- { 58, W, 193, 0, 0, 18, 0, 0, 30, CT_FIZZY_DRINKS , 0, 0, 0, 0, 0 }, /* 82 */
- { 59, W, 191, 0, 0, 18, 0, 0, 35, CT_PLASTIC , 0, 0, 0, 0, 0 }, /* 83 */
- { 28, 0, 70, 400, 10000, 105, 250, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 84 */
- { 29, 0, 74, 448, 12000, 120, 253, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 85 */
- { 30, 0, 82, 480, 15000, 130, 254, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 86 */
- { 31, M, 95, 640, 20000/2,150/2,255/2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 87 */
- { 28, 0, 70, 480, 10000, 120, 250, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 88 */
- { 60, W, 247, 0, 0, 25, 0, 0, 47, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 89 */
- { 62, W, 228, 0, 0, 21, 0, 0, 37, CT_MAIL , 0, 0, 0, 0, 0 }, /* 90 */
- { 61, W, 176, 0, 0, 18, 0, 0, 37, CT_COAL , 0, 0, 0, 0, 0 }, /* 91 */
- { 63, W, 200, 0, 0, 24, 0, 0, 37, CT_OIL , 0, 0, 0, 0, 0 }, /* 92 */
- { 64, W, 192, 0, 0, 20, 0, 0, 32, CT_LIVESTOCK , 0, 0, 0, 0, 0 }, /* 93 */
- { 65, W, 190, 0, 0, 21, 0, 0, 32, CT_GOODS , 0, 0, 0, 0, 0 }, /* 94 */
- { 66, W, 182, 0, 0, 19, 0, 0, 37, CT_GRAIN , 0, 0, 0, 0, 0 }, /* 95 */
- { 67, W, 181, 0, 0, 16, 0, 0, 37, CT_WOOD , 0, 0, 0, 0, 0 }, /* 96 */
- { 68, W, 179, 0, 0, 19, 0, 0, 37, CT_IRON_ORE , 0, 0, 0, 0, 0 }, /* 97 */
- { 69, W, 196, 0, 0, 18, 0, 0, 27, CT_STEEL , 0, 0, 0, 0, 0 }, /* 98 */
- { 70, W, 255, 0, 0, 30, 0, 0, 27, CT_VALUABLES , 0, 0, 0, 0, 0 }, /* 99 */
- { 71, W, 191, 0, 0, 22, 0, 0, 32, CT_FOOD , 0, 0, 0, 0, 0 }, /* 100 */
- { 72, W, 196, 0, 0, 18, 0, 0, 27, CT_PAPER , 0, 0, 0, 0, 0 }, /* 101 */
- { 73, W, 179, 0, 0, 19, 0, 0, 37, CT_COPPER_ORE , 0, 0, 0, 0, 0 }, /* 102 */
- { 47, W, 199, 0, 0, 25, 0, 0, 32, CT_WATER , 0, 0, 0, 0, 0 }, /* 103 */
- { 48, W, 182, 0, 0, 18, 0, 0, 32, CT_FRUIT , 0, 0, 0, 0, 0 }, /* 104 */
- { 49, W, 185, 0, 0, 19, 0, 0, 28, CT_RUBBER , 0, 0, 0, 0, 0 }, /* 105 */
- { 50, W, 176, 0, 0, 19, 0, 0, 37, CT_SUGAR , 0, 0, 0, 0, 0 }, /* 106 */
- { 51, W, 178, 0, 0, 20, 0, 0, 37, CT_COTTON_CANDY , 0, 0, 0, 0, 0 }, /* 107 */
- { 52, W, 192, 0, 0, 20, 0, 0, 37, CT_TOFFEE , 0, 0, 0, 0, 0 }, /* 108 */
- { 53, W, 190, 0, 0, 21, 0, 0, 27, CT_BUBBLES , 0, 0, 0, 0, 0 }, /* 109 */
- { 54, W, 182, 0, 0, 24, 0, 0, 32, CT_COLA , 0, 0, 0, 0, 0 }, /* 110 */
- { 55, W, 181, 0, 0, 21, 0, 0, 32, CT_CANDY , 0, 0, 0, 0, 0 }, /* 111 */
- { 56, W, 183, 0, 0, 21, 0, 0, 27, CT_TOYS , 0, 0, 0, 0, 0 }, /* 112 */
- { 57, W, 196, 0, 0, 18, 0, 0, 29, CT_BATTERIES , 0, 0, 0, 0, 0 }, /* 113 */
- { 58, W, 193, 0, 0, 18, 0, 0, 32, CT_FIZZY_DRINKS , 0, 0, 0, 0, 0 }, /* 114 */
- { 59, W, 191, 0, 0, 18, 0, 0, 37, CT_PLASTIC , 0, 0, 0, 0, 0 }, /* 115 */
+ // | flags | power (hp) | running_cost_class | powered wagons power
+ // | | base_cost | weight | | engclass | | powered wagons weight
+ // | | | | | | | | | capacity | | | visual effects
+ // | | | | | | | | | | cargo_type | | | | |
+ { 2, 0, 7, 64, 300, 47, 50, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 0 */
+ { 19, 0, 8, 80, 600, 65, 65, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 1 */
+ { 2, 0, 10, 72, 400, 85, 90, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 2 */
+ { 0, 0, 15, 96, 900, 130, 130, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 3 */
+ { 1, 0, 19, 112, 1000, 140, 145, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 4 */
+ { 12, 0, 16, 120, 1400, 95, 125, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 5 */
+ { 14, 0, 20, 152, 2000, 120, 135, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 6 */
+ { 3, 0, 14, 88, 1100, 145, 130, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 7 */
+ { 0, 0, 13, 112, 1000, 131, 120, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 8 */
+ { 1, 0, 19, 128, 1200, 162, 140, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 9 */
+ { 0, 0, 22, 144, 1600, 170, 130, 0, 0, 0, 0 , 0, 0, 0, 0, 0 }, /* 10 */
+ { 8, M, 11, 112, 600/2,32/2, 85/2, 1, 1, 38, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 11 */
+ { 10, M, 14, 120, 700/2,38/2, 70/2, 1, 1, 40, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 12 */
+ { 4, 0, 15, 128, 1250, 72, 95, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 13 */
+ { 5, 0, 17, 144, 1750, 101, 120, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 14 */
+ { 4, 0, 18, 160, 2580, 112, 140, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 15 */
+ { 14, 0, 23, 96, 4000, 150, 135, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 16 */
+ { 12, 0, 16, 112, 2400, 120, 105, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 17 */
+ { 13, 0, 30, 112, 6600, 207, 155, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 18 */
+ { 15, 0, 18, 104, 1500, 110, 105, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 19 */
+ { 16, M, 35, 160, 3500/2,95/2, 205/2, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 20 */
+ { 18, 0, 21, 104, 2200, 120, 145, 1, 1, 0, 0 , 0, 0, 0, 0, 0 }, /* 21 */
+ { 6, M, 20, 200, 4500/2,70/2, 190/2, 1, 1, 4, CT_MAIL , 0, 0, 0, 0, 0 }, /* 22 */
+ { 20, 0, 26, 160, 3600, 84, 180, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 23 */
+ { 20, 0, 30, 176, 5000, 82, 205, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 24 */
+ { 21, M, 40, 240, 7000/2,90/2, 240/2, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 25 */
+ { 23, M, 43, 264, 8000/2,95/2, 250/2, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 26 */
+ { 33, W, 247, 0, 0, 25, 0, 0, 0, 40, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 27 */
+ { 35, W, 228, 0, 0, 21, 0, 0, 0, 30, CT_MAIL , 0, 0, 0, 0, 0 }, /* 28 */
+ { 34, W, 176, 0, 0, 18, 0, 0, 0, 30, CT_COAL , 0, 0, 0, 0, 0 }, /* 29 */
+ { 36, W, 200, 0, 0, 24, 0, 0, 0, 30, CT_OIL , 0, 0, 0, 0, 0 }, /* 30 */
+ { 37, W, 192, 0, 0, 20, 0, 0, 0, 25, CT_LIVESTOCK , 0, 0, 0, 0, 0 }, /* 31 */
+ { 38, W, 190, 0, 0, 21, 0, 0, 0, 25, CT_GOODS , 0, 0, 0, 0, 0 }, /* 32 */
+ { 39, W, 182, 0, 0, 19, 0, 0, 0, 30, CT_GRAIN , 0, 0, 0, 0, 0 }, /* 33 */
+ { 40, W, 181, 0, 0, 16, 0, 0, 0, 30, CT_WOOD , 0, 0, 0, 0, 0 }, /* 34 */
+ { 41, W, 179, 0, 0, 19, 0, 0, 0, 30, CT_IRON_ORE , 0, 0, 0, 0, 0 }, /* 35 */
+ { 42, W, 196, 0, 0, 18, 0, 0, 0, 20, CT_STEEL , 0, 0, 0, 0, 0 }, /* 36 */
+ { 43, W, 255, 0, 0, 30, 0, 0, 0, 20, CT_VALUABLES , 0, 0, 0, 0, 0 }, /* 37 */
+ { 44, W, 191, 0, 0, 22, 0, 0, 0, 25, CT_FOOD , 0, 0, 0, 0, 0 }, /* 38 */
+ { 45, W, 196, 0, 0, 18, 0, 0, 0, 20, CT_PAPER , 0, 0, 0, 0, 0 }, /* 39 */
+ { 46, W, 179, 0, 0, 19, 0, 0, 0, 30, CT_COPPER_ORE , 0, 0, 0, 0, 0 }, /* 40 */
+ { 47, W, 199, 0, 0, 25, 0, 0, 0, 25, CT_WATER , 0, 0, 0, 0, 0 }, /* 41 */
+ { 48, W, 182, 0, 0, 18, 0, 0, 0, 25, CT_FRUIT , 0, 0, 0, 0, 0 }, /* 42 */
+ { 49, W, 185, 0, 0, 19, 0, 0, 0, 21, CT_RUBBER , 0, 0, 0, 0, 0 }, /* 43 */
+ { 50, W, 176, 0, 0, 19, 0, 0, 0, 30, CT_SUGAR , 0, 0, 0, 0, 0 }, /* 44 */
+ { 51, W, 178, 0, 0, 20, 0, 0, 0, 30, CT_COTTON_CANDY , 0, 0, 0, 0, 0 }, /* 45 */
+ { 52, W, 192, 0, 0, 20, 0, 0, 0, 30, CT_TOFFEE , 0, 0, 0, 0, 0 }, /* 46 */
+ { 53, W, 190, 0, 0, 21, 0, 0, 0, 20, CT_BUBBLES , 0, 0, 0, 0, 0 }, /* 47 */
+ { 54, W, 182, 0, 0, 24, 0, 0, 0, 25, CT_COLA , 0, 0, 0, 0, 0 }, /* 48 */
+ { 55, W, 181, 0, 0, 21, 0, 0, 0, 25, CT_CANDY , 0, 0, 0, 0, 0 }, /* 49 */
+ { 56, W, 183, 0, 0, 21, 0, 0, 0, 20, CT_TOYS , 0, 0, 0, 0, 0 }, /* 50 */
+ { 57, W, 196, 0, 0, 18, 0, 0, 0, 22, CT_BATTERIES , 0, 0, 0, 0, 0 }, /* 51 */
+ { 58, W, 193, 0, 0, 18, 0, 0, 0, 25, CT_FIZZY_DRINKS , 0, 0, 0, 0, 0 }, /* 52 */
+ { 59, W, 191, 0, 0, 18, 0, 0, 0, 30, CT_PLASTIC , 0, 0, 0, 0, 0 }, /* 53 */
+ { 25, 0, 52, 304, 9000, 95, 230, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 54 */
+ { 26, M, 60, 336, 10000/2,85/2, 240/2, 2, 2, 25, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 55 */
+ { 26, 0, 53, 320, 5000, 95, 230, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 56 */
+ { 60, W, 247, 0, 0, 25, 0, 0, 0, 45, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 57 */
+ { 62, W, 228, 0, 0, 21, 0, 0, 0, 35, CT_MAIL , 0, 0, 0, 0, 0 }, /* 58 */
+ { 61, W, 176, 0, 0, 18, 0, 0, 0, 35, CT_COAL , 0, 0, 0, 0, 0 }, /* 59 */
+ { 63, W, 200, 0, 0, 24, 0, 0, 0, 35, CT_OIL , 0, 0, 0, 0, 0 }, /* 60 */
+ { 64, W, 192, 0, 0, 20, 0, 0, 0, 30, CT_LIVESTOCK , 0, 0, 0, 0, 0 }, /* 61 */
+ { 65, W, 190, 0, 0, 21, 0, 0, 0, 30, CT_GOODS , 0, 0, 0, 0, 0 }, /* 62 */
+ { 66, W, 182, 0, 0, 19, 0, 0, 0, 35, CT_GRAIN , 0, 0, 0, 0, 0 }, /* 63 */
+ { 67, W, 181, 0, 0, 16, 0, 0, 0, 35, CT_WOOD , 0, 0, 0, 0, 0 }, /* 64 */
+ { 68, W, 179, 0, 0, 19, 0, 0, 0, 35, CT_IRON_ORE , 0, 0, 0, 0, 0 }, /* 65 */
+ { 69, W, 196, 0, 0, 18, 0, 0, 0, 25, CT_STEEL , 0, 0, 0, 0, 0 }, /* 66 */
+ { 70, W, 255, 0, 0, 30, 0, 0, 0, 25, CT_VALUABLES , 0, 0, 0, 0, 0 }, /* 67 */
+ { 71, W, 191, 0, 0, 22, 0, 0, 0, 30, CT_FOOD , 0, 0, 0, 0, 0 }, /* 68 */
+ { 72, W, 196, 0, 0, 18, 0, 0, 0, 25, CT_PAPER , 0, 0, 0, 0, 0 }, /* 69 */
+ { 73, W, 179, 0, 0, 19, 0, 0, 0, 35, CT_COPPER_ORE , 0, 0, 0, 0, 0 }, /* 70 */
+ { 47, W, 199, 0, 0, 25, 0, 0, 0, 30, CT_WATER , 0, 0, 0, 0, 0 }, /* 71 */
+ { 48, W, 182, 0, 0, 18, 0, 0, 0, 30, CT_FRUIT , 0, 0, 0, 0, 0 }, /* 72 */
+ { 49, W, 185, 0, 0, 19, 0, 0, 0, 26, CT_RUBBER , 0, 0, 0, 0, 0 }, /* 73 */
+ { 50, W, 176, 0, 0, 19, 0, 0, 0, 35, CT_SUGAR , 0, 0, 0, 0, 0 }, /* 74 */
+ { 51, W, 178, 0, 0, 20, 0, 0, 0, 35, CT_COTTON_CANDY , 0, 0, 0, 0, 0 }, /* 75 */
+ { 52, W, 192, 0, 0, 20, 0, 0, 0, 35, CT_TOFFEE , 0, 0, 0, 0, 0 }, /* 76 */
+ { 53, W, 190, 0, 0, 21, 0, 0, 0, 25, CT_BUBBLES , 0, 0, 0, 0, 0 }, /* 77 */
+ { 54, W, 182, 0, 0, 24, 0, 0, 0, 30, CT_COLA , 0, 0, 0, 0, 0 }, /* 78 */
+ { 55, W, 181, 0, 0, 21, 0, 0, 0, 30, CT_CANDY , 0, 0, 0, 0, 0 }, /* 79 */
+ { 56, W, 183, 0, 0, 21, 0, 0, 0, 25, CT_TOYS , 0, 0, 0, 0, 0 }, /* 80 */
+ { 57, W, 196, 0, 0, 18, 0, 0, 0, 27, CT_BATTERIES , 0, 0, 0, 0, 0 }, /* 81 */
+ { 58, W, 193, 0, 0, 18, 0, 0, 0, 30, CT_FIZZY_DRINKS , 0, 0, 0, 0, 0 }, /* 82 */
+ { 59, W, 191, 0, 0, 18, 0, 0, 0, 35, CT_PLASTIC , 0, 0, 0, 0, 0 }, /* 83 */
+ { 28, 0, 70, 400, 10000, 105, 250, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 84 */
+ { 29, 0, 74, 448, 12000, 120, 253, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 85 */
+ { 30, 0, 82, 480, 15000, 130, 254, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 86 */
+ { 31, M, 95, 640, 20000/2,150/2,255/2, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 87 */
+ { 28, 0, 70, 480, 10000, 120, 250, 2, 2, 0, 0 , 0, 0, 0, 0, 0 }, /* 88 */
+ { 60, W, 247, 0, 0, 25, 0, 0, 0, 47, CT_PASSENGERS , 0, 0, 0, 0, 0 }, /* 89 */
+ { 62, W, 228, 0, 0, 21, 0, 0, 0, 37, CT_MAIL , 0, 0, 0, 0, 0 }, /* 90 */
+ { 61, W, 176, 0, 0, 18, 0, 0, 0, 37, CT_COAL , 0, 0, 0, 0, 0 }, /* 91 */
+ { 63, W, 200, 0, 0, 24, 0, 0, 0, 37, CT_OIL , 0, 0, 0, 0, 0 }, /* 92 */
+ { 64, W, 192, 0, 0, 20, 0, 0, 0, 32, CT_LIVESTOCK , 0, 0, 0, 0, 0 }, /* 93 */
+ { 65, W, 190, 0, 0, 21, 0, 0, 0, 32, CT_GOODS , 0, 0, 0, 0, 0 }, /* 94 */
+ { 66, W, 182, 0, 0, 19, 0, 0, 0, 37, CT_GRAIN , 0, 0, 0, 0, 0 }, /* 95 */
+ { 67, W, 181, 0, 0, 16, 0, 0, 0, 37, CT_WOOD , 0, 0, 0, 0, 0 }, /* 96 */
+ { 68, W, 179, 0, 0, 19, 0, 0, 0, 37, CT_IRON_ORE , 0, 0, 0, 0, 0 }, /* 97 */
+ { 69, W, 196, 0, 0, 18, 0, 0, 0, 27, CT_STEEL , 0, 0, 0, 0, 0 }, /* 98 */
+ { 70, W, 255, 0, 0, 30, 0, 0, 0, 27, CT_VALUABLES , 0, 0, 0, 0, 0 }, /* 99 */
+ { 71, W, 191, 0, 0, 22, 0, 0, 0, 32, CT_FOOD , 0, 0, 0, 0, 0 }, /* 100 */
+ { 72, W, 196, 0, 0, 18, 0, 0, 0, 27, CT_PAPER , 0, 0, 0, 0, 0 }, /* 101 */
+ { 73, W, 179, 0, 0, 19, 0, 0, 0, 37, CT_COPPER_ORE , 0, 0, 0, 0, 0 }, /* 102 */
+ { 47, W, 199, 0, 0, 25, 0, 0, 0, 32, CT_WATER , 0, 0, 0, 0, 0 }, /* 103 */
+ { 48, W, 182, 0, 0, 18, 0, 0, 0, 32, CT_FRUIT , 0, 0, 0, 0, 0 }, /* 104 */
+ { 49, W, 185, 0, 0, 19, 0, 0, 0, 28, CT_RUBBER , 0, 0, 0, 0, 0 }, /* 105 */
+ { 50, W, 176, 0, 0, 19, 0, 0, 0, 37, CT_SUGAR , 0, 0, 0, 0, 0 }, /* 106 */
+ { 51, W, 178, 0, 0, 20, 0, 0, 0, 37, CT_COTTON_CANDY , 0, 0, 0, 0, 0 }, /* 107 */
+ { 52, W, 192, 0, 0, 20, 0, 0, 0, 37, CT_TOFFEE , 0, 0, 0, 0, 0 }, /* 108 */
+ { 53, W, 190, 0, 0, 21, 0, 0, 0, 27, CT_BUBBLES , 0, 0, 0, 0, 0 }, /* 109 */
+ { 54, W, 182, 0, 0, 24, 0, 0, 0, 32, CT_COLA , 0, 0, 0, 0, 0 }, /* 110 */
+ { 55, W, 181, 0, 0, 21, 0, 0, 0, 32, CT_CANDY , 0, 0, 0, 0, 0 }, /* 111 */
+ { 56, W, 183, 0, 0, 21, 0, 0, 0, 27, CT_TOYS , 0, 0, 0, 0, 0 }, /* 112 */
+ { 57, W, 196, 0, 0, 18, 0, 0, 0, 29, CT_BATTERIES , 0, 0, 0, 0, 0 }, /* 113 */
+ { 58, W, 193, 0, 0, 18, 0, 0, 0, 32, CT_FIZZY_DRINKS , 0, 0, 0, 0, 0 }, /* 114 */
+ { 59, W, 191, 0, 0, 18, 0, 0, 0, 37, CT_PLASTIC , 0, 0, 0, 0, 0 }, /* 115 */
};
#undef W
#undef M
diff --git a/train_cmd.c b/train_cmd.c
index 09d074afe..67b181212 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -3601,9 +3601,9 @@ int32 GetTrainRunningCost(const Vehicle *v)
do {
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
- if (rvi->running_cost_base)
- cost += rvi->running_cost_base * _price.running_rail[rvi->engclass];
- } while ( (v=v->next) != NULL );
+ if (rvi->running_cost_base > 0)
+ cost += rvi->running_cost_base * _price.running_rail[rvi->running_cost_class];
+ } while ((v = v->next) != NULL);
return cost;
}
diff --git a/train_gui.c b/train_gui.c
index 6c0620f98..95f86a47c 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -48,7 +48,7 @@ void DrawTrainEnginePurchaseInfo(int x, int y, EngineID engine_number)
y += 10;
/* Running cost */
- SetDParam(0, (rvi->running_cost_base * _price.running_rail[rvi->engclass] >> 8) << multihead);
+ SetDParam(0, (rvi->running_cost_base * _price.running_rail[rvi->running_cost_class] >> 8) << multihead);
DrawString(x,y, STR_PURCHASE_INFO_RUNNINGCOST, 0);
y += 10;