diff --git a/OpenRA.Game/ModMetadata.cs b/OpenRA.Game/ModMetadata.cs index 2d24c3fc73..09c30e3942 100644 --- a/OpenRA.Game/ModMetadata.cs +++ b/OpenRA.Game/ModMetadata.cs @@ -25,8 +25,6 @@ namespace OpenRA public string Description; public string Version; public string Author; - public string LogoImagePath; - public string PreviewImagePath; public bool Hidden; public ContentInstaller Content; diff --git a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs index 81ad20fc94..cc71d41d9f 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs @@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { try { - using (var preview = new Bitmap(Platform.ResolvePath(mod.PreviewImagePath))) + using (var preview = new Bitmap(Platform.ResolvePath(ModMetadata.CandidateModPaths[mod.Id], "preview.png"))) if (preview.Width == 296 && preview.Height == 196) previews.Add(mod.Id, sheetBuilder.Add(preview)); } @@ -90,7 +90,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic try { - using (var logo = new Bitmap(Platform.ResolvePath(mod.LogoImagePath))) + using (var logo = new Bitmap(Platform.ResolvePath(ModMetadata.CandidateModPaths[mod.Id], "logo.png"))) if (logo.Width == 96 && logo.Height == 96) logos.Add(mod.Id, sheetBuilder.Add(logo)); } diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index ea251587f2..17177eae48 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -3,8 +3,6 @@ Metadata: Description: Join the Global Defense Initiative or the Brotherhood of Nod in our\nrecreation of the classic game that started it all.\n\nTiberian Dawn modernizes the original Command & Conquer gameplay\nby introducing features from later games, including per-factory\nproduction queues, unit veterancy, and capturable tech structures. Version: {DEV_VERSION} Author: the OpenRA Developers - LogoImagePath: ./mods/cnc/logo.png - PreviewImagePath: ./mods/cnc/preview.png RequiresMods: modchooser: {DEV_VERSION} diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index a94f39688c..2bace6adeb 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -3,8 +3,6 @@ Metadata: Description: Three great houses fight for the precious spice, melange.\nHe who controls the spice controls the universe!\n\nTry to establish a foothold on the desert planet Arrakis\nwith its harsh environmental conditions and protect your\nharvesting operations from giant sandworms as well as\nruthless enemy factions. Version: {DEV_VERSION} Author: the OpenRA Developers - LogoImagePath: d2k:logo.png - PreviewImagePath: d2k:preview.png RequiresMods: modchooser: {DEV_VERSION} diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 1d89a43aef..4b188744e5 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -3,8 +3,6 @@ Metadata: Description: In a world where Hitler was assassinated and the Third Reich never\nexisted, the Soviet Union seeks power over all of Europe. Allied\nagainst this Evil Empire, the free world faces a Cold War turned hot.\n\nRed Alert fuses the quick and fun gameplay of the original\nC&C: Red Alert, with balance improvements and new gameplay\nfeatures inspired by modern RTS games. Version: {DEV_VERSION} Author: the OpenRA Developers - LogoImagePath: ./mods/ra/logo.png - PreviewImagePath: ./mods/ra/preview.png RequiresMods: modchooser: {DEV_VERSION} diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 0527483c93..363ff8ea88 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -3,8 +3,6 @@ Metadata: Description: Developer stub, not yet ready for release! Version: {DEV_VERSION} Author: the OpenRA Developers - LogoImagePath: ./mods/ts/logo.png - PreviewImagePath: ./mods/ts/preview.png RequiresMods: modchooser: {DEV_VERSION}