Example #1
0
 public static void Prefix(StoryGoalCustomEventHandler __instance, ref string key)
 {
     foreach (StoryGoalCustomEventHandler.SunbeamGoal sunbeamGoal in __instance.sunbeamGoals)
     {
         if (string.Equals(key, sunbeamGoal.trigger, StringComparison.OrdinalIgnoreCase))
         {
             if (__instance.gunDisabled)
             {
                 sunbeamGoal.Trigger();
                 key = "nope";
             }
         }
     }
     if (string.Equals(key, "SunbeamCheckPlayerRange", StringComparison.OrdinalIgnoreCase))
     {
         if (__instance.gunDisabled)
         {
             MonoBehaviour main = __instance;
             __instance.countdownActive = false;
             main.Invoke("StartSunbeamShootdownFX", 26f);
             if (VFXSunbeam.main != null)
             {
                 VFXSunbeam.main.PlaySFX();
                 VFXSunbeam.main.PlaySequence();
             }
             else
             {
                 Debug.LogError("VFXSunbeam.main can not be found", null);
             }
             key = "nope";
         }
     }
 }
Example #2
0
 public static void AwakeGunDisabledCheck(StoryGoalCustomEventHandler __instance)
 {
     if (__instance != null &&
         __instance.gunDeactivate != null && !String.IsNullOrEmpty(__instance.gunDeactivate.key) &&
         Story.StoryGoalManager.main.IsGoalComplete(__instance.gunDeactivate.key))
     {
         ManageStoryEvents.PrecursorGunDisabledNotification();
     }
 }
Example #3
0
 public static bool Prefix(StoryGoalCustomEventHandler __instance)
 {
     if (StoryGoalCustomEventHandler.main.gunDisabled && __instance != null)
     {
         SceneManager.LoadSceneAsync("EndCreditsSceneCleaner", LoadSceneMode.Single);
         return(false);
     }
     return(true);
 }
        /**
         * Returns true if we're currently showing the Sunbeam Arrival countdown
         */
        static bool isSunbeamShowing(uGUI_SunbeamCountdown __instance)
        {
            StoryGoalCustomEventHandler main = StoryGoalCustomEventHandler.main;

            return(main && main.countdownActive);
        }