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

@@ -7,7 +7,7 @@ origin: C&C The Ultimate Collection (Origin version, English)
GDFBinary_en_US.dll: 4bb56a449bd0003e7ae67625d90a11ae169319d6
Install:
# Base game files:
ContentPackage:
ContentPackage@tibsun:
Name: tibsun
Actions:
ExtractMix: TIBSUN.MIX
@@ -26,10 +26,10 @@ origin: C&C The Ultimate Collection (Origin version, English)
^SupportDir|Content/ts/tem.mix: tem.mix
^SupportDir|Content/ts/temperat.mix: temperat.mix
# Firestorm expansion files:
ContentPackage:
ContentPackage@fstorm:
Name: fstorm
Actions:
ExtractMix: expand01.mix
ExtractMix@1: expand01.mix
^SupportDir|Content/ts/firestorm/m_emp.vxl: m_emp.vxl
^SupportDir|Content/ts/firestorm/mwar_nod.vxl: mwar_nod.vxl
^SupportDir|Content/ts/firestorm/djuggbar.vxl: djuggbar.vxl
@@ -53,7 +53,7 @@ origin: C&C The Ultimate Collection (Origin version, English)
^SupportDir|Content/ts/firestorm/sounds01.mix: sounds01.mix
^SupportDir|Content/ts/firestorm/isotemp.mix: isotemp.mix
^SupportDir|Content/ts/firestorm/temperat.mix: temperat.mix
ExtractMix: ^SupportDir|Content/ts/firestorm/isotemp.mix
ExtractMix@2: ^SupportDir|Content/ts/firestorm/isotemp.mix
^SupportDir|Content/ts/firestorm/blat01.tem: blat01.tem
^SupportDir|Content/ts/firestorm/blat01a.tem: blat01a.tem
^SupportDir|Content/ts/firestorm/blat02.tem: blat02.tem
@@ -195,8 +195,8 @@ origin: C&C The Ultimate Collection (Origin version, English)
^SupportDir|Content/ts/firestorm/swamp07.tem: swamp07.tem
^SupportDir|Content/ts/firestorm/swamp08.tem: swamp08.tem
^SupportDir|Content/ts/firestorm/swamp09.tem: swamp09.tem
Delete: ^SupportDir|Content/ts/firestorm/isotemp.mix
ExtractMix: ^SupportDir|Content/ts/firestorm/temperat.mix
Delete@3: ^SupportDir|Content/ts/firestorm/isotemp.mix
ExtractMix@4: ^SupportDir|Content/ts/firestorm/temperat.mix
^SupportDir|Content/ts/firestorm/fona01.tem: fona01.tem
^SupportDir|Content/ts/firestorm/fona02.tem: fona02.tem
^SupportDir|Content/ts/firestorm/fona03.tem: fona03.tem
@@ -213,15 +213,15 @@ origin: C&C The Ultimate Collection (Origin version, English)
^SupportDir|Content/ts/firestorm/fona14.tem: fona14.tem
^SupportDir|Content/ts/firestorm/fona15.tem: fona15.tem
^SupportDir|Content/ts/firestorm/bigblue3.tem: bigblue3.tem
Delete: ^SupportDir|Content/ts/firestorm/temperat.mix
Delete@5: ^SupportDir|Content/ts/firestorm/temperat.mix
# Base game music (optional):
ContentPackage:
ContentPackage@tibsun-music:
Name: tibsun-music
Actions:
Copy: .
^SupportDir|Content/ts/scores.mix: SCORES.MIX
# Firestorm expansion music (optional):
ContentPackage:
ContentPackage@fstorm-music:
Name: fstorm-music
Actions:
Copy: .