equal
deleted
inserted
replaced
58 |
58 |
59 /* Cargo type + capacity, or N/A */ |
59 /* Cargo type + capacity, or N/A */ |
60 SetDParam(0, STR_8838_N_A); |
60 SetDParam(0, STR_8838_N_A); |
61 SetDParam(2, STR_EMPTY); |
61 SetDParam(2, STR_EMPTY); |
62 if (rvi->capacity != 0) { |
62 if (rvi->capacity != 0) { |
63 SetDParam(0, _cargoc.names_long_p[rvi->cargo_type]); |
63 SetDParam(0, _cargoc.names_long[rvi->cargo_type]); |
64 SetDParam(1, rvi->capacity << multihead); |
64 SetDParam(1, rvi->capacity << multihead); |
65 SetDParam(2, STR_9842_REFITTABLE); |
65 SetDParam(2, STR_9842_REFITTABLE); |
66 } |
66 } |
67 DrawString(x,y, STR_PURCHASE_INFO_CAPACITY, 0); |
67 DrawString(x,y, STR_PURCHASE_INFO_CAPACITY, 0); |
68 y += 10; |
68 y += 10; |
99 SetDParam(1, (_cargoc.weights[rvi->cargo_type] * rvi->capacity >> 4) + rvi->weight); |
99 SetDParam(1, (_cargoc.weights[rvi->cargo_type] * rvi->capacity >> 4) + rvi->weight); |
100 DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, 0); |
100 DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, 0); |
101 y += 10; |
101 y += 10; |
102 |
102 |
103 /* Cargo type + capacity */ |
103 /* Cargo type + capacity */ |
104 SetDParam(0, _cargoc.names_long_p[rvi->cargo_type]); |
104 SetDParam(0, _cargoc.names_long[rvi->cargo_type]); |
105 SetDParam(1, rvi->capacity); |
105 SetDParam(1, rvi->capacity); |
106 SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY); |
106 SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY); |
107 DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0); |
107 DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0); |
108 y += 10; |
108 y += 10; |
109 } |
109 } |
728 |
728 |
729 if (WP(w,refit_d).cargo != CT_INVALID) { |
729 if (WP(w,refit_d).cargo != CT_INVALID) { |
730 int32 cost = DoCommandByTile(v->tile, v->index, WP(w,refit_d).cargo, DC_QUERY_COST, CMD_REFIT_RAIL_VEHICLE); |
730 int32 cost = DoCommandByTile(v->tile, v->index, WP(w,refit_d).cargo, DC_QUERY_COST, CMD_REFIT_RAIL_VEHICLE); |
731 if (!CmdFailed(cost)) { |
731 if (!CmdFailed(cost)) { |
732 SetDParam(2, cost); |
732 SetDParam(2, cost); |
733 SetDParam(0, _cargoc.names_long_p[WP(w,refit_d).cargo]); |
733 SetDParam(0, _cargoc.names_long[WP(w,refit_d).cargo]); |
734 SetDParam(1, _returned_refit_amount); |
734 SetDParam(1, _returned_refit_amount); |
735 DrawString(1, 137, STR_9840_NEW_CAPACITY_COST_OF_REFIT, 0); |
735 DrawString(1, 137, STR_9840_NEW_CAPACITY_COST_OF_REFIT, 0); |
736 } |
736 } |
737 } |
737 } |
738 } break; |
738 } break; |
1008 } |
1008 } |
1009 |
1009 |
1010 static void TrainDetailsCapacityTab(const Vehicle *v, int x, int y) |
1010 static void TrainDetailsCapacityTab(const Vehicle *v, int x, int y) |
1011 { |
1011 { |
1012 if (v->cargo_cap != 0) { |
1012 if (v->cargo_cap != 0) { |
|
1013 SetDParam(0, _cargoc.names_long[v->cargo_type]); |
1013 SetDParam(1, v->cargo_cap); |
1014 SetDParam(1, v->cargo_cap); |
1014 SetDParam(0, _cargoc.names_long_p[v->cargo_type]); |
|
1015 DrawString(x, y, STR_013F_CAPACITY, 0); |
1015 DrawString(x, y, STR_013F_CAPACITY, 0); |
1016 } |
1016 } |
1017 } |
1017 } |
1018 |
1018 |
1019 typedef void TrainDetailsDrawerProc(const Vehicle *v, int x, int y); |
1019 typedef void TrainDetailsDrawerProc(const Vehicle *v, int x, int y); |