Rework mod enumeration / caching.

- Replaced ModMetadata.AllMods with Game.Mods.
- Store / reference mod Manifest instead of ModMetadata.
- Removes engine dependency on ModContent class.
This commit is contained in:
Paul Chote
2016-08-05 17:07:04 +01:00
parent 45a596953e
commit 3df9efb95d
33 changed files with 301 additions and 219 deletions

View File

@@ -316,8 +316,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
var queryURL = Game.Settings.Server.MasterServer + "games?version={0}&mod={1}&modversion={2}".F(
Uri.EscapeUriString(ModMetadata.AllMods["modchooser"].Version),
Uri.EscapeUriString(Game.ModData.Manifest.Mod.Id),
Uri.EscapeUriString(Game.Mods["modchooser"].Mod.Version),
Uri.EscapeUriString(Game.ModData.Manifest.Id),
Uri.EscapeUriString(Game.ModData.Manifest.Mod.Version));
currentQuery = new Download(queryURL, _ => { }, onComplete);
@@ -330,7 +330,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return 0;
// Games for the current mod+version are sorted first
if (testEntry.ModId == modData.Manifest.Mod.Id)
if (testEntry.ModId == modData.Manifest.Id)
return 2;
// Followed by games for different mods that are joinable