Пример #1
0
 public static bool Prefix(Menuu __instance, Ray ___ray, RaycastHit ___hit, ref IEnumerator __result)
 {
     __result = GadgetCoreAPI.EmptyEnumerator();
     if (GadgetCoreAPI.IsInputFrozen())
     {
         return(false);
     }
     if (ModMenuController.RestartNeeded || ModBrowser.RestartNeeded)
     {
         foreach (System.Diagnostics.Process process in ModMenuController.ConfigHandles)
         {
             if (process != null && !process.HasExited)
             {
                 process.Kill();
             }
         }
         GadgetCoreAPI.Quit();
         return(false);
     }
     ModBrowser.CloseModBrowser();
     SceneInjector.ModMenuBeam.transform.localScale       = new Vector3(30f, 0f, 1f);
     SceneInjector.ModMenuButtonHolder.transform.position = new Vector3(-40f, 0f, 0f);
     SceneInjector.ModMenu.SetActive(false);
     SceneInjector.ModMenuCanvas.GetComponent <CanvasGroup>().alpha          = 0;
     SceneInjector.ModMenuCanvas.GetComponent <CanvasGroup>().interactable   = false;
     SceneInjector.ModMenuCanvas.GetComponent <CanvasGroup>().blocksRaycasts = false;
     GadgetModConfigs.CloseAllConfigMenus();
     __instance.StartCoroutine(AnimateModMenuButton(__instance));
     return(true);
 }
 public static bool Prefix(PlayerScript __instance, ref bool ___attacking, ref bool ___canAttack, ref GameScript ___gameScript, ref IEnumerator __result)
 {
     if (ItemRegistry.GetSingleton().HasEntry(GameScript.equippedIDs[0]) && !___attacking && ___canAttack && !___gameScript.combatSwitching && !PlayerScript.beaming && !VanillaItemInfo.Attacking)
     {
         ItemRegistry.GetSingleton().GetEntry(GameScript.equippedIDs[0]).InvokeOnAttack(__instance);
         __result = GadgetCoreAPI.EmptyEnumerator();
         return(false);
     }
     return(true);
 }
Пример #3
0
 public static bool Prefix(Menuu __instance, ref int ___stuffSelecting, ref IEnumerator __result)
 {
     ___stuffSelecting = 0;
     __instance.stuffChosen.transform.position = new Vector3(__instance.box[Menuu.curRace % CharacterRaceRegistry.PageSize].transform.position.x, __instance.box[Menuu.curRace % CharacterRaceRegistry.PageSize].transform.position.y, -3f);
     __instance.menuStuffSelect.SetActive(true);
     CharacterRaceRegistry.CurrentPage = Menuu.curRace / CharacterRaceRegistry.PageSize + 1;
     __instance.RefreshStuffSelect(Menuu.curRace % CharacterRaceRegistry.PageSize);
     __result = GadgetCoreAPI.EmptyEnumerator();
     return(false);
 }