Mercurial > hg > openttd
changeset 3022:ffd95da68af1 draft
(svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and remove global variable to return data as we can now access this directly.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Mon, 13 Feb 2006 22:13:02 +0000 |
parents | 87c87321331b |
children | 02ee568e0a3c |
files | ai/default/default.c engine.h table/engines.h train_cmd.c vehicle.h |
diffstat | 5 files changed, 122 insertions(+), 141 deletions(-) [+] |
line wrap: on
line diff
--- a/ai/default/default.c +++ b/ai/default/default.c @@ -143,8 +143,8 @@ ret = DoCommandByTile(tile, i, 0, 0, CMD_BUILD_RAIL_VEHICLE); if (!CmdFailed(ret) && ret <= money && - _cmd_build_rail_veh_score >= best_veh_score) { - best_veh_score = _cmd_build_rail_veh_score; + rvi->ai_rank >= best_veh_score) { + best_veh_score = rvi->ai_rank; best_veh_index = i; } }
--- a/engine.h +++ b/engine.h @@ -21,6 +21,7 @@ byte engclass; // 0: steam, 1: diesel, 2: electric byte capacity; byte cargo_type; + byte ai_rank; byte callbackmask; // see CallbackMask enum uint16 pow_wag_power; byte pow_wag_weight;
--- a/table/engines.h +++ b/table/engines.h @@ -314,13 +314,14 @@ * @param c base_cost * @param d max_speed (kph) * @param e power (hp) - * @arapm f weight + * @param f weight * @param g running_cost_base * @param h running_cost_class / engclass * @param i capacity * @param j cargo_type + * @param k ai_rank */ -#define RVI(a, b, c, d, e, f, g, h, i, j) { a, b, c, d, e, f, g, h, h, i, j, 0, 0, 0, 0, 0 } +#define RVI(a, b, c, d, e, f, g, h, i, j, k) { a, b, c, d, e, f, g, h, h, i, j, k, 0, 0, 0, 0, 0 } #define M RVI_MULTIHEAD #define W RVI_WAGON #define S 0 @@ -332,122 +333,122 @@ // | | base_cost | weight | | capacity // | | | | | | | | | cargo_type // | | | | | | | | | | - RVI( 2, 0, 7, 64, 300, 47, 50, S, 0, 0 ), /* 0 */ - RVI( 19, 0, 8, 80, 600, 65, 65, D, 0, 0 ), /* 1 */ - RVI( 2, 0, 10, 72, 400, 85, 90, S, 0, 0 ), /* 2 */ - RVI( 0, 0, 15, 96, 900, 130, 130, S, 0, 0 ), /* 3 */ - RVI( 1, 0, 19, 112, 1000, 140, 145, S, 0, 0 ), /* 4 */ - RVI( 12, 0, 16, 120, 1400, 95, 125, D, 0, 0 ), /* 5 */ - RVI( 14, 0, 20, 152, 2000, 120, 135, D, 0, 0 ), /* 6 */ - RVI( 3, 0, 14, 88, 1100, 145, 130, S, 0, 0 ), /* 7 */ - RVI( 0, 0, 13, 112, 1000, 131, 120, S, 0, 0 ), /* 8 */ - RVI( 1, 0, 19, 128, 1200, 162, 140, S, 0, 0 ), /* 9 */ - RVI( 0, 0, 22, 144, 1600, 170, 130, S, 0, 0 ), /* 10 */ - RVI( 8, M, 11, 112, 600/2,32/2, 85/2, D, 38, CT_PASSENGERS ), /* 11 */ - RVI( 10, M, 14, 120, 700/2,38/2, 70/2, D, 40, CT_PASSENGERS ), /* 12 */ - RVI( 4, 0, 15, 128, 1250, 72, 95, D, 0, 0 ), /* 13 */ - RVI( 5, 0, 17, 144, 1750, 101, 120, D, 0, 0 ), /* 14 */ - RVI( 4, 0, 18, 160, 2580, 112, 140, D, 0, 0 ), /* 15 */ - RVI( 14, 0, 23, 96, 4000, 150, 135, D, 0, 0 ), /* 16 */ - RVI( 12, 0, 16, 112, 2400, 120, 105, D, 0, 0 ), /* 17 */ - RVI( 13, 0, 30, 112, 6600, 207, 155, D, 0, 0 ), /* 18 */ - RVI( 15, 0, 18, 104, 1500, 110, 105, D, 0, 0 ), /* 19 */ - RVI( 16, M, 35, 160, 3500/2,95/2, 205/2, D, 0, 0 ), /* 20 */ - RVI( 18, 0, 21, 104, 2200, 120, 145, D, 0, 0 ), /* 21 */ - RVI( 6, M, 20, 200, 4500/2,70/2, 190/2, D, 4, CT_MAIL ), /* 22 */ - RVI( 20, 0, 26, 160, 3600, 84, 180, E, 0, 0 ), /* 23 */ - RVI( 20, 0, 30, 176, 5000, 82, 205, E, 0, 0 ), /* 24 */ - RVI( 21, M, 40, 240, 7000/2,90/2, 240/2, E, 0, 0 ), /* 25 */ - RVI( 23, M, 43, 264, 8000/2,95/2, 250/2, E, 0, 0 ), /* 26 */ - RVI( 33, W, 247, 0, 0, 25, 0, 0, 40, CT_PASSENGERS ), /* 27 */ - RVI( 35, W, 228, 0, 0, 21, 0, 0, 30, CT_MAIL ), /* 28 */ - RVI( 34, W, 176, 0, 0, 18, 0, 0, 30, CT_COAL ), /* 29 */ - RVI( 36, W, 200, 0, 0, 24, 0, 0, 30, CT_OIL ), /* 30 */ - RVI( 37, W, 192, 0, 0, 20, 0, 0, 25, CT_LIVESTOCK ), /* 31 */ - RVI( 38, W, 190, 0, 0, 21, 0, 0, 25, CT_GOODS ), /* 32 */ - RVI( 39, W, 182, 0, 0, 19, 0, 0, 30, CT_GRAIN ), /* 33 */ - RVI( 40, W, 181, 0, 0, 16, 0, 0, 30, CT_WOOD ), /* 34 */ - RVI( 41, W, 179, 0, 0, 19, 0, 0, 30, CT_IRON_ORE ), /* 35 */ - RVI( 42, W, 196, 0, 0, 18, 0, 0, 20, CT_STEEL ), /* 36 */ - RVI( 43, W, 255, 0, 0, 30, 0, 0, 20, CT_VALUABLES ), /* 37 */ - RVI( 44, W, 191, 0, 0, 22, 0, 0, 25, CT_FOOD ), /* 38 */ - RVI( 45, W, 196, 0, 0, 18, 0, 0, 20, CT_PAPER ), /* 39 */ - RVI( 46, W, 179, 0, 0, 19, 0, 0, 30, CT_COPPER_ORE ), /* 40 */ - RVI( 47, W, 199, 0, 0, 25, 0, 0, 25, CT_WATER ), /* 41 */ - RVI( 48, W, 182, 0, 0, 18, 0, 0, 25, CT_FRUIT ), /* 42 */ - RVI( 49, W, 185, 0, 0, 19, 0, 0, 21, CT_RUBBER ), /* 43 */ - RVI( 50, W, 176, 0, 0, 19, 0, 0, 30, CT_SUGAR ), /* 44 */ - RVI( 51, W, 178, 0, 0, 20, 0, 0, 30, CT_COTTON_CANDY ), /* 45 */ - RVI( 52, W, 192, 0, 0, 20, 0, 0, 30, CT_TOFFEE ), /* 46 */ - RVI( 53, W, 190, 0, 0, 21, 0, 0, 20, CT_BUBBLES ), /* 47 */ - RVI( 54, W, 182, 0, 0, 24, 0, 0, 25, CT_COLA ), /* 48 */ - RVI( 55, W, 181, 0, 0, 21, 0, 0, 25, CT_CANDY ), /* 49 */ - RVI( 56, W, 183, 0, 0, 21, 0, 0, 20, CT_TOYS ), /* 50 */ - RVI( 57, W, 196, 0, 0, 18, 0, 0, 22, CT_BATTERIES ), /* 51 */ - RVI( 58, W, 193, 0, 0, 18, 0, 0, 25, CT_FIZZY_DRINKS ), /* 52 */ - RVI( 59, W, 191, 0, 0, 18, 0, 0, 30, CT_PLASTIC ), /* 53 */ - RVI( 25, 0, 52, 304, 9000, 95, 230, E, 0, 0 ), /* 54 */ - RVI( 26, M, 60, 336, 10000/2,85/2, 240/2, E, 25, CT_PASSENGERS ), /* 55 */ - RVI( 26, 0, 53, 320, 5000, 95, 230, E, 0, 0 ), /* 56 */ - RVI( 60, W, 247, 0, 0, 25, 0, 0, 45, CT_PASSENGERS ), /* 57 */ - RVI( 62, W, 228, 0, 0, 21, 0, 0, 35, CT_MAIL ), /* 58 */ - RVI( 61, W, 176, 0, 0, 18, 0, 0, 35, CT_COAL ), /* 59 */ - RVI( 63, W, 200, 0, 0, 24, 0, 0, 35, CT_OIL ), /* 60 */ - RVI( 64, W, 192, 0, 0, 20, 0, 0, 30, CT_LIVESTOCK ), /* 61 */ - RVI( 65, W, 190, 0, 0, 21, 0, 0, 30, CT_GOODS ), /* 62 */ - RVI( 66, W, 182, 0, 0, 19, 0, 0, 35, CT_GRAIN ), /* 63 */ - RVI( 67, W, 181, 0, 0, 16, 0, 0, 35, CT_WOOD ), /* 64 */ - RVI( 68, W, 179, 0, 0, 19, 0, 0, 35, CT_IRON_ORE ), /* 65 */ - RVI( 69, W, 196, 0, 0, 18, 0, 0, 25, CT_STEEL ), /* 66 */ - RVI( 70, W, 255, 0, 0, 30, 0, 0, 25, CT_VALUABLES ), /* 67 */ - RVI( 71, W, 191, 0, 0, 22, 0, 0, 30, CT_FOOD ), /* 68 */ - RVI( 72, W, 196, 0, 0, 18, 0, 0, 25, CT_PAPER ), /* 69 */ - RVI( 73, W, 179, 0, 0, 19, 0, 0, 35, CT_COPPER_ORE ), /* 70 */ - RVI( 47, W, 199, 0, 0, 25, 0, 0, 30, CT_WATER ), /* 71 */ - RVI( 48, W, 182, 0, 0, 18, 0, 0, 30, CT_FRUIT ), /* 72 */ - RVI( 49, W, 185, 0, 0, 19, 0, 0, 26, CT_RUBBER ), /* 73 */ - RVI( 50, W, 176, 0, 0, 19, 0, 0, 35, CT_SUGAR ), /* 74 */ - RVI( 51, W, 178, 0, 0, 20, 0, 0, 35, CT_COTTON_CANDY ), /* 75 */ - RVI( 52, W, 192, 0, 0, 20, 0, 0, 35, CT_TOFFEE ), /* 76 */ - RVI( 53, W, 190, 0, 0, 21, 0, 0, 25, CT_BUBBLES ), /* 77 */ - RVI( 54, W, 182, 0, 0, 24, 0, 0, 30, CT_COLA ), /* 78 */ - RVI( 55, W, 181, 0, 0, 21, 0, 0, 30, CT_CANDY ), /* 79 */ - RVI( 56, W, 183, 0, 0, 21, 0, 0, 25, CT_TOYS ), /* 80 */ - RVI( 57, W, 196, 0, 0, 18, 0, 0, 27, CT_BATTERIES ), /* 81 */ - RVI( 58, W, 193, 0, 0, 18, 0, 0, 30, CT_FIZZY_DRINKS ), /* 82 */ - RVI( 59, W, 191, 0, 0, 18, 0, 0, 35, CT_PLASTIC ), /* 83 */ - RVI( 28, 0, 70, 400, 10000, 105, 250, E, 0, 0 ), /* 84 */ - RVI( 29, 0, 74, 448, 12000, 120, 253, E, 0, 0 ), /* 85 */ - RVI( 30, 0, 82, 480, 15000, 130, 254, E, 0, 0 ), /* 86 */ - RVI( 31, M, 95, 640, 20000/2,150/2,255/2, E, 0, 0 ), /* 87 */ - RVI( 28, 0, 70, 480, 10000, 120, 250, E, 0, 0 ), /* 88 */ - RVI( 60, W, 247, 0, 0, 25, 0, 0, 47, CT_PASSENGERS ), /* 89 */ - RVI( 62, W, 228, 0, 0, 21, 0, 0, 37, CT_MAIL ), /* 90 */ - RVI( 61, W, 176, 0, 0, 18, 0, 0, 37, CT_COAL ), /* 91 */ - RVI( 63, W, 200, 0, 0, 24, 0, 0, 37, CT_OIL ), /* 92 */ - RVI( 64, W, 192, 0, 0, 20, 0, 0, 32, CT_LIVESTOCK ), /* 93 */ - RVI( 65, W, 190, 0, 0, 21, 0, 0, 32, CT_GOODS ), /* 94 */ - RVI( 66, W, 182, 0, 0, 19, 0, 0, 37, CT_GRAIN ), /* 95 */ - RVI( 67, W, 181, 0, 0, 16, 0, 0, 37, CT_WOOD ), /* 96 */ - RVI( 68, W, 179, 0, 0, 19, 0, 0, 37, CT_IRON_ORE ), /* 97 */ - RVI( 69, W, 196, 0, 0, 18, 0, 0, 27, CT_STEEL ), /* 98 */ - RVI( 70, W, 255, 0, 0, 30, 0, 0, 27, CT_VALUABLES ), /* 99 */ - RVI( 71, W, 191, 0, 0, 22, 0, 0, 32, CT_FOOD ), /* 100 */ - RVI( 72, W, 196, 0, 0, 18, 0, 0, 27, CT_PAPER ), /* 101 */ - RVI( 73, W, 179, 0, 0, 19, 0, 0, 37, CT_COPPER_ORE ), /* 102 */ - RVI( 47, W, 199, 0, 0, 25, 0, 0, 32, CT_WATER ), /* 103 */ - RVI( 48, W, 182, 0, 0, 18, 0, 0, 32, CT_FRUIT ), /* 104 */ - RVI( 49, W, 185, 0, 0, 19, 0, 0, 28, CT_RUBBER ), /* 105 */ - RVI( 50, W, 176, 0, 0, 19, 0, 0, 37, CT_SUGAR ), /* 106 */ - RVI( 51, W, 178, 0, 0, 20, 0, 0, 37, CT_COTTON_CANDY ), /* 107 */ - RVI( 52, W, 192, 0, 0, 20, 0, 0, 37, CT_TOFFEE ), /* 108 */ - RVI( 53, W, 190, 0, 0, 21, 0, 0, 27, CT_BUBBLES ), /* 109 */ - RVI( 54, W, 182, 0, 0, 24, 0, 0, 32, CT_COLA ), /* 110 */ - RVI( 55, W, 181, 0, 0, 21, 0, 0, 32, CT_CANDY ), /* 111 */ - RVI( 56, W, 183, 0, 0, 21, 0, 0, 27, CT_TOYS ), /* 112 */ - RVI( 57, W, 196, 0, 0, 18, 0, 0, 29, CT_BATTERIES ), /* 113 */ - RVI( 58, W, 193, 0, 0, 18, 0, 0, 32, CT_FIZZY_DRINKS ), /* 114 */ - RVI( 59, W, 191, 0, 0, 18, 0, 0, 37, CT_PLASTIC ), /* 115 */ + RVI( 2, 0, 7, 64, 300, 47, 50, S, 0, 0 , 1 ), /* 0 */ + RVI( 19, 0, 8, 80, 600, 65, 65, D, 0, 0 , 4 ), /* 1 */ + RVI( 2, 0, 10, 72, 400, 85, 90, S, 0, 0 , 7 ), /* 2 */ + RVI( 0, 0, 15, 96, 900, 130, 130, S, 0, 0 , 19 ), /* 3 */ + RVI( 1, 0, 19, 112, 1000, 140, 145, S, 0, 0 , 20 ), /* 4 */ + RVI( 12, 0, 16, 120, 1400, 95, 125, D, 0, 0 , 30 ), /* 5 */ + RVI( 14, 0, 20, 152, 2000, 120, 135, D, 0, 0 , 31 ), /* 6 */ + RVI( 3, 0, 14, 88, 1100, 145, 130, S, 0, 0 , 19 ), /* 7 */ + RVI( 0, 0, 13, 112, 1000, 131, 120, S, 0, 0 , 20 ), /* 8 */ + RVI( 1, 0, 19, 128, 1200, 162, 140, S, 0, 0 , 21 ), /* 9 */ + RVI( 0, 0, 22, 144, 1600, 170, 130, S, 0, 0 , 22 ), /* 10 */ + RVI( 8, M, 11, 112, 600/2,32/2, 85/2, D, 38, CT_PASSENGERS , 10 ), /* 11 */ + RVI( 10, M, 14, 120, 700/2,38/2, 70/2, D, 40, CT_PASSENGERS , 11 ), /* 12 */ + RVI( 4, 0, 15, 128, 1250, 72, 95, D, 0, 0 , 30 ), /* 13 */ + RVI( 5, 0, 17, 144, 1750, 101, 120, D, 0, 0 , 31 ), /* 14 */ + RVI( 4, 0, 18, 160, 2580, 112, 140, D, 0, 0 , 32 ), /* 15 */ + RVI( 14, 0, 23, 96, 4000, 150, 135, D, 0, 0 , 33 ), /* 16 */ + RVI( 12, 0, 16, 112, 2400, 120, 105, D, 0, 0 , 34 ), /* 17 */ + RVI( 13, 0, 30, 112, 6600, 207, 155, D, 0, 0 , 35 ), /* 18 */ + RVI( 15, 0, 18, 104, 1500, 110, 105, D, 0, 0 , 29 ), /* 19 */ + RVI( 16, M, 35, 160, 3500/2,95/2, 205/2, D, 0, 0 , 45 ), /* 20 */ + RVI( 18, 0, 21, 104, 2200, 120, 145, D, 0, 0 , 32 ), /* 21 */ + RVI( 6, M, 20, 200, 4500/2,70/2, 190/2, D, 4, CT_MAIL , 50 ), /* 22 */ + RVI( 20, 0, 26, 160, 3600, 84, 180, E, 0, 0 , 40 ), /* 23 */ + RVI( 20, 0, 30, 176, 5000, 82, 205, E, 0, 0 , 41 ), /* 24 */ + RVI( 21, M, 40, 240, 7000/2,90/2, 240/2, E, 0, 0 , 51 ), /* 25 */ + RVI( 23, M, 43, 264, 8000/2,95/2, 250/2, E, 0, 0 , 52 ), /* 26 */ + RVI( 33, W, 247, 0, 0, 25, 0, 0, 40, CT_PASSENGERS , 0 ), /* 27 */ + RVI( 35, W, 228, 0, 0, 21, 0, 0, 30, CT_MAIL , 0 ), /* 28 */ + RVI( 34, W, 176, 0, 0, 18, 0, 0, 30, CT_COAL , 0 ), /* 29 */ + RVI( 36, W, 200, 0, 0, 24, 0, 0, 30, CT_OIL , 0 ), /* 30 */ + RVI( 37, W, 192, 0, 0, 20, 0, 0, 25, CT_LIVESTOCK , 0 ), /* 31 */ + RVI( 38, W, 190, 0, 0, 21, 0, 0, 25, CT_GOODS , 0 ), /* 32 */ + RVI( 39, W, 182, 0, 0, 19, 0, 0, 30, CT_GRAIN , 0 ), /* 33 */ + RVI( 40, W, 181, 0, 0, 16, 0, 0, 30, CT_WOOD , 0 ), /* 34 */ + RVI( 41, W, 179, 0, 0, 19, 0, 0, 30, CT_IRON_ORE , 0 ), /* 35 */ + RVI( 42, W, 196, 0, 0, 18, 0, 0, 20, CT_STEEL , 0 ), /* 36 */ + RVI( 43, W, 255, 0, 0, 30, 0, 0, 20, CT_VALUABLES , 0 ), /* 37 */ + RVI( 44, W, 191, 0, 0, 22, 0, 0, 25, CT_FOOD , 0 ), /* 38 */ + RVI( 45, W, 196, 0, 0, 18, 0, 0, 20, CT_PAPER , 0 ), /* 39 */ + RVI( 46, W, 179, 0, 0, 19, 0, 0, 30, CT_COPPER_ORE , 0 ), /* 40 */ + RVI( 47, W, 199, 0, 0, 25, 0, 0, 25, CT_WATER , 0 ), /* 41 */ + RVI( 48, W, 182, 0, 0, 18, 0, 0, 25, CT_FRUIT , 0 ), /* 42 */ + RVI( 49, W, 185, 0, 0, 19, 0, 0, 21, CT_RUBBER , 0 ), /* 43 */ + RVI( 50, W, 176, 0, 0, 19, 0, 0, 30, CT_SUGAR , 0 ), /* 44 */ + RVI( 51, W, 178, 0, 0, 20, 0, 0, 30, CT_COTTON_CANDY, 0 ), /* 45 */ + RVI( 52, W, 192, 0, 0, 20, 0, 0, 30, CT_TOFFEE , 0 ), /* 46 */ + RVI( 53, W, 190, 0, 0, 21, 0, 0, 20, CT_BUBBLES , 0 ), /* 47 */ + RVI( 54, W, 182, 0, 0, 24, 0, 0, 25, CT_COLA , 0 ), /* 48 */ + RVI( 55, W, 181, 0, 0, 21, 0, 0, 25, CT_CANDY , 0 ), /* 49 */ + RVI( 56, W, 183, 0, 0, 21, 0, 0, 20, CT_TOYS , 0 ), /* 50 */ + RVI( 57, W, 196, 0, 0, 18, 0, 0, 22, CT_BATTERIES , 0 ), /* 51 */ + RVI( 58, W, 193, 0, 0, 18, 0, 0, 25, CT_FIZZY_DRINKS, 0 ), /* 52 */ + RVI( 59, W, 191, 0, 0, 18, 0, 0, 30, CT_PLASTIC , 0 ), /* 53 */ + RVI( 25, 0, 52, 304, 9000, 95, 230, E, 0, 0 , 60 ), /* 54 */ + RVI( 26, M, 60, 336, 10000/2,85/2, 240/2, E, 25, CT_PASSENGERS , 62 ), /* 55 */ + RVI( 26, 0, 53, 320, 5000, 95, 230, E, 0, 0 , 63 ), /* 56 */ + RVI( 60, W, 247, 0, 0, 25, 0, 0, 45, CT_PASSENGERS , 0 ), /* 57 */ + RVI( 62, W, 228, 0, 0, 21, 0, 0, 35, CT_MAIL , 0 ), /* 58 */ + RVI( 61, W, 176, 0, 0, 18, 0, 0, 35, CT_COAL , 0 ), /* 59 */ + RVI( 63, W, 200, 0, 0, 24, 0, 0, 35, CT_OIL , 0 ), /* 60 */ + RVI( 64, W, 192, 0, 0, 20, 0, 0, 30, CT_LIVESTOCK , 0 ), /* 61 */ + RVI( 65, W, 190, 0, 0, 21, 0, 0, 30, CT_GOODS , 0 ), /* 62 */ + RVI( 66, W, 182, 0, 0, 19, 0, 0, 35, CT_GRAIN , 0 ), /* 63 */ + RVI( 67, W, 181, 0, 0, 16, 0, 0, 35, CT_WOOD , 0 ), /* 64 */ + RVI( 68, W, 179, 0, 0, 19, 0, 0, 35, CT_IRON_ORE , 0 ), /* 65 */ + RVI( 69, W, 196, 0, 0, 18, 0, 0, 25, CT_STEEL , 0 ), /* 66 */ + RVI( 70, W, 255, 0, 0, 30, 0, 0, 25, CT_VALUABLES , 0 ), /* 67 */ + RVI( 71, W, 191, 0, 0, 22, 0, 0, 30, CT_FOOD , 0 ), /* 68 */ + RVI( 72, W, 196, 0, 0, 18, 0, 0, 25, CT_PAPER , 0 ), /* 69 */ + RVI( 73, W, 179, 0, 0, 19, 0, 0, 35, CT_COPPER_ORE , 0 ), /* 70 */ + RVI( 47, W, 199, 0, 0, 25, 0, 0, 30, CT_WATER , 0 ), /* 71 */ + RVI( 48, W, 182, 0, 0, 18, 0, 0, 30, CT_FRUIT , 0 ), /* 72 */ + RVI( 49, W, 185, 0, 0, 19, 0, 0, 26, CT_RUBBER , 0 ), /* 73 */ + RVI( 50, W, 176, 0, 0, 19, 0, 0, 35, CT_SUGAR , 0 ), /* 74 */ + RVI( 51, W, 178, 0, 0, 20, 0, 0, 35, CT_COTTON_CANDY, 0 ), /* 75 */ + RVI( 52, W, 192, 0, 0, 20, 0, 0, 35, CT_TOFFEE , 0 ), /* 76 */ + RVI( 53, W, 190, 0, 0, 21, 0, 0, 25, CT_BUBBLES , 0 ), /* 77 */ + RVI( 54, W, 182, 0, 0, 24, 0, 0, 30, CT_COLA , 0 ), /* 78 */ + RVI( 55, W, 181, 0, 0, 21, 0, 0, 30, CT_CANDY , 0 ), /* 79 */ + RVI( 56, W, 183, 0, 0, 21, 0, 0, 25, CT_TOYS , 0 ), /* 80 */ + RVI( 57, W, 196, 0, 0, 18, 0, 0, 27, CT_BATTERIES , 0 ), /* 81 */ + RVI( 58, W, 193, 0, 0, 18, 0, 0, 30, CT_FIZZY_DRINKS, 0 ), /* 82 */ + RVI( 59, W, 191, 0, 0, 18, 0, 0, 35, CT_PLASTIC , 0 ), /* 83 */ + RVI( 28, 0, 70, 400, 10000, 105, 250, E, 0, 0 , 70 ), /* 84 */ + RVI( 29, 0, 74, 448, 12000, 120, 253, E, 0, 0 , 71 ), /* 85 */ + RVI( 30, 0, 82, 480, 15000, 130, 254, E, 0, 0 , 72 ), /* 86 */ + RVI( 31, M, 95, 640, 20000/2,150/2,255/2, E, 0, 0 , 73 ), /* 87 */ + RVI( 28, 0, 70, 480, 10000, 120, 250, E, 0, 0 , 74 ), /* 88 */ + RVI( 60, W, 247, 0, 0, 25, 0, 0, 47, CT_PASSENGERS , 0 ), /* 89 */ + RVI( 62, W, 228, 0, 0, 21, 0, 0, 37, CT_MAIL , 0 ), /* 90 */ + RVI( 61, W, 176, 0, 0, 18, 0, 0, 37, CT_COAL , 0 ), /* 91 */ + RVI( 63, W, 200, 0, 0, 24, 0, 0, 37, CT_OIL , 0 ), /* 92 */ + RVI( 64, W, 192, 0, 0, 20, 0, 0, 32, CT_LIVESTOCK , 0 ), /* 93 */ + RVI( 65, W, 190, 0, 0, 21, 0, 0, 32, CT_GOODS , 0 ), /* 94 */ + RVI( 66, W, 182, 0, 0, 19, 0, 0, 37, CT_GRAIN , 0 ), /* 95 */ + RVI( 67, W, 181, 0, 0, 16, 0, 0, 37, CT_WOOD , 0 ), /* 96 */ + RVI( 68, W, 179, 0, 0, 19, 0, 0, 37, CT_IRON_ORE , 0 ), /* 97 */ + RVI( 69, W, 196, 0, 0, 18, 0, 0, 27, CT_STEEL , 0 ), /* 98 */ + RVI( 70, W, 255, 0, 0, 30, 0, 0, 27, CT_VALUABLES , 0 ), /* 99 */ + RVI( 71, W, 191, 0, 0, 22, 0, 0, 32, CT_FOOD , 0 ), /* 100 */ + RVI( 72, W, 196, 0, 0, 18, 0, 0, 27, CT_PAPER , 0 ), /* 101 */ + RVI( 73, W, 179, 0, 0, 19, 0, 0, 37, CT_COPPER_ORE , 0 ), /* 102 */ + RVI( 47, W, 199, 0, 0, 25, 0, 0, 32, CT_WATER , 0 ), /* 103 */ + RVI( 48, W, 182, 0, 0, 18, 0, 0, 32, CT_FRUIT , 0 ), /* 104 */ + RVI( 49, W, 185, 0, 0, 19, 0, 0, 28, CT_RUBBER , 0 ), /* 105 */ + RVI( 50, W, 176, 0, 0, 19, 0, 0, 37, CT_SUGAR , 0 ), /* 106 */ + RVI( 51, W, 178, 0, 0, 20, 0, 0, 37, CT_COTTON_CANDY, 0 ), /* 107 */ + RVI( 52, W, 192, 0, 0, 20, 0, 0, 37, CT_TOFFEE , 0 ), /* 108 */ + RVI( 53, W, 190, 0, 0, 21, 0, 0, 27, CT_BUBBLES , 0 ), /* 109 */ + RVI( 54, W, 182, 0, 0, 24, 0, 0, 32, CT_COLA , 0 ), /* 110 */ + RVI( 55, W, 181, 0, 0, 21, 0, 0, 32, CT_CANDY , 0 ), /* 111 */ + RVI( 56, W, 183, 0, 0, 21, 0, 0, 27, CT_TOYS , 0 ), /* 112 */ + RVI( 57, W, 196, 0, 0, 18, 0, 0, 29, CT_BATTERIES , 0 ), /* 113 */ + RVI( 58, W, 193, 0, 0, 18, 0, 0, 32, CT_FIZZY_DRINKS, 0 ), /* 114 */ + RVI( 59, W, 191, 0, 0, 18, 0, 0, 37, CT_PLASTIC , 0 ), /* 115 */ }; #undef E #undef D
--- a/train_cmd.c +++ b/train_cmd.c @@ -609,25 +609,6 @@ } } -static const byte _railveh_score[] = { - 1, 4, 7, 19, 20, 30, 31, 19, - 20, 21, 22, 10, 11, 30, 31, 32, - 33, 34, 35, 29, 45, 32, 50, 40, - 41, 51, 52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 60, 62, - 63, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 71, 72, 73, - 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -}; - - static int32 EstimateTrainCost(const RailVehicleInfo* rvi) { return rvi->base_cost * (_price.build_railvehicle >> 3) >> 5; @@ -788,7 +769,6 @@ } } } - _cmd_build_rail_veh_score = _railveh_score[p1]; return value; }