Changeset - r19613:74f448f7a8ed
[Not reviewed]
master
0 2 0
terkhen - 12 years ago 2012-09-22 16:19:52
terkhen@openttd.org
(svn r24544) -Fix [FS#5297]: Do not show profit from refits as cost in the refit window.
2 files changed with 19 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -3424,14 +3424,16 @@ STR_VEHICLE_DETAILS_TRAIN_TOTAL_CARGO_TO
 

	
 
STR_VEHICLE_DETAILS_TRAIN_ARTICULATED_RV_CAPACITY               :{BLACK}Capacity: {LTBLUE}
 

	
 
# Vehicle refit
 
STR_REFIT_CAPTION                                               :{WHITE}{VEHICLE} (Refit)
 
STR_REFIT_TITLE                                                 :{GOLD}Select cargo type to carry:
 
STR_REFIT_NEW_CAPACITY_COST_OF_REFIT                            :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {GOLD}{CURRENCY_LONG}
 
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT                   :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {GOLD}{CURRENCY_LONG}
 
STR_REFIT_NEW_CAPACITY_COST_OF_REFIT                            :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG}
 
STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT                        :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG}
 
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT                   :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG}
 
STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT               :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG}
 
STR_REFIT_SELECT_VEHICLES_TOOLTIP                               :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle. Ctrl+Click will select a vehicle and the following chain
 

	
 
STR_REFIT_TRAIN_LIST_TOOLTIP                                    :{BLACK}Select type of cargo for train to carry
 
STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP                             :{BLACK}Select type of cargo for road vehicle to carry
 
STR_REFIT_SHIP_LIST_TOOLTIP                                     :{BLACK}Select type of cargo for ship to carry
 
STR_REFIT_AIRCRAFT_LIST_TOOLTIP                                 :{BLACK}Select type of cargo for aircraft to carry
src/vehicle_gui.cpp
Show inline comments
 
@@ -597,20 +597,31 @@ struct RefitWindow : public Window {
 

	
 
		if (cost.Failed()) return INVALID_STRING_ID;
 

	
 
		SetDParam(0, option->cargo);
 
		SetDParam(1, _returned_refit_capacity);
 

	
 
		Money money = cost.GetCost();
 
		if (_returned_mail_refit_capacity > 0) {
 
			SetDParam(2, CT_MAIL);
 
			SetDParam(3, _returned_mail_refit_capacity);
 
			SetDParam(4, cost.GetCost());
 
			return STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT;
 
			if (money <= 0) {
 
				SetDParam(4, -money);
 
				return STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT;
 
			} else {
 
				SetDParam(4, money);
 
				return STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT;
 
			}
 
		} else {
 
			SetDParam(2, cost.GetCost());
 
			return STR_REFIT_NEW_CAPACITY_COST_OF_REFIT;
 
			if (money <= 0) {
 
				SetDParam(2, -money);
 
				return STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT;
 
			} else {
 
				SetDParam(2, money);
 
				return STR_REFIT_NEW_CAPACITY_COST_OF_REFIT;
 
			}
 
		}
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		switch (widget) {
0 comments (0 inline, 0 general)