Skip to content

Commit dac8c36

Browse files
committed
Add installData.json duplicate id check
1 parent 9766862 commit dac8c36

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fileVersionManagement.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,16 @@ def Developer_ValidateVersionDataJSON(modList):
374374
"DEVELOPER ERROR: versionData.json is missing the game/submod pair: {}".format(subModID))
375375
continue
376376

377+
# Check for duplicate ids in versionData.json
378+
dup_ids_check = set()
379+
for file in subMod.files + subMod.fileOverrides:
380+
if file.id in dup_ids_check:
381+
failureStrings.append(
382+
"DEVELOPER ERROR: In versionData.json, [{}] is has duplicate id [{}]".format(
383+
subModID, file.id))
384+
else:
385+
dup_ids_check.add(file.id)
386+
377387
# Check each file in the submod exists in the versionData.json
378388
for file in subMod.files + subMod.fileOverrides:
379389
# Items with file.url = None are not downloaded/installed, so skip them

0 commit comments

Comments
 (0)