public ModData(params string[] mods) { Manifest = new Manifest(mods); ObjectCreator = new ObjectCreator(Manifest); LoadScreen = ObjectCreator.CreateObject <ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest.LoadScreen.NodesDict.ToDictionary(x => x.Key, x => x.Value.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader(this); }
public ModData( params string[] mods ) { Manifest = new Manifest( mods ); ObjectCreator = new ObjectCreator( Manifest ); LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen); LoadScreen.Init(); LoadScreen.Display(); WidgetLoader = new WidgetLoader( this ); }
public ModData( params string[] mods ) { Manifest = new Manifest( mods ); ObjectCreator = new ObjectCreator( Manifest ); LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest.LoadScreen.NodesDict.ToDictionary(x => x.Key, x => x.Value.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader( this ); }
public ModData( params string[] mods ) { Manifest = new Manifest( mods ); ObjectCreator = new ObjectCreator( Manifest ); LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen); LoadScreen.Init(); LoadScreen.Display(); FileSystem.LoadFromManifest( Manifest ); ChromeProvider.Initialize( Manifest.Chrome ); SheetBuilder = new SheetBuilder( TextureChannel.Red ); CursorSheetBuilder = new CursorSheetBuilder( this ); AvailableMaps = FindMaps( mods ); WidgetLoader = new WidgetLoader( this ); }
public ModData(string mod) { Languages = new string[0]; Manifest = new Manifest(mod); ObjectCreator = new ObjectCreator(Manifest); LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest, Manifest.LoadScreen.NodesDict.ToDictionary(x => x.Key, x => x.Value.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader(this); // HACK: Mount only local folders so we have a half-working environment for the asset installer FileSystem.UnmountAll(); foreach (var dir in Manifest.Folders) FileSystem.Mount(dir); }
public ModData(string mod) { Languages = new string[0]; Manifest = new Manifest(mod); ObjectCreator = new ObjectCreator(Manifest); LoadScreen = ObjectCreator.CreateObject <ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest, Manifest.LoadScreen.NodesDict.ToDictionary(x => x.Key, x => x.Value.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader(this); // HACK: Mount only local folders so we have a half-working environment for the asset installer FileSystem.UnmountAll(); foreach (var dir in Manifest.Folders) { FileSystem.Mount(dir); } }
public ModData( params string[] mods ) { Manifest = new Manifest( mods ); ObjectCreator = new ObjectCreator( Manifest ); LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen); LoadScreen.Init(); LoadScreen.Display(); // all this manipulation of static crap here is nasty and breaks // horribly when you use ModData in unexpected ways. FileSystem.LoadFromManifest( Manifest ); ChromeProvider.Initialize( Manifest.Chrome ); SheetBuilder = new SheetBuilder( TextureChannel.Red ); CursorSheetBuilder = new CursorSheetBuilder( this ); AvailableMaps = FindMaps( mods ); WidgetLoader = new WidgetLoader( this ); }
public ModData(string mod) { Languages = new string[0]; Manifest = new Manifest(mod); ObjectCreator = new ObjectCreator(Manifest); LoadScreen = ObjectCreator.CreateObject <ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest, Manifest.LoadScreen.ToDictionary(my => my.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader(this); RulesetCache = new RulesetCache(this); RulesetCache.LoadingProgress += HandleLoadingProgress; MapCache = new MapCache(this); var loaders = new List <ISpriteLoader>(); foreach (var format in Manifest.SpriteFormats) { var loader = ObjectCreator.FindType(format + "Loader"); if (loader == null || !loader.GetInterfaces().Contains(typeof(ISpriteLoader))) { throw new InvalidOperationException("Unable to find a sprite loader for type '{0}'.".F(format)); } loaders.Add((ISpriteLoader)ObjectCreator.CreateBasic(loader)); } SpriteLoaders = loaders.ToArray(); // HACK: Mount only local folders so we have a half-working environment for the asset installer GlobalFileSystem.UnmountAll(); foreach (var dir in Manifest.Folders) { GlobalFileSystem.Mount(dir); } defaultRules = Exts.Lazy(() => RulesetCache.LoadDefaultRules()); initialThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; }
public ModData(string mod) { Languages = new string[0]; Manifest = new Manifest(mod); ObjectCreator = new ObjectCreator(Manifest); LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest, Manifest.LoadScreen.NodesDict.ToDictionary(x => x.Key, x => x.Value.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader(this); RulesetCache = new RulesetCache(this); RulesetCache.LoadingProgress += HandleLoadingProgress; MapCache = new MapCache(this); // HACK: Mount only local folders so we have a half-working environment for the asset installer GlobalFileSystem.UnmountAll(); foreach (var dir in Manifest.Folders) GlobalFileSystem.Mount(dir); defaultRules = Exts.Lazy(() => RulesetCache.LoadDefaultRules()); initialThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; }
public ModData(string mod) { Languages = new string[0]; Manifest = new Manifest(mod); ObjectCreator = new ObjectCreator(Manifest); LoadScreen = ObjectCreator.CreateObject <ILoadScreen>(Manifest.LoadScreen.Value); LoadScreen.Init(Manifest, Manifest.LoadScreen.ToDictionary(my => my.Value)); LoadScreen.Display(); WidgetLoader = new WidgetLoader(this); RulesetCache = new RulesetCache(this); RulesetCache.LoadingProgress += HandleLoadingProgress; MapCache = new MapCache(this); // HACK: Mount only local folders so we have a half-working environment for the asset installer GlobalFileSystem.UnmountAll(); foreach (var dir in Manifest.Folders) { GlobalFileSystem.Mount(dir); } defaultRules = Exts.Lazy(() => RulesetCache.LoadDefaultRules()); initialThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; }