Mount the mod filesystem context in the ModData ctor.
This commit is contained in:
@@ -362,7 +362,6 @@ namespace OpenRA
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModData.MountFiles();
|
|
||||||
ModData.InitializeLoaders();
|
ModData.InitializeLoaders();
|
||||||
Renderer.InitializeFonts(ModData.Manifest);
|
Renderer.InitializeFonts(ModData.Manifest);
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ namespace OpenRA
|
|||||||
LoadScreen.Display();
|
LoadScreen.Display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModFiles.LoadFromManifest(Manifest);
|
||||||
|
|
||||||
WidgetLoader = new WidgetLoader(this);
|
WidgetLoader = new WidgetLoader(this);
|
||||||
RulesetCache = new RulesetCache(this);
|
RulesetCache = new RulesetCache(this);
|
||||||
RulesetCache.LoadingProgress += HandleLoadingProgress;
|
RulesetCache.LoadingProgress += HandleLoadingProgress;
|
||||||
@@ -86,11 +88,6 @@ namespace OpenRA
|
|||||||
LoadScreen.Display();
|
LoadScreen.Display();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MountFiles()
|
|
||||||
{
|
|
||||||
ModFiles.LoadFromManifest(Manifest);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitializeLoaders()
|
public void InitializeLoaders()
|
||||||
{
|
{
|
||||||
// all this manipulation of static crap here is nasty and breaks
|
// all this manipulation of static crap here is nasty and breaks
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
{
|
{
|
||||||
// HACK: The engine code assumes that Game.modData is set.
|
// HACK: The engine code assumes that Game.modData is set.
|
||||||
Game.ModData = modData;
|
Game.ModData = modData;
|
||||||
Game.ModData.MountFiles();
|
|
||||||
|
|
||||||
var src = args[1];
|
var src = args[1];
|
||||||
var shadowIndex = new int[] { };
|
var shadowIndex = new int[] { };
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
public void Run(ModData modData, string[] args)
|
public void Run(ModData modData, string[] args)
|
||||||
{
|
{
|
||||||
Game.ModData = modData;
|
Game.ModData = modData;
|
||||||
modData.MountFiles();
|
|
||||||
|
|
||||||
var map = new Map(args[1]);
|
var map = new Map(args[1]);
|
||||||
var minimap = Minimap.RenderMapPreview(map.Rules.TileSets[map.Tileset], map, true);
|
var minimap = Minimap.RenderMapPreview(map.Rules.TileSets[map.Tileset], map, true);
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
{
|
{
|
||||||
// HACK: The engine code assumes that Game.modData is set.
|
// HACK: The engine code assumes that Game.modData is set.
|
||||||
Game.ModData = modData;
|
Game.ModData = modData;
|
||||||
Game.ModData.MountFiles();
|
|
||||||
|
|
||||||
Rules = Game.ModData.RulesetCache.Load();
|
Rules = Game.ModData.RulesetCache.Load();
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ namespace OpenRA.Mods.TS.UtilityCommands
|
|||||||
{
|
{
|
||||||
// HACK: The engine code assumes that Game.modData is set.
|
// HACK: The engine code assumes that Game.modData is set.
|
||||||
Game.ModData = modData;
|
Game.ModData = modData;
|
||||||
Game.ModData.MountFiles();
|
|
||||||
|
|
||||||
var filename = args[1];
|
var filename = args[1];
|
||||||
var file = new IniFile(File.Open(args[1], FileMode.Open));
|
var file = new IniFile(File.Open(args[1], FileMode.Open));
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ namespace OpenRA.Mods.TS.UtilityCommands
|
|||||||
{
|
{
|
||||||
// HACK: The engine code assumes that Game.modData is set.
|
// HACK: The engine code assumes that Game.modData is set.
|
||||||
Game.ModData = modData;
|
Game.ModData = modData;
|
||||||
Game.ModData.MountFiles();
|
|
||||||
|
|
||||||
var file = new IniFile(File.Open(args[1], FileMode.Open));
|
var file = new IniFile(File.Open(args[1], FileMode.Open));
|
||||||
var extension = args[2];
|
var extension = args[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user