Merge pull request #10706 from pchote/filesystem-assemblies

Loads mod assemblies via the virtual filesystem.
This commit is contained in:
Oliver Brakmann
2016-02-07 16:53:33 +01:00
2 changed files with 6 additions and 7 deletions

View File

@@ -41,11 +41,12 @@ namespace OpenRA
{
Languages = new string[0];
Manifest = new Manifest(mod);
ModFiles.LoadFromManifest(Manifest);
// Allow mods to load types from the core Game assembly, and any additional assemblies they specify.
var assemblies =
new[] { typeof(Game).Assembly }.Concat(
Manifest.Assemblies.Select(path => Assembly.LoadFrom(Platform.ResolvePath(path))));
var assemblies = new[] { typeof(Game).Assembly }
.Concat(Manifest.Assemblies.Select(path => Assembly.Load(ModFiles.Open(path).ReadAllBytes())))
.ToList();
ObjectCreator = new ObjectCreator(assemblies);
Manifest.LoadCustomData(ObjectCreator);
@@ -56,8 +57,6 @@ namespace OpenRA
LoadScreen.Display();
}
ModFiles.LoadFromManifest(Manifest);
WidgetLoader = new WidgetLoader(this);
RulesetCache = new RulesetCache(this);
RulesetCache.LoadingProgress += HandleLoadingProgress;

View File

@@ -7,7 +7,7 @@ Metadata:
RequiresMods:
Folders:
Packages:
.
Cursors:
@@ -17,7 +17,7 @@ Chrome:
Assemblies:
./mods/common/OpenRA.Mods.Common.dll
./mods/ra/OpenRA.Mods.RA.dll
d2k:OpenRA.Mods.D2k.dll
./mods/d2k/OpenRA.Mods.D2k.dll
./mods/cnc/OpenRA.Mods.Cnc.dll
./mods/ts/OpenRA.Mods.TS.dll