Fix mod content installers.

In 4312a4d3f4 MiniYaml merging was adjusted. One effect of this change was that duplicate keys in files that did not previously require merging was previously allowed, but was now an error. (Test case `TestMergeConflictsNoMerge`)

The installer files were relying on the previous behaviour to allow multiple `ContentPackage` keys. The above change caused a regression where attempting to manage mod content would crash due to now erroring on the duplicate keys.

We fix the issue by applying a unique ID suffix, as is a common pattern elsewhere in our yaml files, and teach InstallFromSourceLogic to recognise and strip it.
This commit is contained in:
RoosterDragon
2024-07-30 19:15:37 +01:00
committed by Gustas
parent ebaed9966b
commit 578a9fe457
22 changed files with 198 additions and 193 deletions

View File

@@ -22,7 +22,7 @@ tfd: C&C The First Decade (English)
^SupportDir|Content/cnc/transit.mix: CnC\\TRANSIT.MIX
^SupportDir|Content/cnc/movies.mix: CnC\\MOVIES.MIX
# GDI campaign briefings (optional):
ContentPackage:
ContentPackage@movies-gdi:
Name: movies-gdi
Actions:
ExtractMix: ^SupportDir|Content/cnc/movies.mix
@@ -92,7 +92,7 @@ tfd: C&C The First Decade (English)
^SupportDir|Content/cnc/movies/bcanyon.vqa: bcanyon.vqa
^SupportDir|Content/cnc/movies/banner.vqa: banner.vqa
# Nod campaign briefings (optional):
ContentPackage:
ContentPackage@movies-nod:
Name: movies-nod
Actions:
ExtractMix: ^SupportDir|Content/cnc/movies.mix
@@ -158,7 +158,7 @@ tfd: C&C The First Decade (English)
^SupportDir|Content/cnc/movies/akira.vqa: akira.vqa
^SupportDir|Content/cnc/movies/airstrk.vqa: airstrk.vqa
# Base game music (optional):
ContentPackage:
ContentPackage@music:
Name: music
Actions:
ExtractIscab: data1.hdr
@@ -168,7 +168,7 @@ tfd: C&C The First Decade (English)
Extract:
^SupportDir|Content/cnc/scores.mix: CnC\\SCORES.MIX
# Covert Operations music (optional):
ContentPackage:
ContentPackage@music-covertops:
Name: music-covertops
Actions:
ExtractIscab: data1.hdr