diff --git a/src/locales/en.json b/src/locales/en.json
index 801827e..3dea2f3 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -57,9 +57,10 @@
"action-move-up": "MOVE UP",
"action-move-down": "MOVE DOWN",
"action-remove": "REMOVE",
- "action-upload": "LOAD",
- "action-download": "DOWNLOAD",
- "action-copy": "COPY",
+ "action-upload-file": "LOAD FILE",
+ "action-upload-clipboard": "LOAD CLIPBOARD",
+ "action-download": "DOWNLOAD TO FILE",
+ "action-copy": "COPY TO CLIPBOARD",
"action-reset": "RESET",
"action-shuffle": "SHUFFLE",
"mass": "Mass",
@@ -69,14 +70,15 @@
"coldstart-info": "Locomotive cold start",
"doublemanning-info": "Double manning",
"list-empty": "Stock list is empty!",
-
"warning-not-suitable": "EP series locomotives are designed for passenger traffic only!",
"warning-passenger-too-long": "Maximum length of a passenger train may not be greater than 350m!",
"warning-freight-too-long": "Maximum length of a freight train may not be greater than 650m!",
"warning-too-many-locos": "This train has too many traction units!",
"warning-too-heavy": "This train is too heavy! Check {href}",
"warning-team-only-vehicle": "There's at least one vehicle available only for TD2 team members in your stock composition! ({0})",
- "acceptable-mass-docs": "acceptable rolling stock masses (PL)"
+ "acceptable-mass-docs": "acceptable rolling stock masses (PL)",
+ "stock-loading-error": "An error occurred: cannot parse data from the file - make sure it's in a proper format!",
+ "stock-clipboard-error": "An error occurred: cannot read data from the clipboard - make sure the site has been granted right permissions for this action!"
},
"stockgen": {
"title": "FREIGHT TRAIN GENERATOR",
@@ -108,7 +110,6 @@
"action-random-region": "DRAW REGIONS",
"action-random-number": "DRAW LAST DIGITS",
"action-random-category": "DRAW A CATEGORY",
-
"rules": {
"first-digit": "First digit:",
"second-digit": "Second digit:",
@@ -123,25 +124,20 @@
"for-region-end": "for the terminating construction region",
"from-range": "from range of"
},
-
"categories": {
"EI": "EI - domestic express",
"EC": "EC - international express",
"EN": "EN - domestic night express",
-
"MP": "MP - intervoivodeship bullet",
"MO": "MO - intervoivodeship regio",
"MM": "MM - international bullet",
"MH": "MH - intervoivodeship night bullet",
-
"RP": "RP - voivodeship bullet",
"RM": "RM - international voivodeship regio",
"RO": "RO - voivodeship regio",
"RA": "RA - voivodeship regio (urban)",
-
"PW": "PW - empty passenger",
"PX": "PX - empty passenger test drive",
-
"TC": "TC - international freight (intermodal)",
"TG": "TG - international freight (organized cargo)",
"TR": "TR - international freight (unorganized cargo)",
@@ -151,12 +147,10 @@
"TK": "TK - freight (for stations & sidings)",
"TS": "TS - empty freight test drive",
"TH": "TH - locomotive rolling stock (over 3 vehicles)",
-
"LT": "LT - freight locomotive only",
"LP": "LP - passenger locomotive only",
"LS": "LS - shunting locomotive only",
"LZ": "LS - shunting locomotive only",
-
"ZN": "ZN - inspection / diagnostic type",
"ZU": "ZU - other maintenance type"
}
@@ -313,4 +307,4 @@
"418Vb_ZOS": "loose cargo (sand, stone)",
"418Vb_ZUE": "loose cargo (sand, stone)"
}
-}
+}
\ No newline at end of file
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 4e02ce5..7c2b04b 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -44,7 +44,8 @@
"stock": "SKŁAD",
"wiki": "POJAZDY",
"numgen": "GNR NUMERU",
- "stockgen": "GNR SKŁADU"
+ "stockgen": "GNR SKŁADU",
+ "storage": "ZAPISANE SKŁADY"
},
"stocklist": {
"title": "EDYTOR SKŁADU",
@@ -57,9 +58,10 @@
"action-move-up": "PRZENIEŚ WYŻEJ",
"action-move-down": "PRZENIEŚ NIŻEJ",
"action-remove": "USUŃ",
- "action-upload": "WCZYTAJ",
- "action-download": "POBIERZ",
- "action-copy": "SKOPIUJ",
+ "action-upload-file": "WCZYTAJ (PLIK)",
+ "action-upload-clipboard": "WCZYTAJ (SCHOWEK)",
+ "action-download": "POBIERZ DO PLIKU",
+ "action-copy": "SKOPIUJ DO SCHOWKA",
"action-reset": "ZRESETUJ",
"action-shuffle": "PRZETASUJ",
"mass": "Masa",
@@ -69,14 +71,15 @@
"coldstart-info": "Zimny start",
"doublemanning-info": "Podwójna obsada",
"list-empty": "Lista pojazdów jest pusta!",
-
"warning-not-suitable": "Lokomotywy serii EP są przeznaczone jedynie do ruchu pasażerskiego!",
"warning-passenger-too-long": "Maksymalna długość składów pasażerskich nie może przekraczać 350m!",
"warning-freight-too-long": "Maksymalna długość składów innych niż pasażerskie nie może przekraczać 650m!",
"warning-too-many-locos": "Ten skład posiada za dużo pojazdów trakcyjnych!",
"warning-too-heavy": "Ten skład jest za ciężki! Sprawdź {href}",
"warning-team-only-vehicle": "W zestawieniu znajduje się co najmniej jeden pojazd dostępny tylko dla członków zespołu TD2! ({0})",
- "acceptable-mass-docs": "dopuszczalne masy składów"
+ "acceptable-mass-docs": "dopuszczalne masy składów",
+ "stock-loading-error": "Wystąpił błąd: nie można przetworzyć danych ze schowka! Upewnij się, że są one w poprawnym formacie!",
+ "stock-clipboard-error": "Wystąpił błąd: nie można odczytać danych ze schowka! Upewnij się, że nadałeś uprawnienia stronie do tej akcji!"
},
"stockgen": {
"title": "GENERATOR SKŁADU TOWAROWEGO",
@@ -108,7 +111,6 @@
"action-random-region": "LOSUJ OBSZARY",
"action-random-number": "LOSUJ KOŃCÓWKĘ",
"action-random-category": "LOSUJ KATEGORIĘ",
-
"rules": {
"first-digit": "Pierwsza cyfra:",
"second-digit": "Druga cyfra:",
@@ -123,25 +125,20 @@
"for-region-end": "dla końcowego obszaru konstrukcyjnego",
"from-range": "z przedziału"
},
-
"categories": {
"EI": "EI - ekspres krajowy",
"EC": "EC - ekspres międzynarodowy",
"EN": "EN - ekspres krajowy nocny",
-
"MP": "MP - międzywoj. pośpieszny",
"RP": "RP - wojewódzki pośpieszny",
"MO": "MO - międzywoj. osobowy",
"RO": "RO - wojewódzki osobowy",
-
"MM": "MM - międzynar. pośpieszny",
"MH": "MH - międzywoj. pośpieszny hotelowy",
"RM": "RM - woj. osobowy międzynarodowy",
"RA": "RA - woj. osobowy aglomeracyjny",
-
"PW": "PW - pasażerski próżny - służbowy",
"PX": "PX - pasażerski próżny próbny",
-
"TC": "TC - towarowy międzynarodowy intermodalny",
"TG": "TG - towarowy międzynarodowy masowy",
"TR": "TR - towarowy międzynarodowy niemasowy",
@@ -151,12 +148,10 @@
"TK": "TK - towarowy (stacje i bocznice)",
"TS": "TS - towarowy próżny próbny",
"TH": "TH - skład lokomotyw (powyżej 3 pojazdów)",
-
"LT": "LT - lokomotywa towarowa luzem",
"LP": "LP - lokomotywa pasażerska luzem",
"LS": "LS - lokomotywa manewrowa luzem",
"LZ": "LZ - lokomotywa dla poc. utrzymaniowo-naprawczych",
-
"ZN": "ZN - inspekcyjny / diagnostyczny",
"ZU": "ZU - inny utrzymaniowy"
}
@@ -312,4 +307,4 @@
"418Vb_ZOS": "drobnica, ładunki sypkie (piasek, kamień)",
"418Vb_ZUE": "drobnica, ładunki sypkie (piasek, kamień)"
}
-}
+}
\ No newline at end of file
diff --git a/src/mixins/stockMixin.ts b/src/mixins/stockMixin.ts
index 31333fa..01dad46 100644
--- a/src/mixins/stockMixin.ts
+++ b/src/mixins/stockMixin.ts
@@ -53,6 +53,7 @@ export default defineComponent({
loadStockFromString(stockString: string) {
const stockArray = stockString.trim().split(';');
+ let failureCount = 0;
this.store.stockList.length = 0;
this.store.chosenVehicle = null;
@@ -85,10 +86,19 @@ export default defineComponent({
if (cargo) vehicleCargo = vehicle?.cargoTypes.find((c) => c.id == cargo) || null;
}
- if (!vehicle) console.warn('Brak pojazdu / rodzaj pojazdu źle wczytany:', type);
+ if (!vehicle && type) {
+ failureCount++;
+ console.warn(`Wystąpił błąd - nie wczytano pojazdu o nazwie: ${type}`);
+ return;
+ }
this.addVehicle(vehicle, vehicleCargo);
});
+
+ if (failureCount != 0 && failureCount == stockArray.length) {
+ console.warn('Wystąpił błąd - niepoprawny format');
+ throw 'stock-loading-error';
+ }
},
},
});
diff --git a/src/router.ts b/src/router.ts
index 6b338c4..de0d200 100644
--- a/src/router.ts
+++ b/src/router.ts
@@ -4,6 +4,7 @@ import WikiListTab from './components/tabs/WikiListTab.vue';
import StockListTab from './components/tabs/StockListTab.vue';
import NumberGeneratorTab from './components/tabs/NumberGeneratorTab.vue';
import StockGeneratorTab from './components/tabs/StockGeneratorTab.vue';
+import StorageTab from './components/tabs/StorageTab.vue';
const routes: RouteRecordRaw[] = [
{
@@ -41,6 +42,13 @@ const routes: RouteRecordRaw[] = [
viewMode: StockGeneratorTab,
},
},
+ {
+ path: 'storage',
+ component: AppContainerView,
+ meta: {
+ viewMode: StorageTab,
+ },
+ },
],
},
];
diff --git a/src/store.ts b/src/store.ts
index 54f19d0..0d25a63 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -44,6 +44,8 @@ export const useStore = defineStore({
stockList: [] as IStock[],
cargoOptions: [] as any[][],
+ storageStockList: [] as IStock[][],
+
swapVehicles: false,
chosenStockListIndex: -1,