Skip to content

Commit 0db997d

Browse files
authored
feat: mod validation changes for 1.0 (#193)
* feat: include iostore utoc and ucas as objects * feat: add GameVersion to sample uplugin
1 parent 2cde2bd commit 0db997d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-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
})

src/routes/help/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
CanContainContent: true,
1111
FileVersion: 3,
1212
SemVersion: '1.0.0',
13+
GameVersion: '>=368883',
1314
Version: 1,
1415
Modules: [
1516
{

0 commit comments

Comments
 (0)