summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt6
-rw-r--r--src/vehicle_gui.cpp19
2 files changed, 19 insertions, 6 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index b78aebd55..72289b179 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3427,8 +3427,10 @@ STR_VEHICLE_DETAILS_TRAIN_ARTICULATED_RV_CAPACITY :{BLACK}Capacity
# 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
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index be36c0169..980bfa327 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -600,14 +600,25 @@ struct RefitWindow : public Window {
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;
+ }
}
}