internal void BootAll(BootStage stage) { try { foreach (ModDefinition mod in _mods) { mod.BootUp(stage); } } catch (Exception e) { throw new ModLoadingSequenceFailureException("Loading failed at " + stage.ToString(), e); } }
internal void BootUp(BootStage stage) { Console.WriteLine("Booting up " + stage.ToString().ToLowerInvariant() + " for " + _modfile.Name); switch (stage) { case BootStage.ITEMS: _masterClass.InitItems(ItemRegistry.Instance); break; case BootStage.RECIPES: _masterClass.InitRecipes(RecipeRegistry.Instance); break; case BootStage.PROJECTS: _masterClass.InitProjects(ProjectRegistry.Instance); break; default: throw new InvalidOperationException("Requested modload stage is unknown"); } }