mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 11:45:34 +00:00
chore: minor stock generator improvements; code cleanup
This commit is contained in:
+5
-3
@@ -62,6 +62,7 @@ export const useStore = defineStore({
|
||||
|
||||
storageStockData: {} as Record<string, StorageStockEntry>,
|
||||
chosenStorageStockName: '',
|
||||
chosenStorageStockString: '',
|
||||
|
||||
compatibleSimulatorVersion: '2024.3.1',
|
||||
}),
|
||||
@@ -85,8 +86,9 @@ export const useStore = defineStore({
|
||||
stockString: (state) => {
|
||||
if (state.stockList.length == 0) return '';
|
||||
|
||||
const coldStartActive = stockSupportsColdStart(state.stockList);
|
||||
const doubleManningActive = stockSupportsDoubleManning(state.stockList);
|
||||
const coldStartActive = state.isColdStart && stockSupportsColdStart(state.stockList);
|
||||
const doubleManningActive =
|
||||
state.isDoubleManned && stockSupportsDoubleManning(state.stockList);
|
||||
|
||||
return state.stockList
|
||||
.map((stock, i) => {
|
||||
@@ -95,7 +97,7 @@ export const useStore = defineStore({
|
||||
? stock.vehicleRef.type
|
||||
: `${stock.vehicleRef.type}:${stock.cargo.id}`;
|
||||
|
||||
if (i == 0)
|
||||
if (i == 0 && (coldStartActive || doubleManningActive))
|
||||
return `${stockTypeStr},${coldStartActive ? 'c' : ''}${doubleManningActive ? 'd' : ''}`;
|
||||
|
||||
return stockTypeStr;
|
||||
|
||||
Reference in New Issue
Block a user