diff --git a/src/locales/en.json b/src/locales/en.json index 24e5180..2ecdeda 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -334,7 +334,7 @@ "Luban_XH_short": "short residential car", "Luban_XH_long": "long residential car", "Luban_XH_workshop": "workshop car", - "EDK80": "crane car" + "EDK80": "railway crane car" }, "cargo-warnings": { "title": "Rolling stock containing extra cargo warnings:", @@ -342,7 +342,8 @@ "warning_un1965_twr": "TWR: LPG (UN 1965)", "warning_un1965_tn": "TN: LPG - empty tank (UN 1965)", "warning_un1202_tn": "TN: diesel fuel (UN 1202)", - "warning_military_pn": "PN: military transport" + "warning_military_pn": "PN: military transport", + "warning_edk80_pn": "PN: railway crane EDK80" }, "migrate-info": { "line-1": "Pojazdownik is being moved to a new domain - {0}! You can still use the current website, but it will no longer be updated and will be shut down in the nearest future!", diff --git a/src/locales/pl.json b/src/locales/pl.json index 7817238..1d3f26e 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -333,7 +333,7 @@ "Luban_XH_short": "krótki wagon mieszkalny", "Luban_XH_long": "długi wagon mieszkalny", "Luban_XH_workshop": "wagon warsztatowy", - "EDK80": "dźwig kolejowy" + "EDK80": "żuraw kolejowy" }, "cargo-warnings": { "title": "Skład z dodatkowymi uwagami przewozowymi:", @@ -341,7 +341,8 @@ "warning_un1965_twr": "TWR: gazy węglowodorowe skroplone (UN 1965)", "warning_un1965_tn": "TN: gazy węglowodorowe skroplone - puste cysterny (UN 1965)", "warning_un1202_tn": "TN: olej napędowy (UN 1202)", - "warning_military_pn": "PN: transport wojskowy" + "warning_military_pn": "PN: transport wojskowy", + "warning_edk80_pn": "PN: żuraw kolejowy EDK80" }, "migrate-info": { "line-1": "Pojazdownik zostaje przeniesiony na nową domenę - {0}! Możesz korzystać z obecnej strony, jednak nie będzie ona otrzymywać już aktualizacji i w przyszłości zostanie wyłączona!", diff --git a/src/utils/vehicleUtils.ts b/src/utils/vehicleUtils.ts index 5d4a73e..305bc2c 100644 --- a/src/utils/vehicleUtils.ts +++ b/src/utils/vehicleUtils.ts @@ -106,12 +106,13 @@ export function getCargoWarnings(stockList: IStock[]) { let warnings: Set = new Set(); stockList.forEach((stockVehicle) => { - if (stockVehicle.vehicleRef.group == 'wagon-freight') { - if (stockVehicle.cargo && stockVehicle.cargo.id.startsWith('wt_20')) warnings.add('warning_wt_20_pn'); - else if (stockVehicle.cargo && /^(tank|vehicles|truck)/.test(stockVehicle.cargo.id)) warnings.add('warning_military_pn'); - else if (stockVehicle.vehicleRef.type.startsWith('WB117')) warnings.add(stockVehicle.cargo ? 'warning_un1965_twr' : 'warning_un1965_tn'); - else if (stockVehicle.vehicleRef.type.startsWith('445Rb')) warnings.add('warning_un1202_tn'); - } + if (stockVehicle.vehicleRef.group != 'wagon-freight') return; + + if (stockVehicle.cargo && stockVehicle.cargo.id.startsWith('wt_20')) warnings.add('warning_wt_20_pn'); + else if (stockVehicle.vehicleRef.type.startsWith('WB117')) warnings.add(stockVehicle.cargo ? 'warning_un1965_twr' : 'warning_un1965_tn'); + else if (stockVehicle.vehicleRef.type.startsWith('445Rb')) warnings.add('warning_un1202_tn'); + else if (stockVehicle.vehicleRef.type.startsWith('EDK80')) warnings.add('warning_edk80_pn'); + else if (stockVehicle.cargo && /^(tank|vehicles|truck)/.test(stockVehicle.cargo.id)) warnings.add('warning_military_pn'); }); return warnings;