Skip to content

Commit 432836e

Browse files
committed
feat: include iostore utoc and ucas as objects
1 parent 028d2a2 commit 432836e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/lib/models/versions.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ function dirname(path: string): string {
7070
return parts.slice(0, parts.length - 1).join('/');
7171
}
7272

73+
const objectExtensions = ['.so', '.dll', '.pak', '.utoc', '.ucas'];
74+
7375
const validateModZip = async (
7476
file: unknown,
7577
modReference: string
@@ -88,6 +90,8 @@ const validateModZip = async (
8890
};
8991
}
9092

93+
const objects = Object.keys(zip.files).filter((f) => objectExtensions.some((ext) => f.endsWith(ext)));
94+
9195
if (uPluginFiles.length === 1 && uPluginFiles[0].name === modReference + '.uplugin') {
9296
// Single-target mod
9397
const uPluginData = await readUPluginJson(await uPluginFiles[0].async('string'), modReference);
@@ -98,9 +102,7 @@ const validateModZip = async (
98102

99103
return {
100104
uplugin: uPluginData,
101-
objects: Object.keys(zip.files).filter(
102-
(f) => f.endsWith('.so') || f.endsWith('.dll') || f.endsWith('.pak')
103-
),
105+
objects,
104106
targets: ['Windows']
105107
};
106108
}
@@ -155,7 +157,7 @@ const validateModZip = async (
155157

156158
return {
157159
uplugin: uPluginData,
158-
objects: Object.keys(zip.files).filter((f) => f.endsWith('.so') || f.endsWith('.dll') || f.endsWith('.pak')),
160+
objects,
159161
targets
160162
};
161163
})

0 commit comments

Comments
 (0)