Split STR_ORDER_CONDITIONAL_CARGO string into two, adjust format

See: #172
This commit is contained in:
Jonathan G Rennison 2020-07-12 21:58:49 +01:00
parent a79cab9b45
commit 05dc785f13
4 changed files with 13 additions and 9 deletions

View File

@ -4887,7 +4887,8 @@ STR_ORDER_OUT_OF_RANGE :{RED} (Next des
STR_ORDER_CONDITIONAL_UNCONDITIONAL :Jump to order {COMMA}
STR_ORDER_CONDITIONAL_NUM :Jump to order {COMMA} when {STRING} {STRING} {COMMA}
STR_ORDER_CONDITIONAL_CARGO :Jump to order {COMMA} when {STRING} {STRING} {STRING}
STR_ORDER_CONDITIONAL_CARGO_ACCEPTANCE :Jump to order {COMMA} when Next station {STRING} {STRING}
STR_ORDER_CONDITIONAL_CARGO_WAITING_DISPLAY :Jump to order {COMMA} when Next station {STRING} {STRING}
STR_ORDER_CONDITIONAL_SLOT :Jump to order {COMMA} when {TRSLOT} {STRING}
STR_ORDER_CONDITIONAL_INVALID_SLOT :Jump to order {COMMA} when {PUSH_COLOUR}{RED}{STRING} {POP_COLOUR}{STRING}
STR_ORDER_CONDITIONAL_IN_SLOT :Jump to order {COMMA} when {STRING} slot: {TRSLOT}

View File

@ -4626,7 +4626,8 @@ STR_ORDER_OUT_OF_RANGE :{RED} (Nächste
STR_ORDER_CONDITIONAL_UNCONDITIONAL :Springe zu Auftrag {COMMA}
STR_ORDER_CONDITIONAL_NUM :Springe zu Auftrag {COMMA}, wenn {STRING} {STRING} {COMMA} ist
STR_ORDER_CONDITIONAL_CARGO :Springe zu Auftrag {COMMA}, wenn {STRING} {STRING} {STRING}
STR_ORDER_CONDITIONAL_CARGO_ACCEPTANCE :Springe zu Auftrag {COMMA}, wenn nächste Station {STRING} {STRING}
STR_ORDER_CONDITIONAL_CARGO_WAITING_DISPLAY :Springe zu Auftrag {COMMA}, wenn nächste Station {STRING} {STRING}
STR_ORDER_CONDITIONAL_TRUE_FALSE :Springe zu Auftrag {COMMA}, wenn {STRING} {STRING} ist
STR_INVALID_ORDER :{RED} (Ungültiger Auftrag)

View File

@ -4887,7 +4887,8 @@ STR_ORDER_OUT_OF_RANGE :{RED} (다음
STR_ORDER_CONDITIONAL_UNCONDITIONAL :[조건 경로] {COMMA}번 경로로 건너뛰기
STR_ORDER_CONDITIONAL_NUM :[조건 경로] {COMMA}번 경로로 건너뛰기 ({STRING} {STRING} {COMMA} 일 때)
STR_ORDER_CONDITIONAL_CARGO :[조건 경로] {COMMA}번 경로로 건너뛰기 ({1:STRING} {3:STRING} {2:STRING})
STR_ORDER_CONDITIONAL_CARGO_ACCEPTANCE :[조건 경로] {COMMA}번 경로로 건너뛰기 (다음 역이: {2:STRING} {1:STRING})
STR_ORDER_CONDITIONAL_CARGO_WAITING_DISPLAY :[조건 경로] {COMMA}번 경로로 건너뛰기 (다음 역에: {2:STRING} {1:STRING})
STR_ORDER_CONDITIONAL_SLOT :[조건 경로] {COMMA}번 경로로 건너뛰기 ({TRSLOT} 슬롯이 {STRING})
STR_ORDER_CONDITIONAL_INVALID_SLOT :[조건 경로] {COMMA}번 경로로 건너뛰기 ({PUSH_COLOUR}{RED}{STRING}{POP_COLOUR} 슬롯이 {STRING})
STR_ORDER_CONDITIONAL_IN_SLOT :[조건 경로] {COMMA}번 경로로 건너뛰기 (열차가 {2:TRSLOT} 슬롯에 {1:STRING})

View File

@ -916,20 +916,21 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int
}
} else {
OrderConditionComparator occ = order->GetConditionComparator();
bool is_cargo = ocv == OCV_CARGO_ACCEPTANCE || ocv == OCV_CARGO_WAITING;
SetDParam(0, is_cargo ? STR_ORDER_CONDITIONAL_CARGO : (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) ? STR_ORDER_CONDITIONAL_TRUE_FALSE : STR_ORDER_CONDITIONAL_NUM);
SetDParam(0, (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) ? STR_ORDER_CONDITIONAL_TRUE_FALSE : STR_ORDER_CONDITIONAL_NUM);
SetDParam(2, (ocv == OCV_CARGO_ACCEPTANCE || ocv == OCV_CARGO_WAITING || ocv == OCV_FREE_PLATFORMS)
? STR_ORDER_CONDITIONAL_NEXT_STATION : STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + ocv);
uint value = order->GetConditionValue();
switch (ocv) {
case OCV_CARGO_ACCEPTANCE:
SetDParam(3, STR_ORDER_CONDITIONAL_COMPARATOR_ACCEPTS + occ - OCC_IS_TRUE);
SetDParam(4, CargoSpec::Get( value )->name );
SetDParam(0, STR_ORDER_CONDITIONAL_CARGO_ACCEPTANCE);
SetDParam(2, STR_ORDER_CONDITIONAL_COMPARATOR_ACCEPTS + occ - OCC_IS_TRUE);
SetDParam(3, CargoSpec::Get(value)->name);
break;
case OCV_CARGO_WAITING:
SetDParam(3, STR_ORDER_CONDITIONAL_COMPARATOR_HAS + occ - OCC_IS_TRUE);
SetDParam(4, CargoSpec::Get( value )->name );
SetDParam(0, STR_ORDER_CONDITIONAL_CARGO_WAITING_DISPLAY);
SetDParam(2, STR_ORDER_CONDITIONAL_COMPARATOR_HAS + occ - OCC_IS_TRUE);
SetDParam(3, CargoSpec::Get(value)->name);
break;
case OCV_REQUIRES_SERVICE:
SetDParam(3, STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS + occ);