Пример #1
0
        /// <summary>The method to call after <see cref="Game1.loadForNewGame"/>.</summary>
        /// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
        private static void After_LoadForNewGame()
        {
            Game1Patcher.IsInLoadForNewGame = false;

            if (Game1Patcher.IsCreating())
            {
                Game1Patcher.OnStageChanged(LoadStage.CreatedLocations);
            }
        }
Пример #2
0
        /*********
        ** Private methods
        *********/
        /// <summary>The method to call before <see cref="Game1.AddModNPCs"/>.</summary>
        /// <returns>Returns whether to execute the original method.</returns>
        /// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
        private static bool Before_AddModNpcs()
        {
            // When this method is called from Game1.loadForNewGame, it happens right after adding the vanilla
            // locations but before initializing them.
            if (Game1Patcher.IsInLoadForNewGame)
            {
                Game1Patcher.OnStageChanged(Game1Patcher.IsCreating()
                    ? LoadStage.CreatedInitialLocations
                    : LoadStage.SaveAddedLocations
                                            );
            }

            return(true);
        }