Move ModContent out of the engine.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Mods.Common.Widgets.Logic;
|
||||
using OpenRA.Widgets;
|
||||
@@ -21,8 +22,12 @@ namespace OpenRA.Mods.Common.LoadScreens
|
||||
public class BlankLoadScreen : ILoadScreen
|
||||
{
|
||||
public LaunchArguments Launch;
|
||||
ModData modData;
|
||||
|
||||
public virtual void Init(ModData m, Dictionary<string, string> info) { }
|
||||
public virtual void Init(ModData modData, Dictionary<string, string> info)
|
||||
{
|
||||
this.modData = modData;
|
||||
}
|
||||
|
||||
public virtual void Display()
|
||||
{
|
||||
@@ -97,5 +102,13 @@ namespace OpenRA.Mods.Common.LoadScreens
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public bool RequiredContentIsInstalled()
|
||||
{
|
||||
var content = modData.Manifest.Get<ModContent>();
|
||||
return content.Packages
|
||||
.Where(p => p.Value.Required)
|
||||
.All(p => p.Value.TestFiles.All(f => File.Exists(Platform.ResolvePath(f))));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user