Unhardcode mod logo and preview image paths
This commit is contained in:
@@ -25,6 +25,8 @@ namespace OpenRA
|
|||||||
public string Description;
|
public string Description;
|
||||||
public string Version;
|
public string Version;
|
||||||
public string Author;
|
public string Author;
|
||||||
|
public string LogoImagePath;
|
||||||
|
public string PreviewImagePath;
|
||||||
public bool Hidden;
|
public bool Hidden;
|
||||||
public ContentInstaller Content;
|
public ContentInstaller Content;
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var preview = new Bitmap(Platform.ResolvePath(".", "mods", mod.Id, "preview.png")))
|
using (var preview = new Bitmap(Platform.ResolvePath(mod.PreviewImagePath)))
|
||||||
if (preview.Width == 296 && preview.Height == 196)
|
if (preview.Width == 296 && preview.Height == 196)
|
||||||
previews.Add(mod.Id, sheetBuilder.Add(preview));
|
previews.Add(mod.Id, sheetBuilder.Add(preview));
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var logo = new Bitmap(Platform.ResolvePath(".", "mods", mod.Id, "logo.png")))
|
using (var logo = new Bitmap(Platform.ResolvePath(mod.LogoImagePath)))
|
||||||
if (logo.Width == 96 && logo.Height == 96)
|
if (logo.Width == 96 && logo.Height == 96)
|
||||||
logos.Add(mod.Id, sheetBuilder.Add(logo));
|
logos.Add(mod.Id, sheetBuilder.Add(logo));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ 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.
|
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}
|
Version: {DEV_VERSION}
|
||||||
Author: the OpenRA Developers
|
Author: the OpenRA Developers
|
||||||
|
LogoImagePath: ./mods/cnc/logo.png
|
||||||
|
PreviewImagePath: ./mods/cnc/preview.png
|
||||||
|
|
||||||
RequiresMods:
|
RequiresMods:
|
||||||
modchooser: {DEV_VERSION}
|
modchooser: {DEV_VERSION}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ 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.
|
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}
|
Version: {DEV_VERSION}
|
||||||
Author: the OpenRA Developers
|
Author: the OpenRA Developers
|
||||||
|
LogoImagePath: ./mods/d2k/logo.png
|
||||||
|
PreviewImagePath: ./mods/d2k/preview.png
|
||||||
|
|
||||||
RequiresMods:
|
RequiresMods:
|
||||||
modchooser: {DEV_VERSION}
|
modchooser: {DEV_VERSION}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ 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.
|
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}
|
Version: {DEV_VERSION}
|
||||||
Author: the OpenRA Developers
|
Author: the OpenRA Developers
|
||||||
|
LogoImagePath: ./mods/ra/logo.png
|
||||||
|
PreviewImagePath: ./mods/ra/preview.png
|
||||||
|
|
||||||
RequiresMods:
|
RequiresMods:
|
||||||
modchooser: {DEV_VERSION}
|
modchooser: {DEV_VERSION}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ Metadata:
|
|||||||
Description: Developer stub, not yet ready for release!
|
Description: Developer stub, not yet ready for release!
|
||||||
Version: {DEV_VERSION}
|
Version: {DEV_VERSION}
|
||||||
Author: the OpenRA Developers
|
Author: the OpenRA Developers
|
||||||
|
LogoImagePath: ./mods/ts/logo.png
|
||||||
|
PreviewImagePath: ./mods/ts/preview.png
|
||||||
|
|
||||||
RequiresMods:
|
RequiresMods:
|
||||||
modchooser: {DEV_VERSION}
|
modchooser: {DEV_VERSION}
|
||||||
|
|||||||
Reference in New Issue
Block a user