public static void InitializeSaveData(FileInfo globalDataFile) { BackendInitializer.InitializeSaveData(globalDataFile); if (globalDataFile is null) { SaveSystem.AddGlobalSave(new FrontendGlobalSave()); SaveSystem.AddSessionSave <FrontendSessionSave>(); } else { throw new Backend.Tools.InDevelopmentExceptionThatBreaksOnRelease(); } }
/// <summary> /// Initialize any systems or engines in the frontend that the save data requires to exist before it loads. for example, any achievements declared in the frontend (so, all of them) /// must be added to the achievement manager, or else they won't point to anything when the data is loaded and therefore be lost or ignored. /// </summary> public static void PreSaveInit() { BackendInitializer.PreSaveInit(() => new StandardDisplay(), DisplayManager.GetCurrentDisplay, DisplayManager.LoadDisplay, AreaManager.placeCollection, AreaManager.locationCollection, AreaManager.dungeonCollection, AreaManager.homeBaseCollection, DifficultyManager.difficultyCollection, DifficultyManager.defaultDifficultyIndex, PerkManager.conditionalPerks); GameplaySettingsManager.IncludeGameplaySetting(new HyperHappySettings()); CreditManager.AddCreditCategory(new FrontendCredits()); CreditManager.AddCreditCategory(new FrontendModCredits()); AchievementManager.RegisterAchievement(new Achievements.StartTheGameINeedAnAchievementForDebugging()); #warning Parse global File Data accordingly. note it may be null if file does not exist. }
public static void FinalizeInitialization() { BackendInitializer.FinalizeInitialization(); }
public static void PostSaveInit() { BackendInitializer.PostSaveInit(); }
/// <summary> /// Initialize any additional systems that the save engine may require, but rely on other systems that were initialized in the preSaveInit function. This is mostly a convenience /// function, but there may arise cases where it is legitimately difficult, or impossible, to do this any other way. /// </summary> public static void LatePreSaveInit() { BackendInitializer.LatePreSaveInit(); //handle any post init stuff here. }