示例#1
0
        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();
            }
        }
示例#2
0
        /// <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.
        }
示例#3
0
 public static void FinalizeInitialization()
 {
     BackendInitializer.FinalizeInitialization();
 }
示例#4
0
 public static void PostSaveInit()
 {
     BackendInitializer.PostSaveInit();
 }
示例#5
0
        /// <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.
        }