Exemplo n.º 1
0
        // Automatically override intro cutscenes
        private static void SlugcatSelectMenu_StartGame(On.Menu.SlugcatSelectMenu.orig_StartGame orig, SlugcatSelectMenu self, int storyGameCharacter)
        {
            orig(self, storyGameCharacter);

            if (!self.restartChecked && self.manager.rainWorld.progression.IsThereASavedGame(storyGameCharacter))
            {
                return;
            }

            // Only continue to the slideshow if this character has an intro slideshow
            SlugBaseCharacter ply = PlayerManager.GetCustomPlayer(storyGameCharacter);

            if (ply == null)
            {
                return;
            }
            if (ply.HasSlideshow("Intro") && !Input.GetKey("s"))
            {
                OverrideNextSlideshow(ply, "Intro");
                self.manager.upcomingProcess = null;
                self.manager.RequestMainProcessSwitch(ProcessManager.ProcessID.SlideShow);
            }
            else
            {
                self.manager.upcomingProcess = null;
                self.manager.RequestMainProcessSwitch(ProcessManager.ProcessID.Game);
            }
        }
Exemplo n.º 2
0
        internal static void SlugcatSelectMenu_StartGame(On.Menu.SlugcatSelectMenu.orig_StartGame orig, SlugcatSelectMenu self, int storyGameCharacter)
        {
            orig(self, storyGameCharacter);
            // Bugfix to prevent crazy inconsistency that could happen if played restarted a save they just starved on
            // (vanilla would call 'Wipe' and still load the starve which is clearly a bug)

            if (self.manager.menuSetup.startGameCondition == ProcessManager.MenuSetup.StoryGameInitCondition.New)
            {
                self.manager.rainWorld.progression.starvedSaveState = null;
            }
        }
Exemplo n.º 3
0
 private static void SlugcatSelectMenu_StartGame(On.Menu.SlugcatSelectMenu.orig_StartGame orig, Menu.SlugcatSelectMenu self, int storyGameCharacter) //Always SkipIntro
 {
     if (self.manager.rainWorld.progression.gameTinkeredWith)
     {
         return;
     }
     self.manager.arenaSitting = null;
     self.manager.rainWorld.progression.currentSaveState = null;
     self.manager.rainWorld.progression.miscProgressionData.currentlySelectedSinglePlayerSlugcat = storyGameCharacter;
     if (!self.restartChecked && self.manager.rainWorld.progression.IsThereASavedGame(storyGameCharacter))
     {
         if (storyGameCharacter == 2 && self.redIsDead)
         {
             self.redSaveState = self.manager.rainWorld.progression.GetOrInitiateSaveState(2, null, self.manager.menuSetup, false);
             self.manager.RequestMainProcessSwitch(ProcessManager.ProcessID.Statistics);
             self.PlaySound(SoundID.MENU_Switch_Page_Out);
         }
         else
         {
             self.manager.menuSetup.startGameCondition = ProcessManager.MenuSetup.StoryGameInitCondition.Load;
             self.manager.RequestMainProcessSwitch(ProcessManager.ProcessID.Game);
             self.PlaySound(SoundID.MENU_Continue_Game);
         }
     }
     else
     {
         self.manager.rainWorld.progression.WipeSaveState(storyGameCharacter);
         self.manager.menuSetup.startGameCondition = ProcessManager.MenuSetup.StoryGameInitCondition.New;
         self.manager.RequestMainProcessSwitch(ProcessManager.ProcessID.Game);
         self.PlaySound(SoundID.MENU_Start_New_Game);
     }
     if (self.manager.musicPlayer != null && self.manager.musicPlayer.song != null && self.manager.musicPlayer.song is Music.IntroRollMusic)
     {
         self.manager.musicPlayer.song.FadeOut(20f);
     }
 }