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:
@@ -34,10 +34,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (mod == null)
|
||||
return IncompatibleReplayDialog("unknown mod", mod, onCancel);
|
||||
|
||||
var allMods = ModMetadata.AllMods;
|
||||
if (!allMods.ContainsKey(mod))
|
||||
if (!Game.Mods.ContainsKey(mod))
|
||||
return IncompatibleReplayDialog("unavailable mod", mod, onCancel);
|
||||
else if (allMods[mod].Version != version)
|
||||
|
||||
if (Game.Mods[mod].Mod.Version != version)
|
||||
return IncompatibleReplayDialog("incompatible version", version, onCancel);
|
||||
|
||||
if (replayMeta.GameInfo.MapPreview.Status != MapStatus.Available)
|
||||
|
||||
Reference in New Issue
Block a user