This repository has been archived by the owner on May 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Luxusio/develop
Release 1.1.1
- Loading branch information
Showing
8 changed files
with
226 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEngine; | ||
|
||
namespace NoStopMod.AsyncInput.HitIgnore | ||
{ | ||
class HitIgnoreManager | ||
{ | ||
private Dictionary<String, bool[]> dictionary; | ||
|
||
public bool scnCLS_searchMode; | ||
public scrController.States scrController_state; | ||
|
||
public HitIgnoreManager() | ||
{ | ||
if (GCS.sceneToLoad == null) GCS.sceneToLoad = "scnNewIntro"; | ||
|
||
dictionary = new Dictionary<string, bool[]>(); | ||
|
||
bool[] ignoreScnNewIntro = Enumerable.Repeat(false, 1024).ToArray(); | ||
dictionary["scnNewIntro"] = ignoreScnNewIntro; | ||
ignoreScnNewIntro[(int)KeyCode.BackQuote] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha0] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha1] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha2] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha3] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha4] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha5] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha6] = true; | ||
ignoreScnNewIntro[(int)KeyCode.Alpha7] = true; | ||
|
||
bool[] ignoreScnCLS = Enumerable.Repeat(false, 1024).ToArray(); | ||
dictionary["scnCLS"] = ignoreScnCLS; | ||
ignoreScnCLS[(int)KeyCode.S] = true; | ||
ignoreScnCLS[(int)KeyCode.Delete] = true; | ||
ignoreScnCLS[(int)KeyCode.F] = true; | ||
ignoreScnCLS[(int)KeyCode.O] = true; | ||
ignoreScnCLS[(int)KeyCode.Alpha7] = true; | ||
ignoreScnCLS[(int)KeyCode.UpArrow] = true; | ||
ignoreScnCLS[(int)KeyCode.DownArrow] = true; | ||
|
||
scnCLS_searchMode = false; | ||
} | ||
|
||
public bool shouldBeIgnored(KeyCode keyCode) | ||
{ | ||
if (keyCode == KeyCode.Escape) return true; | ||
if (scrController_state != scrController.States.PlayerControl) return true; | ||
|
||
bool[] ignoreScnCLS; | ||
if (dictionary.TryGetValue(GCS.sceneToLoad, out ignoreScnCLS)) | ||
{ | ||
if (GCS.sceneToLoad == "scnCLS" && scnCLS_searchMode) | ||
{ | ||
return true; | ||
} | ||
return ignoreScnCLS[(int) keyCode]; | ||
} | ||
return false; | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using HarmonyLib; | ||
using MonsterLove.StateMachine; | ||
using System; | ||
|
||
namespace NoStopMod.AsyncInput.HitIgnore | ||
{ | ||
class HitIgnorePatches | ||
{ | ||
|
||
// scnCLS_serachMode //////////////////////////////////// | ||
[HarmonyPatch(typeof(scnCLS), "Refresh")] | ||
private static class scnCLS_Refresh_Patch | ||
{ | ||
public static void Postfix(scnCLS __instance, ref bool ___searchMode) | ||
{ | ||
NoStopMod.asyncInputManager.hitIgnoreManager.scnCLS_searchMode = ___searchMode; | ||
} | ||
} | ||
|
||
[HarmonyPatch(typeof(scnCLS), "ToggleSearchMode")] | ||
private static class scnCLS_ToggleSearchMode_Patch | ||
{ | ||
public static void Postfix(scnCLS __instance, ref bool ___searchMode) | ||
{ | ||
NoStopMod.asyncInputManager.hitIgnoreManager.scnCLS_searchMode = ___searchMode; | ||
} | ||
} | ||
|
||
// scrController_state ////////////////////////// | ||
[HarmonyPatch(typeof(StateEngine), "ChangeState")] | ||
private static class StateEngine_ChangeState_Patch | ||
{ | ||
public static void Postfix(StateEngine __instance, Enum newState, StateTransition transition) | ||
{ | ||
NoStopMod.asyncInputManager.hitIgnoreManager.scrController_state = (scrController.States) newState; | ||
} | ||
} | ||
|
||
[HarmonyPatch(typeof(scrController), "OnLandOnPortal")] | ||
private static class scrController_OnLandOnPortal_Patch | ||
{ | ||
public static void Postfix(scrController __instance) | ||
{ | ||
NoStopMod.asyncInputManager.hitIgnoreManager.scrController_state = scrController.States.Won; | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
using UnityModManagerNet; | ||
|
||
namespace NoStopMod.HyperRabbit | ||
{ | ||
class HyperRabbitManager | ||
{ | ||
|
||
|
||
public bool isEnabled; | ||
|
||
|
||
enum Status | ||
{ | ||
OFF, | ||
FIXED_OTTO, | ||
HYPER_RABBIT, | ||
} | ||
|
||
public HyperRabbitManager() | ||
{ | ||
NoStopMod.onToggleListeners.Add(OnToggle); | ||
NoStopMod.onGUIListeners.Add(OnGUI); | ||
} | ||
|
||
private void OnToggle(bool enabled) | ||
{ | ||
this.isEnabled = enabled; | ||
} | ||
|
||
private void OnGUI(UnityModManager.ModEntry modEntry) | ||
{ | ||
GUILayout.BeginHorizontal("HyperRabbit"); | ||
GUILayout.TextArea("HyperRabbit Status", 20); | ||
//if (GUILayout.Button(tex)) | ||
//{ | ||
|
||
//} | ||
//this.isEnabled = GUILayout.Toggle(isEnabled, "HyperRabbit"); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters