Skip to content

Commit

Permalink
Add installData.json duplicate id check
Browse files Browse the repository at this point in the history
  • Loading branch information
drojf committed Aug 21, 2022
1 parent 9766862 commit dac8c36
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fileVersionManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,16 @@ def Developer_ValidateVersionDataJSON(modList):
"DEVELOPER ERROR: versionData.json is missing the game/submod pair: {}".format(subModID))
continue

# Check for duplicate ids in versionData.json
dup_ids_check = set()
for file in subMod.files + subMod.fileOverrides:
if file.id in dup_ids_check:
failureStrings.append(
"DEVELOPER ERROR: In versionData.json, [{}] is has duplicate id [{}]".format(
subModID, file.id))
else:
dup_ids_check.add(file.id)

# Check each file in the submod exists in the versionData.json
for file in subMod.files + subMod.fileOverrides:
# Items with file.url = None are not downloaded/installed, so skip them
Expand Down

0 comments on commit dac8c36

Please sign in to comment.