public static void PreCreateHook(Game.Map self, Game.CreateWorldOptions options) { modSaveFile = new ModSaveFile(); foreach (var mod in active_mods) { mod.PreWorldCreation(modSaveFile.GetDataFor(mod), self, options); } }
public static void PreLoadHook(Game.GnomanEmpire self, string fileName, bool fallenKingdom) { var dir = fallenKingdom ? Game.GnomanEmpire.SaveFolderPath("OldWorlds\\") : Game.GnomanEmpire.SaveFolderPath("Worlds\\"); var file = System.IO.Path.Combine(dir, fileName + ".msv"); modSaveFile = ModSaveFile.LoadFrom(new System.IO.FileInfo(file)); foreach (var mod in active_mods) { mod.PreGameLoaded(modSaveFile.GetDataFor(mod)); } }