summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/industry_gui.cpp35
-rw-r--r--src/lang/english.txt8
2 files changed, 17 insertions, 26 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 41b3c573f..2e06983af 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -777,37 +777,30 @@ public:
y += FONT_HEIGHT_NORMAL;
first = false;
}
+ SetDParam(0, CargoSpec::Get(i->accepts_cargo[j])->name);
+ SetDParam(1, i->accepts_cargo[j]);
+ SetDParam(2, i->incoming_cargo_waiting[j]);
+ SetDParamStr(3, "");
+ StringID str = STR_NULL;
switch (cargo_suffix[j].display) {
- case CSD_CARGO_AMOUNT:
- if (stockpiling) {
- SetDParam(0, i->accepts_cargo[j]);
- SetDParam(1, i->incoming_cargo_waiting[j]);
- DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT);
- break;
- }
+ case CSD_CARGO_AMOUNT_TEXT:
+ SetDParamStr(3, cargo_suffix[j].text);
FALLTHROUGH;
-
- case CSD_CARGO:
- SetDParam(0, CargoSpec::Get(i->accepts_cargo[j])->name);
- DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO);
+ case CSD_CARGO_AMOUNT:
+ str = stockpiling ? STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT : STR_INDUSTRY_VIEW_ACCEPT_CARGO;
break;
case CSD_CARGO_TEXT:
- SetDParam(0, CargoSpec::Get(i->accepts_cargo[j])->name);
- SetDParamStr(1, cargo_suffix[j].text);
- DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_TEXT);
- break;
-
- case CSD_CARGO_AMOUNT_TEXT:
- SetDParam(0, i->accepts_cargo[j]);
- SetDParam(1, i->incoming_cargo_waiting[j]);
- SetDParamStr(2, cargo_suffix[j].text);
- DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT_TEXT);
+ SetDParamStr(3, cargo_suffix[j].text);
+ FALLTHROUGH;
+ case CSD_CARGO:
+ str = STR_INDUSTRY_VIEW_ACCEPT_CARGO;
break;
default:
NOT_REACHED();
}
+ DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, str);
y += FONT_HEIGHT_NORMAL;
}
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 0228f9c30..33a4f42cf 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3296,11 +3296,9 @@ STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires
STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING}, {STRING}{RAW_STRING}
############ range for requires ends
-STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requires
-STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}
-STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{CARGO_LONG} {BLACK}waiting
-STR_INDUSTRY_VIEW_ACCEPT_CARGO_TEXT :{YELLOW}{STRING}{RAW_STRING}
-STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT_TEXT :{YELLOW}{CARGO_LONG}{RAW_STRING}
+STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requires:
+STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:RAW_STRING}
+STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} waiting{RAW_STRING}
############ range for produces starts
STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING}