diff --git a/OW_TAIcheat/OW_TAIcheat.csproj b/OW_TAIcheat/OW_TAIcheat.csproj
index ed430b1..addfa3e 100644
--- a/OW_TAIcheat/OW_TAIcheat.csproj
+++ b/OW_TAIcheat/OW_TAIcheat.csproj
@@ -38,28 +38,34 @@
..\..\..\..\Games\Outer Wilds\OuterWilds_Data\Managed\Assembly-CSharp.dll
- ..\packages\OWML.0.3.44\lib\net35\NAudio-Unity.dll
+ ..\packages\OWML.0.3.57\lib\net35\NAudio-Unity.dll
..\packages\Json.Net.Unity3D.9.0.1\lib\net35\Newtonsoft.Json.dll
- ..\packages\OWML.0.3.44\lib\net35\OWML.dll
+ ..\packages\OWML.0.3.57\lib\net35\OWML.dll
- ..\packages\OWML.0.3.44\lib\net35\OWML.Common.dll
+ ..\packages\OWML.0.3.57\lib\net35\OWML.Common.dll
- ..\packages\OWML.0.3.44\lib\net35\OWML.ModHelper.dll
+ ..\packages\OWML.0.3.57\lib\net35\OWML.ModHelper.dll
- ..\packages\OWML.0.3.44\lib\net35\OWML.ModHelper.Assets.dll
+ ..\packages\OWML.0.3.57\lib\net35\OWML.ModHelper.Assets.dll
- ..\packages\OWML.0.3.44\lib\net35\OWML.ModHelper.Events.dll
+ ..\packages\OWML.0.3.57\lib\net35\OWML.ModHelper.Events.dll
+
+
+ ..\packages\OWML.0.3.57\lib\net35\OWML.ModHelper.Input.dll
+
+
+ ..\packages\OWML.0.3.57\lib\net35\OWML.ModHelper.Interaction.dll
- ..\packages\OWML.0.3.44\lib\net35\OWML.ModHelper.Menus.dll
+ ..\packages\OWML.0.3.57\lib\net35\OWML.ModHelper.Menus.dll
@@ -91,17 +97,15 @@
+
-
-
-
xcopy /Y "$(TargetPath)" "$(SolutionDir)releases\$(ProjectName)\"
xcopy /Y "$(ProjectDir)manifest.json" "$(SolutionDir)releases\$(ProjectName)\"
-xcopy /Y "$(ProjectDir)buttons.txt" "$(SolutionDir)releases\$(ProjectName)\"
+xcopy /Y "$(ProjectDir)default-config.txt" "$(SolutionDir)releases\$(ProjectName)\"
7z a -tzip -mx5 -r0 $(SolutionDir)releases\$(ProjectName).zip $(SolutionDir)releases\$(ProjectName)\*.*
\ No newline at end of file
diff --git a/OW_TAIcheat/TAIcheat.cs b/OW_TAIcheat/TAIcheat.cs
index e270ad4..98ccade 100644
--- a/OW_TAIcheat/TAIcheat.cs
+++ b/OW_TAIcheat/TAIcheat.cs
@@ -1,310 +1,250 @@
using OWML.Common;
using OWML.ModHelper;
using OWML.ModHelper.Events;
+using OWML.ModHelper.Input;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
+using System.Collections;
+using System;
+using System.Collections.Generic;
+using Harmony;
-namespace OW_TAIcheat
+namespace TAIcheat
{
- public static class MyExtensions
- {
- public static void TAIcheat_SetTranslationalThrust(this JetpackThrusterModel jet, float newacc)
- {
- float oldtrst = jet.GetMaxTranslationalThrust();
- float oldbst = jet.GetBoostMaxThrust();
- FieldInfo fiboost = typeof(JetpackThrusterModel).GetField("_boostThrust", BindingFlags.NonPublic | BindingFlags.Instance);
- FieldInfo fithrust = typeof(JetpackThrusterModel).GetField("_maxTranslationalThrust", BindingFlags.NonPublic | BindingFlags.Instance);
- if (fiboost != null && fithrust != null)
- {
- fiboost.SetValue(jet, (object)(oldbst * (newacc / oldtrst)));
- fithrust.SetValue(jet, (object)(newacc));
- }
- }
- }
- public class DebugInput : ModBehaviour
- {
- private RelativeLocationData relconstr(Vector3 body_position, Quaternion body_rotation, Vector3 body_velocity, OWRigidbody relativeBody, Transform relativeTransform = null)
- {
- if (relativeTransform == null)
- {
- relativeTransform = relativeBody.transform;
- }
- RelativeLocationData res = new RelativeLocationData(Locator.GetPlayerBody(), relativeBody);
- res.localPosition = relativeTransform.InverseTransformPoint(body_position);
- res.localRotation = Quaternion.Inverse(relativeTransform.rotation) * body_rotation;
- res.localRelativeVelocity = relativeTransform.InverseTransformDirection(body_velocity - relativeBody.GetPointVelocity(body_position));
- return res;
- }
+ public static class MyExtensions
+ {
+ public static void TAIcheat_SetTranslationalThrust(this JetpackThrusterModel jet, float newacc)
+ {
+ float oldtrst = jet.GetMaxTranslationalThrust();
+ float oldbst = jet.GetBoostMaxThrust();
+ FieldInfo fiboost = typeof(JetpackThrusterModel).GetField("_boostThrust", BindingFlags.NonPublic | BindingFlags.Instance);
+ FieldInfo fithrust = typeof(JetpackThrusterModel).GetField("_maxTranslationalThrust", BindingFlags.NonPublic | BindingFlags.Instance);
+ if (fiboost != null && fithrust != null)
+ {
+ fiboost.SetValue(jet, (object)(oldbst * (newacc / oldtrst)));
+ fithrust.SetValue(jet, (object)(newacc));
+ }
+ }
+ }
+ public class DebugInput : ModBehaviour
+ {
+ private RelativeLocationData relconstr(Vector3 body_position, Quaternion body_rotation, Vector3 body_velocity, OWRigidbody relativeBody, Transform relativeTransform = null)
+ {
+ if (relativeTransform == null)
+ {
+ relativeTransform = relativeBody.transform;
+ }
+ RelativeLocationData res = new RelativeLocationData(Locator.GetPlayerBody(), relativeBody);
+ res.localPosition = relativeTransform.InverseTransformPoint(body_position);
+ res.localRotation = Quaternion.Inverse(relativeTransform.rotation) * body_rotation;
+ res.localRelativeVelocity = relativeTransform.InverseTransformDirection(body_velocity - relativeBody.GetPointVelocity(body_position));
+ return res;
+ }
- public static IModConsole console;
- public static GameObject player;
- public static PlayerSpacesuit playersuit;
+ public static IModConsole console;
+ public static IModLogger logger;
- private void Start()
- {
- console = ModHelper.Console;
- ModHelper.Console.WriteLine("TAICheat ready!");
- }
+ private void Start()
+ {
+ ModHelper.Console.WriteLine("TAICheat ready!");
+ }
- private void LateUpdate()
- {
- if (_playerController != null)
- this._gForce = this._playerController.GetNormalAccelerationScalar();
- }
+ public override void Configure(IModConfig config)
+ {
+ console = ModHelper.Console;
+ logger = ModHelper.Logger;
+ if (inputs != null)
+ {
+ foreach (string key in inputs.Keys)
+ {
+ ModHelper.Input.UnregisterCombination(inputs[key]);
+ }
+ }
+ inputs = new Dictionary();
+ foreach (string name in config.Settings.Keys)
+ {
+ if (config.GetSettingsValue(name) != null)
+ {
+ var combination = ModHelper.Input.RegisterCombination(this, name, config.GetSettingsValue(name));
+ inputs.Add(name, combination);
+ }
+ }
+ }
- private void OnGUI()
- {
- if (_playerController == null || _playerForceDetector == null)
- {
- this._playerForceDetector = Locator.GetPlayerForceDetector();
- this._playerController = Locator.GetPlayerController();
- if (_playerController == null || _playerForceDetector == null) return;
- }
- float num = 400f;
- if (GUIMode.IsHiddenMode() || PlayerState.UsingShipComputer())
- {
- return;
- }
- if (DebugInput.inputHUD == 1)
- {
- GUI.Label(new Rect(10f + num, 10f, 200f, 20f), "Time Scale: " + Mathf.Round(Time.timeScale * 100f) / 100f);
- GUI.Label(new Rect(10f + num, 25f, 200f, 20f), string.Concat(new object[]
- {
- "Time Remaining: ",
- Mathf.Floor(TimeLoop.GetSecondsRemaining() / 60f),
- ":",
- Mathf.Round(TimeLoop.GetSecondsRemaining() % 60f * 100f / 100f)
- }));
- GUI.Label(new Rect(10f + num, 40f, 200f, 20f), "Loop Count: " + TimeLoop.GetLoopCount());
- GUI.Label(new Rect(10f + num, 55f, 90f, 40f), "PauseFlags: ");
- GUI.Label(new Rect(100f + num, 55f, 50f, 40f), "MENU\n" + ((!OWTime.IsPaused(OWTime.PauseType.Menu)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(150f + num, 55f, 50f, 40f), "LOAD\n" + ((!OWTime.IsPaused(OWTime.PauseType.Loading)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(200f + num, 55f, 50f, 40f), "READ\n" + ((!OWTime.IsPaused(OWTime.PauseType.Reading)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(250f + num, 55f, 50f, 40f), "SLP\n" + ((!OWTime.IsPaused(OWTime.PauseType.Sleeping)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(300f + num, 55f, 50f, 40f), "INIT\n" + ((!OWTime.IsPaused(OWTime.PauseType.Initializing)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(350f + num, 55f, 50f, 40f), "STRM\n" + ((!OWTime.IsPaused(OWTime.PauseType.Streaming)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(400f + num, 55f, 50f, 40f), "SYS\n" + ((!OWTime.IsPaused(OWTime.PauseType.System)) ? "FALSE" : "TRUE "));
- GUI.Label(new Rect(10f + num, 85f, 200f, 20f), "Input Mode: " + OWInput.GetInputMode().ToString());
- this._inputModeArray = OWInput.GetInputModeStack();
- GUI.Label(new Rect(10f + num, 100f, 200f, 20f), "Input Mode Stack: ");
- int num2 = 150;
- int num3 = 0;
- while (num3 < this._inputModeArray.Length && this._inputModeArray[num3] != InputMode.None)
- {
- GUI.Label(new Rect((float)num2 + num, 100f, 200f, 20f), this._inputModeArray[num3].ToString());
- num2 += 75;
- num3++;
- }
- GUI.Label(new Rect(10f + num, 115f, 300f, 20f), "Net Force Accel: " + Mathf.Round(this._playerForceDetector.GetForceAcceleration().magnitude * 100f) / 100f);
- GUI.Label(new Rect(210f + num, 115f, 300f, 20f), "G-Force: " + Mathf.Round(this._gForce * 100f) / 100f);
- GUI.Label(new Rect(10f + num, 130f, 200f, 20f), "Load Time: " + LoadTimeTracker.GetLatestLoadTime());
- if (DynamicResolutionManager.isEnabled)
- {
- GUI.Label(new Rect(10f + num, 145f, 200f, 20f), "Resolution Scale: " + DynamicResolutionManager.currentResolutionScale);
- }
- GUI.Label(new Rect(10f + num, 160f, 200f, 20f), "Player Speed: " + (Locator.GetCenterOfTheUniverse().GetOffsetVelocity() + Locator.GetPlayerBody().GetVelocity()).magnitude.ToString());
- GUI.Label(new Rect(210f + num, 160f, 200f, 20f), "Player Accel: " + Locator.GetPlayerBody().GetAcceleration().magnitude.ToString());
- if (Locator.GetPlayerSuit().GetComponent())
- {
- GUI.Label(new Rect(10f + num, 175f, 200f, 20f), string.Concat(new object[]
- {
- "Jetpack Max Accel: ",
- Locator.GetPlayerSuit().GetComponent().GetMaxTranslationalThrust().ToString(),
- "/",
- Locator.GetPlayerSuit().GetComponent().GetBoostMaxThrust().ToString()
- }));
- }
- if (Locator.GetShipBody().GetComponent())
- {
- GUI.Label(new Rect(210f + num, 175f, 200f, 20f), "Ship Max Accel: " + Locator.GetShipBody().GetComponent().GetMaxTranslationalThrust().ToString());
- }
- GUI.Label(new Rect(10f + num, 190f, 400f, 20f), string.Concat(new object[]
- {
- "Inspector layer: ",
- DebugInput.rayMask,
- " ",
- LayerMask.LayerToName(DebugInput.rayMask)
- }));
- if (DebugInput.GetWarpOWRigidbody())
- {
- GUI.Label(new Rect(10f + num, 205f, 400f, 20f), string.Concat(new string[]
- {
- "Warp Body: ",
- DebugInput.GetWarpOWRigidbody().gameObject.name,
- " layer: ",
- DebugInput.GetWarpOWRigidbody().gameObject.layer.ToString(),
- " ",
- LayerMask.LayerToName(DebugInput.GetWarpOWRigidbody().gameObject.layer)
- }));
- }
- if (DebugInput.hit.collider)
- {
- GUI.Label(new Rect(10f + num, 220f, 400f, 20f), string.Concat(new string[]
- {
- "Latest hit layer: ",
- DebugInput.hit.collider.gameObject.layer.ToString(),
- " ",
- LayerMask.LayerToName(DebugInput.hit.collider.gameObject.layer)
- }));
- GUI.Label(new Rect(10f + num, 235f, 600f, 20f), "Name: " + DebugInput.hit.collider.gameObject.name + " Distance: " + (DebugInput.hit.point - Locator.GetPlayerBody().transform.position).magnitude.ToString());
- }
- /*if (PadEZ.PadManager.GetActiveController()!=null)
+ Dictionary inputs;
+
+ private void LateUpdate()
+ {
+ if (_playerController != null)
+ this._gForce = this._playerController.GetNormalAccelerationScalar();
+ }
+
+ private void OnGUI()
+ {
+ if (_playerController == null || _playerForceDetector == null)
+ {
+ this._playerForceDetector = Locator.GetPlayerForceDetector();
+ this._playerController = Locator.GetPlayerController();
+ if (_playerController == null || _playerForceDetector == null) return;
+ }
+ float num = 400f;
+ if (GUIMode.IsHiddenMode() || PlayerState.UsingShipComputer())
+ {
+ return;
+ }
+ if (inputHUD == 1)
+ {
+ GUI.Label(new Rect(10f + num, 10f, 200f, 20f), "Time Scale: " + Mathf.Round(Time.timeScale * 100f) / 100f);
+ GUI.Label(new Rect(10f + num, 25f, 200f, 20f), string.Concat(new object[]
+ {
+ "Time Remaining: ",
+ Mathf.Floor(TimeLoop.GetSecondsRemaining() / 60f),
+ ":",
+ Mathf.Round(TimeLoop.GetSecondsRemaining() % 60f * 100f / 100f)
+ }));
+ GUI.Label(new Rect(10f + num, 40f, 200f, 20f), "Loop Count: " + TimeLoop.GetLoopCount());
+ GUI.Label(new Rect(10f + num, 55f, 90f, 40f), "PauseFlags: ");
+ GUI.Label(new Rect(100f + num, 55f, 50f, 40f), "MENU\n" + ((!OWTime.IsPaused(OWTime.PauseType.Menu)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(150f + num, 55f, 50f, 40f), "LOAD\n" + ((!OWTime.IsPaused(OWTime.PauseType.Loading)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(200f + num, 55f, 50f, 40f), "READ\n" + ((!OWTime.IsPaused(OWTime.PauseType.Reading)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(250f + num, 55f, 50f, 40f), "SLP\n" + ((!OWTime.IsPaused(OWTime.PauseType.Sleeping)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(300f + num, 55f, 50f, 40f), "INIT\n" + ((!OWTime.IsPaused(OWTime.PauseType.Initializing)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(350f + num, 55f, 50f, 40f), "STRM\n" + ((!OWTime.IsPaused(OWTime.PauseType.Streaming)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(400f + num, 55f, 50f, 40f), "SYS\n" + ((!OWTime.IsPaused(OWTime.PauseType.System)) ? "FALSE" : "TRUE "));
+ GUI.Label(new Rect(10f + num, 85f, 200f, 20f), "Input Mode: " + OWInput.GetInputMode().ToString());
+ this._inputModeArray = OWInput.GetInputModeStack();
+ GUI.Label(new Rect(10f + num, 100f, 200f, 20f), "Input Mode Stack: ");
+ int num2 = 150;
+ int num3 = 0;
+ while (num3 < this._inputModeArray.Length && this._inputModeArray[num3] != InputMode.None)
+ {
+ GUI.Label(new Rect((float)num2 + num, 100f, 200f, 20f), this._inputModeArray[num3].ToString());
+ num2 += 75;
+ num3++;
+ }
+ GUI.Label(new Rect(10f + num, 115f, 300f, 20f), "Net Force Accel: " + Mathf.Round(this._playerForceDetector.GetForceAcceleration().magnitude * 100f) / 100f);
+ GUI.Label(new Rect(210f + num, 115f, 300f, 20f), "G-Force: " + Mathf.Round(this._gForce * 100f) / 100f);
+ GUI.Label(new Rect(10f + num, 130f, 200f, 20f), "Load Time: " + LoadTimeTracker.GetLatestLoadTime());
+ if (DynamicResolutionManager.isEnabled)
+ {
+ GUI.Label(new Rect(10f + num, 145f, 200f, 20f), "Resolution Scale: " + DynamicResolutionManager.currentResolutionScale);
+ }
+ GUI.Label(new Rect(10f + num, 160f, 200f, 20f), "Player Speed: " + (Locator.GetCenterOfTheUniverse().GetOffsetVelocity() + Locator.GetPlayerBody().GetVelocity()).magnitude.ToString());
+ GUI.Label(new Rect(210f + num, 160f, 200f, 20f), "Player Accel: " + Locator.GetPlayerBody().GetAcceleration().magnitude.ToString());
+ if (Locator.GetPlayerSuit().GetComponent())
+ {
+ GUI.Label(new Rect(10f + num, 175f, 200f, 20f), string.Concat(new object[]
+ {
+ "Jetpack Max Accel: ",
+ Locator.GetPlayerSuit().GetComponent().GetMaxTranslationalThrust().ToString(),
+ "/",
+ Locator.GetPlayerSuit().GetComponent().GetBoostMaxThrust().ToString()
+ }));
+ }
+ if (Locator.GetShipBody().GetComponent())
+ {
+ GUI.Label(new Rect(210f + num, 175f, 200f, 20f), "Ship Max Accel: " + Locator.GetShipBody().GetComponent().GetMaxTranslationalThrust().ToString());
+ }
+ GUI.Label(new Rect(10f + num, 190f, 400f, 20f), string.Concat(new object[]
+ {
+ "Inspector layer: ",
+ rayMask,
+ " ",
+ LayerMask.LayerToName(rayMask)
+ }));
+ if (GetWarpOWRigidbody())
+ {
+ GUI.Label(new Rect(10f + num, 205f, 400f, 20f), string.Concat(new string[]
+ {
+ "Warp Body: ",
+ GetWarpOWRigidbody().gameObject.name,
+ " layer: ",
+ GetWarpOWRigidbody().gameObject.layer.ToString(),
+ " ",
+ LayerMask.LayerToName(GetWarpOWRigidbody().gameObject.layer)
+ }));
+ }
+ if (hit.collider)
+ {
+ GUI.Label(new Rect(10f + num, 220f, 400f, 20f), string.Concat(new string[]
+ {
+ "Latest hit layer: ",
+ hit.collider.gameObject.layer.ToString(),
+ " ",
+ LayerMask.LayerToName(hit.collider.gameObject.layer)
+ }));
+ GUI.Label(new Rect(10f + num, 235f, 600f, 20f), "Name: " + hit.collider.gameObject.name + " Distance: " + (hit.point - Locator.GetPlayerBody().transform.position).magnitude.ToString());
+ }
+ /*if (PadEZ.PadManager.GetActiveController()!=null)
{
GUI.Label(new Rect(10f + num, 250f, 600f, 20f), PadEZ.PadManager.GetActiveController().GetIndex().ToString() + " " + PadEZ.PadManager.GetActiveController().GetPadType().ToString() +" "+ UnityEngine.Input.GetJoystickNames()[PadEZ.PadManager.GetActiveController().GetIndex()]);
}*/
- }
- if (DebugInput.inputHUD == 2)
- {
- GUI.Label(new Rect(10f, 10f, 300f, 2500f), ReadInputManager.ReadCommandInputs(false));
- }
- if (DebugInput.inputHUD == 3)
- {
- GUI.Label(new Rect(0f, 0f, 300f, 2500f), ReadInputManager.ReadCommandInputs(false));
- GUI.Label(new Rect(300f, 0f, 300f, 2500f), ReadInputManager.ReadCommandInputs(true));
- }
- if (DebugInput.inputHUD == 4)
- {
- GUI.Label(new Rect(0f, 0f, 500f, 2500f), ReadInputManager.ReadInputAxes());
- GUI.Label(new Rect(500f, 0f, 500f, 2500f), ReadInputManager.ReadRawInputManagerButtons());
- }
- }
+ }
+ if (inputHUD == 2)
+ {
+ GUI.Label(new Rect(10f, 10f, 300f, 2500f), ReadInputManager.ReadCommandInputs(false));
+ }
+ if (inputHUD == 3)
+ {
+ GUI.Label(new Rect(0f, 0f, 300f, 2500f), ReadInputManager.ReadCommandInputs(false));
+ GUI.Label(new Rect(300f, 0f, 300f, 2500f), ReadInputManager.ReadCommandInputs(true));
+ }
+ if (inputHUD == 4)
+ {
+ GUI.Label(new Rect(0f, 0f, 500f, 2500f), ReadInputManager.ReadInputAxes());
+ GUI.Label(new Rect(500f, 0f, 500f, 2500f), ReadInputManager.ReadRawInputManagerButtons());
+ }
+ }
- private ForceDetector _playerForceDetector;
- private PlayerCharacterController _playerController;
- private InputMode[] _inputModeArray;
- private MeshRenderer[] _thrusterArrowRenderers;
- private float _gForce;
+ private ForceDetector _playerForceDetector;
+ private PlayerCharacterController _playerController;
+ private InputMode[] _inputModeArray;
+ private MeshRenderer[] _thrusterArrowRenderers;
+ private float _gForce;
+ private PlayerSpacesuit playersuit;
- private void FixedUpdate()
- {
- if (this._gotoWarpPointNextFrame)
- {
- this._gotoWarpPointNextFrame = false;
- Locator.GetPlayerBody().MoveToRelativeLocation(DebugInput._relativeData[DebugInput.relIndex], DebugInput._relativeBody[DebugInput.relIndex], null);
- }
- if (this._engageLudicrousSpeed)
- {
- this._engageLudicrousSpeed = false;
- Locator.GetShipBody().AddVelocityChange(Locator.GetShipBody().transform.forward * this.ludicrousMult * 25000f);
- }
- }
+ private void FixedUpdate()
+ {
+ if (this._gotoWarpPointNextFrame)
+ {
+ this._gotoWarpPointNextFrame = false;
+ Locator.GetPlayerBody().MoveToRelativeLocation(_relativeData[relIndex], _relativeBody[relIndex], null);
+ }
+ if (this._engageLudicrousSpeed)
+ {
+ this._engageLudicrousSpeed = false;
+ Locator.GetShipBody().AddVelocityChange(Locator.GetShipBody().transform.forward * this.ludicrousMult * 25000f);
+ }
+ }
- private void Update()
- {
- this.shiftPressed = global::Input.GetKey(KeyCode.LeftShift) || global::Input.GetKey(KeyCode.RightShift);
- this.ctrlPressed = global::Input.GetKey(KeyCode.LeftControl) || global::Input.GetKey(KeyCode.RightControl);
- this.altPressed = global::Input.GetKey(KeyCode.LeftAlt) || global::Input.GetKey(KeyCode.RightAlt);
- if (global::Input.GetKeyDown(KeyCode.BackQuote))
- {
- DebugInput.cheatsOn = !DebugInput.cheatsOn;
- if (DebugInput.cheatsOn)
- AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.NomaiPowerOn)[0], Locator.GetActiveCamera().transform.position);
- else
- AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.NomaiPowerOff)[0], Locator.GetActiveCamera().transform.position);
- }
+ private void Update()
+ {
+ this.shiftPressed = global::Input.GetKey(KeyCode.LeftShift) || global::Input.GetKey(KeyCode.RightShift);
+ this.ctrlPressed = global::Input.GetKey(KeyCode.LeftControl) || global::Input.GetKey(KeyCode.RightControl);
+ this.altPressed = global::Input.GetKey(KeyCode.LeftAlt) || global::Input.GetKey(KeyCode.RightAlt);
+ if (global::Input.GetKeyDown(KeyCode.BackQuote))
+ {
+ cheatsOn = !cheatsOn;
+ if (cheatsOn)
+ AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.NomaiPowerOn)[0], Locator.GetActiveCamera().transform.position);
+ else
+ AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.NomaiPowerOff)[0], Locator.GetActiveCamera().transform.position);
+ }
- if (playersuit == null)
- playersuit = Locator.GetPlayerSuit();
- if (playersuit == null)
- return;
- if (!playersuit.enabled)
- playersuit = Locator.GetPlayerSuit();
- if (playersuit == null || !playersuit.enabled)
- return;
- if (DebugInput.cheatsOn)
- {
- if (global::Input.GetKeyDown(KeyCode.PageDown))
- {
- if (this.shiftPressed || this.ctrlPressed)
- {
- if (Locator.GetProbe().GetAnchor().IsAnchored())
- {
- Transform transform = Locator.GetProbe().transform;
- DebugInput._relativeBody[DebugInput.relIndex] = transform.parent.GetAttachedOWRigidbody(false);
- DebugInput._relativeData[DebugInput.relIndex] = new RelativeLocationData(Locator.GetProbe().GetAnchor().GetAttachedOWRigidbody(), DebugInput._relativeBody[DebugInput.relIndex], null);
- this.COn = true;
- }
- }
- else if (this.altPressed)
- {
- OWCamera activeCamera = Locator.GetActiveCamera();
- Vector3 position = new Vector3((float)(activeCamera.pixelWidth - 1) / 2f, (float)(activeCamera.pixelHeight - 1) / 2f);
- if (!Physics.Raycast(activeCamera.ScreenPointToRay(position), out DebugInput.hit, float.PositiveInfinity, OWLayerMask.BuildPhysicalMask().value))
- {
- foreach (RaycastHit raycastHit in Physics.RaycastAll(activeCamera.ScreenPointToRay(position), float.PositiveInfinity, OWLayerMask.BuildPhysicalMask().value | 524288))
- {
- DebugInput.hit = raycastHit;
- if (raycastHit.collider.GetAttachedOWRigidbody(false))
- {
- break;
- }
- }
- if (!DebugInput.hit.collider.GetAttachedOWRigidbody(false))
- {
- foreach (RaycastHit raycastHit2 in Physics.RaycastAll(activeCamera.ScreenPointToRay(position)))
- {
- DebugInput.hit = raycastHit2;
- if (raycastHit2.collider.GetAttachedOWRigidbody(false))
- {
- break;
- }
- }
- }
- }
- if (DebugInput.hit.collider.GetAttachedOWRigidbody(false))
- {
- DebugInput._hasSetWarpPoint[DebugInput.relIndex] = true;
- DebugInput._relativeBody[DebugInput.relIndex] = DebugInput.hit.rigidbody.GetAttachedOWRigidbody(false);
- DebugInput._relativeData[DebugInput.relIndex] = relconstr(DebugInput.hit.point, Quaternion.FromToRotation(Locator.GetPlayerBody().transform.up, DebugInput.hit.normal) * Locator.GetPlayerBody().transform.rotation, DebugInput._relativeBody[DebugInput.relIndex].GetPointVelocity(DebugInput.hit.point), DebugInput._relativeBody[DebugInput.relIndex], null);
- this.COn = true;
- }
- }
- else if (Locator.GetPlayerSectorDetector().GetLastEnteredSector() != null)
- {
- DebugInput._hasSetWarpPoint[DebugInput.relIndex] = true;
- DebugInput._relativeBody[DebugInput.relIndex] = Locator.GetPlayerSectorDetector().GetLastEnteredSector().GetOWRigidbody();
- DebugInput._relativeData[DebugInput.relIndex] = new RelativeLocationData(Locator.GetPlayerBody(), DebugInput._relativeBody[DebugInput.relIndex], null);
- this.COn = true;
- }
- }
- if (global::Input.GetKeyDown(KeyCode.Home))
- {
- if (this.altPressed)
- {
- DebugInput.rayMask++;
- DebugInput.rayMask %= 32;
- }
- else
- {
- OWCamera activeCamera2 = Locator.GetActiveCamera();
- Vector3 position2 = new Vector3((float)(activeCamera2.pixelWidth - 1) / 2f, (float)(activeCamera2.pixelHeight - 1) / 2f);
- if (!Physics.Raycast(activeCamera2.ScreenPointToRay(position2), out DebugInput.hit, float.PositiveInfinity, 1 << DebugInput.rayMask) && DebugInput.hit.collider.GetAttachedOWRigidbody(false))
- {
- DebugInput._hasSetWarpPoint[DebugInput.relIndex] = true;
- DebugInput._relativeBody[DebugInput.relIndex] = DebugInput.hit.rigidbody.GetAttachedOWRigidbody(false);
- DebugInput._relativeData[DebugInput.relIndex] = relconstr(DebugInput.hit.point, Quaternion.FromToRotation(Locator.GetPlayerBody().transform.up, DebugInput.hit.normal) * Locator.GetPlayerBody().transform.rotation, DebugInput._relativeBody[DebugInput.relIndex].GetPointVelocity(DebugInput.hit.point), DebugInput._relativeBody[DebugInput.relIndex], null);
- this.COn = true;
- }
- }
- }
- if (global::Input.GetKeyDown(KeyCode.PageUp))
- {
- if (this.altPressed)
- {
- this.COn = true;
- DebugInput.relIndex++;
- DebugInput.relIndex %= 10;
- }
- else if (DebugInput._hasSetWarpPoint[DebugInput.relIndex])
- {
- this.COn = true;
- this._gotoWarpPointNextFrame = true;
- }
- }
- /*if (global::Input.GetKeyDown(DebugKeyCode.destroyTimeline))
+ if (playersuit == null)
+ playersuit = Locator.GetPlayerSuit();
+ if (playersuit == null)
+ return;
+ if (!playersuit.enabled)
+ playersuit = Locator.GetPlayerSuit();
+ if (playersuit == null || !playersuit.enabled)
+ return;
+ if (cheatsOn)
+ {
+ /*if (global::Input.GetKeyDown(DebugKeyCode.destroyTimeline))
{
Debug.Log("Try DestroyTimeline (Requires NomaiExperimentBlackHole)");
GlobalMessenger.FireEvent("DebugTimelineDestroyed");
@@ -317,389 +257,439 @@ private void Update()
{
Locator.GetPlayerTransform().GetComponent().SetDebugKillResources(false);
}*/
- if (global::Input.GetKeyDown(KeyCode.G))
- {
- if (this.altPressed)
- {
- if (PlayerData.IsLoaded())
- {
- PlayerData.LearnLaunchCodes();
- this.COn = true;
- }
- }
- else if (!Locator.GetPlayerSuit().IsWearingSuit(true))
- {
- Locator.GetPlayerSuit().SuitUp(false, false);
- this.COn = true;
- }
- else
- {
- Locator.GetPlayerSuit().RemoveSuit(false);
- this.COff = true;
- }
- }
- if (global::Input.GetKeyDown(KeyCode.H))
- {
- if (this.altPressed)
- {
- DebugInput.hiddenHUD = !DebugInput.hiddenHUD;
- if (DebugInput.hiddenHUD)
- {
- oldmode = (int)typeof(GUIMode).GetAnyField("_renderMode").GetValue(null);
- typeof(GUIMode).GetAnyField("_renderMode").SetValue(null, 7);
- this.COn = true;
- }
- else
- {
- typeof(GUIMode).GetAnyField("_renderMode").SetValue(null, oldmode);
- this.COff = true;
- }
- GlobalMessenger.FireEvent("OnChangeGUIMode");
- }
- else if (Locator.GetPlayerSuit() && Locator.GetPlayerSuit().IsWearingSuit(true))
- {
- if (Locator.GetPlayerSuit().IsWearingHelmet())
- {
- Locator.GetPlayerSuit().RemoveHelmet();
- this.COff = true;
- }
- else
- {
- Locator.GetPlayerSuit().PutOnHelmet();
- this.COn = true;
- }
- }
- }
- if (global::Input.GetKeyDown(KeyCode.J))
- {
- if (this.altPressed && Locator.GetShipTransform())
- {
- if (this.shiftPressed)
- {
- if (Locator.GetShipTransform())
- {
- UnityEngine.Object.Destroy(Locator.GetShipTransform().gameObject);
- this.COn = true;
- }
- }
- else
- {
- ShipComponent[] componentsInChildren = Locator.GetShipTransform().GetComponentsInChildren();
- for (int k = 0; k < componentsInChildren.Length; k++)
- {
- componentsInChildren[k].SetDamaged(true);
- }
- this.COn = true;
- }
- }
- else
- {
- Locator.GetPlayerTransform().GetComponent().DebugRefillResources();
- if (Locator.GetShipTransform())
- {
- ShipComponent[] componentsInChildren2 = Locator.GetShipTransform().GetComponentsInChildren();
- for (int l = 0; l < componentsInChildren2.Length; l++)
- {
- componentsInChildren2[l].SetDamaged(false);
- }
- }
- this.COn = true;
- }
- }
- if (global::Input.GetKeyDown(KeyCode.L))
- {
- if (this.shiftPressed)
- {
- this.ludicrousMult *= 2f;
- this.COn = true;
- }
- else if (this.altPressed)
- {
- this.ludicrousMult /= 2f;
- this.COff = true;
- }
- else
- {
- this._engageLudicrousSpeed = true;
- AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.ToolProbeLaunch)[0], Locator.GetPlayerBody().transform.position);
- }
- }
- if (global::Input.GetKeyDown(KeyCode.P))
- {
- if (this.altPressed)
- {
- if (Locator.GetPlayerSuit().GetComponent())
- {
- if (!this.wasBoosted)
- {
- this.jetpackStanard = Locator.GetPlayerSuit().GetComponent().GetMaxTranslationalThrust();
- Locator.GetPlayerSuit().GetComponent().TAIcheat_SetTranslationalThrust(50f);
- }
- else
- {
- Locator.GetPlayerSuit().GetComponent().TAIcheat_SetTranslationalThrust(this.jetpackStanard);
- }
- this.wasBoosted = !this.wasBoosted;
- if (this.wasBoosted)
- {
- this.COn = true;
- }
- else
- {
- this.COff = true;
- }
- }
- }
- else
- {
- Locator.GetPlayerTransform().GetComponent().ToggleInvincibility();
- Locator.GetDeathManager().ToggleInvincibility();
- Transform shipTransform = Locator.GetShipTransform();
- if (shipTransform)
- {
- shipTransform.GetComponentInChildren().ToggleInvincibility();
- invincible = !invincible;
- }
- if (invincible)
- {
- this.COn = true;
- }
- else
- {
- this.COff = true;
- }
- }
- }
- if (global::Input.GetKeyDown(KeyCode.O))
- {
- if (this.altPressed)
- {
- if (PlayerData.KnowsMultipleFrequencies())
- {
- PlayerData.ForgetFrequency(SignalFrequency.Quantum);
- PlayerData.ForgetFrequency(SignalFrequency.EscapePod);
- PlayerData.ForgetFrequency(SignalFrequency.Statue);
- PlayerData.ForgetFrequency(SignalFrequency.WarpCore);
- PlayerData.ForgetFrequency(SignalFrequency.HideAndSeek);
- this.COff = true;
- }
- else
- {
- this.COn = true;
- for (int m = 10; m < 16; m++)
- {
- PlayerData.LearnSignal((SignalName)m);
- }
- PlayerData.LearnFrequency(SignalFrequency.Quantum);
- for (int n = 20; n < 26; n++)
- {
- PlayerData.LearnSignal((SignalName)n);
- }
- PlayerData.LearnFrequency(SignalFrequency.EscapePod);
- for (int num = 30; num < 33; num++)
- {
- PlayerData.LearnSignal((SignalName)num);
- }
- PlayerData.LearnFrequency(SignalFrequency.Statue);
- PlayerData.LearnFrequency(SignalFrequency.WarpCore);
- for (int num2 = 40; num2 < 50; num2++)
- {
- PlayerData.LearnSignal((SignalName)num2);
- }
- PlayerData.LearnFrequency(SignalFrequency.HideAndSeek);
- for (int num3 = 60; num3 < 63; num3++)
- {
- PlayerData.LearnSignal((SignalName)num3);
- }
- }
- }
- else
- {
- Locator.GetShipLogManager().RevealAllFacts(this._revealRumorsOnly);
- this._revealRumorsOnly = false;
- this.COn = true;
- }
- }
- if (global::Input.GetKeyDown(KeyCode.Backslash))
- {
- DebugInput.inputHUD++;
- DebugInput.inputHUD %= 5;
- }
- if (global::Input.GetKeyDown(KeyCode.N))
- {
- if (this.altPressed)
- {
- if (Locator.GetPlayerBody().GetRequiredComponent().detectCollisions)
- {
- Locator.GetPlayerBody().DisableCollisionDetection();
- this.COn = true;
- }
- else
- {
- Locator.GetPlayerBody().EnableCollisionDetection();
- this.COff = true;
- }
- }
- else
- {
- foreach (Collider collider in Locator.GetPlayerBody().GetComponentsInChildren())
- {
- if (!collider.isTrigger)
- {
- collider.enabled = !collider.enabled;
- if (collider.enabled)
- {
- this.COff = true;
- }
- else
- {
- this.COn = true;
- }
- }
- }
- }
- }
- if (global::Input.GetKeyDown(KeyCode.M))
- {
- if (this.altPressed)
- {
- if (Locator.GetShipBody().GetRequiredComponent().detectCollisions)
- {
- Locator.GetShipBody().DisableCollisionDetection();
- this.COn = true;
- }
- else
- {
- Locator.GetShipBody().EnableCollisionDetection();
- this.COff = true;
- }
- }
- else
- {
- foreach (Collider collider2 in Locator.GetShipTransform().GetComponentsInChildren())
- {
- if (!collider2.isTrigger)
- {
- collider2.enabled = !collider2.enabled;
- if (collider2.enabled)
- {
- this.COff = true;
- }
- else
- {
- this.COn = true;
- }
- }
- }
- }
- }
- if (global::Input.GetKeyDown(KeyCode.K))
- {
- foreach (AnglerfishController anglerfishController in UnityEngine.Object.FindObjectsOfType())
- {
- if (this.altPressed)
- {
- anglerfishController.gameObject.SetActive(!anglerfishController.gameObject.activeInHierarchy);
- if (anglerfishController.gameObject.activeInHierarchy)
- {
- this.COff = true;
- }
- else
- {
- this.COn = true;
- }
- }
- else
- {
- anglerfishController.enabled = !anglerfishController.enabled;
- if (anglerfishController.enabled)
- {
- this.COff = true;
- }
- else
- {
- this.COn = true;
- }
- }
- }
- }
- }
- if (global::Input.GetKeyDown(KeyCode.Delete))
- {
- if (this.altPressed)
- {
- this.COn = true;
- FragmentIntegrity[] array2 = UnityEngine.Object.FindObjectsOfType();
- for (int j = 0; j < array2.Length; j++)
- {
- array2[j].AddDamage(10000f);
- }
- }
- else
- {
- this.COn = true;
- GlobalMessenger.FireEvent("TriggerSupernova");
- }
- }
- if (global::Input.GetKey(KeyCode.E) && global::Input.GetKey(KeyCode.U))
- {
- if (PlayerData.GetWarpedToTheEye()) PlayerData.SaveEyeCompletion();
- else GlobalMessenger.FireEvent("DebugWarpVessel");
- this.COn = true;
- }
- if (global::Input.GetKeyDown(DebugKeyCode.timeLapse))
- {
- Time.timeScale = 10f;
- }
- else if (global::Input.GetKeyUp(DebugKeyCode.timeLapse))
- {
- Time.timeScale = 1f;
- }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Save probe's pos"]))
+ {
+ if (Locator.GetProbe().GetAnchor().IsAnchored())
+ {
+ Transform transform = Locator.GetProbe().transform;
+ _relativeBody[relIndex] = transform.parent.GetAttachedOWRigidbody(false);
+ _relativeData[relIndex] = new RelativeLocationData(Locator.GetProbe().GetAnchor().GetAttachedOWRigidbody(), _relativeBody[relIndex], null);
+ this.COn = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Save RayCast pos"]))
+ {
+ OWCamera activeCamera = Locator.GetActiveCamera();
+ Vector3 position = new Vector3((float)(activeCamera.pixelWidth - 1) / 2f, (float)(activeCamera.pixelHeight - 1) / 2f);
+ if (!Physics.Raycast(activeCamera.ScreenPointToRay(position), out hit, float.PositiveInfinity, OWLayerMask.BuildPhysicalMask().value))
+ {
+ foreach (RaycastHit raycastHit in Physics.RaycastAll(activeCamera.ScreenPointToRay(position), float.PositiveInfinity, OWLayerMask.BuildPhysicalMask().value | 524288))
+ {
+ hit = raycastHit;
+ if (raycastHit.collider.GetAttachedOWRigidbody(false))
+ {
+ break;
+ }
+ }
+ if (!hit.collider.GetAttachedOWRigidbody(false))
+ {
+ foreach (RaycastHit raycastHit2 in Physics.RaycastAll(activeCamera.ScreenPointToRay(position)))
+ {
+ hit = raycastHit2;
+ if (raycastHit2.collider.GetAttachedOWRigidbody(false))
+ {
+ break;
+ }
+ }
+ }
+ }
+ if (hit.collider.GetAttachedOWRigidbody(false))
+ {
+ _hasSetWarpPoint[relIndex] = true;
+ _relativeBody[relIndex] = hit.rigidbody.GetAttachedOWRigidbody(false);
+ _relativeData[relIndex] = relconstr(hit.point, Quaternion.FromToRotation(Locator.GetPlayerBody().transform.up, hit.normal) * Locator.GetPlayerBody().transform.rotation, _relativeBody[relIndex].GetPointVelocity(hit.point), _relativeBody[relIndex], null);
+ this.COn = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Save player's pos"]) && Locator.GetPlayerSectorDetector().GetLastEnteredSector() != null)
+ {
+ _hasSetWarpPoint[relIndex] = true;
+ _relativeBody[relIndex] = Locator.GetPlayerSectorDetector().GetLastEnteredSector().GetOWRigidbody();
+ _relativeData[relIndex] = new RelativeLocationData(Locator.GetPlayerBody(), _relativeBody[relIndex], null);
+ this.COn = true;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(insp) Cycle through layers"]))
+ {
+ rayMask++;
+ rayMask %= 32;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(insp) RayCast"]))
+ {
+ OWCamera activeCamera2 = Locator.GetActiveCamera();
+ Vector3 position2 = new Vector3((float)(activeCamera2.pixelWidth - 1) / 2f, (float)(activeCamera2.pixelHeight - 1) / 2f);
+ if (!Physics.Raycast(activeCamera2.ScreenPointToRay(position2), out hit, float.PositiveInfinity, 1 << rayMask) && hit.collider.GetAttachedOWRigidbody(false))
+ {
+ _hasSetWarpPoint[relIndex] = true;
+ _relativeBody[relIndex] = hit.rigidbody.GetAttachedOWRigidbody(false);
+ _relativeData[relIndex] = relconstr(hit.point, Quaternion.FromToRotation(Locator.GetPlayerBody().transform.up, hit.normal) * Locator.GetPlayerBody().transform.rotation, _relativeBody[relIndex].GetPointVelocity(hit.point), _relativeBody[relIndex], null);
+ this.COn = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Cycle through pos"]))
+ {
+ this.COn = true;
+ relIndex++;
+ relIndex %= 10;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Tele to saved pos"]) && _hasSetWarpPoint[relIndex])
+ {
+ this.COn = true;
+ this._gotoWarpPointNextFrame = true;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Learn launchcode"]))
+ {
+ if (PlayerData.IsLoaded())
+ {
+ PlayerData.LearnLaunchCodes();
+ this.COn = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle spacesuit"]))
+ {
+ if (!Locator.GetPlayerSuit().IsWearingSuit(true))
+ {
+ Locator.GetPlayerSuit().SuitUp(false, false);
+ this.COn = true;
+ }
+ else
+ {
+ Locator.GetPlayerSuit().RemoveSuit(false);
+ this.COff = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle HUD"]))
+ {
+ hiddenHUD = !hiddenHUD;
+ if (hiddenHUD)
+ {
+ oldmode = (int)typeof(GUIMode).GetAnyField("_renderMode").GetValue(null);
+ typeof(GUIMode).GetAnyField("_renderMode").SetValue(null, 7);
+ this.COn = true;
+ }
+ else
+ {
+ typeof(GUIMode).GetAnyField("_renderMode").SetValue(null, oldmode);
+ this.COff = true;
+ }
+ GlobalMessenger.FireEvent("OnChangeGUIMode");
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle helmet"]) && Locator.GetPlayerSuit() && Locator.GetPlayerSuit().IsWearingSuit(true))
+ {
+ if (Locator.GetPlayerSuit().IsWearingHelmet())
+ {
+ Locator.GetPlayerSuit().RemoveHelmet();
+ this.COff = true;
+ }
+ else
+ {
+ Locator.GetPlayerSuit().PutOnHelmet();
+ this.COn = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Destroy ship"]) && Locator.GetShipTransform())
+ {
+ UnityEngine.Object.Destroy(Locator.GetShipTransform().gameObject);
+ this.COn = true;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Damage ship"]) && Locator.GetShipTransform())
+ {
+ ShipComponent[] componentsInChildren = Locator.GetShipTransform().GetComponentsInChildren();
+ for (int k = 0; k < componentsInChildren.Length; k++)
+ {
+ componentsInChildren[k].SetDamaged(true);
+ }
+ this.COn = true;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Fuel+heal"]))
+ {
+ Locator.GetPlayerTransform().GetComponent().DebugRefillResources();
+ if (Locator.GetShipTransform())
+ {
+ ShipComponent[] componentsInChildren2 = Locator.GetShipTransform().GetComponentsInChildren();
+ for (int l = 0; l < componentsInChildren2.Length; l++)
+ {
+ componentsInChildren2[l].SetDamaged(false);
+ }
+ }
+ this.COn = true;
+ }
+ if (ModHelper.Input.IsPressed(inputs["Increase Ludicrous Speed"]))
+ {
+ this.ludicrousMult *= 2f;
+ this.COn = true;
+ }
+ if (ModHelper.Input.IsPressed(inputs["Decrease Ludicrous Speed"]))
+ {
+ this.ludicrousMult /= 2f;
+ this.COff = true;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Engage Ludicrous Speed"]))
+ {
+ this._engageLudicrousSpeed = true;
+ AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.ToolProbeLaunch)[0], Locator.GetPlayerBody().transform.position);
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle superjetpack"]) && Locator.GetPlayerSuit().GetComponent())
+ {
+ if (!this.wasBoosted)
+ {
+ this.jetpackStanard = Locator.GetPlayerSuit().GetComponent().GetMaxTranslationalThrust();
+ Locator.GetPlayerSuit().GetComponent().TAIcheat_SetTranslationalThrust(50f);
+ }
+ else
+ {
+ Locator.GetPlayerSuit().GetComponent().TAIcheat_SetTranslationalThrust(this.jetpackStanard);
+ }
+ this.wasBoosted = !this.wasBoosted;
+ if (this.wasBoosted)
+ {
+ this.COn = true;
+ }
+ else
+ {
+ this.COff = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle PowerOverwhelming"]))
+ {
+ Locator.GetPlayerTransform().GetComponent().ToggleInvincibility();
+ Locator.GetDeathManager().ToggleInvincibility();
+ Transform shipTransform = Locator.GetShipTransform();
+ if (shipTransform)
+ {
+ shipTransform.GetComponentInChildren().ToggleInvincibility();
+ invincible = !invincible;
+ }
+ if (invincible)
+ {
+ this.COn = true;
+ }
+ else
+ {
+ this.COff = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Learn all frequencies"]))
+ {
+ if (PlayerData.KnowsMultipleFrequencies())
+ {
+ PlayerData.ForgetFrequency(SignalFrequency.Quantum);
+ PlayerData.ForgetFrequency(SignalFrequency.EscapePod);
+ PlayerData.ForgetFrequency(SignalFrequency.Statue);
+ PlayerData.ForgetFrequency(SignalFrequency.WarpCore);
+ PlayerData.ForgetFrequency(SignalFrequency.HideAndSeek);
+ this.COff = true;
+ }
+ else
+ {
+ this.COn = true;
+ for (int m = 10; m < 16; m++)
+ {
+ PlayerData.LearnSignal((SignalName)m);
+ }
+ PlayerData.LearnFrequency(SignalFrequency.Quantum);
+ for (int n = 20; n < 26; n++)
+ {
+ PlayerData.LearnSignal((SignalName)n);
+ }
+ PlayerData.LearnFrequency(SignalFrequency.EscapePod);
+ for (int num = 30; num < 33; num++)
+ {
+ PlayerData.LearnSignal((SignalName)num);
+ }
+ PlayerData.LearnFrequency(SignalFrequency.Statue);
+ PlayerData.LearnFrequency(SignalFrequency.WarpCore);
+ for (int num2 = 40; num2 < 50; num2++)
+ {
+ PlayerData.LearnSignal((SignalName)num2);
+ }
+ PlayerData.LearnFrequency(SignalFrequency.HideAndSeek);
+ for (int num3 = 60; num3 < 63; num3++)
+ {
+ PlayerData.LearnSignal((SignalName)num3);
+ }
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Reveal all facts"]))
+ {
+ Locator.GetShipLogManager().RevealAllFacts(this._revealRumorsOnly);
+ this._revealRumorsOnly = false;
+ this.COn = true;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Cycle DebugHUD"]))
+ {
+ inputHUD++;
+ inputHUD %= 5;
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle player collision extra"]))
+ {
+ if (Locator.GetPlayerBody().GetRequiredComponent().detectCollisions)
+ {
+ Locator.GetPlayerBody().DisableCollisionDetection();
+ this.COn = true;
+ }
+ else
+ {
+ Locator.GetPlayerBody().EnableCollisionDetection();
+ this.COff = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle player collision"]))
+ {
+ foreach (Collider collider in Locator.GetPlayerBody().GetComponentsInChildren())
+ {
+ if (!collider.isTrigger)
+ {
+ collider.enabled = !collider.enabled;
+ if (collider.enabled)
+ {
+ this.COff = true;
+ }
+ else
+ {
+ this.COn = true;
+ }
+ }
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle ship collision extra"]))
+ {
+ if (Locator.GetShipBody().GetRequiredComponent().detectCollisions)
+ {
+ Locator.GetShipBody().DisableCollisionDetection();
+ this.COn = true;
+ }
+ else
+ {
+ Locator.GetShipBody().EnableCollisionDetection();
+ this.COff = true;
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle ship collision"]))
+ {
+ foreach (Collider collider2 in Locator.GetShipTransform().GetComponentsInChildren())
+ {
+ if (!collider2.isTrigger)
+ {
+ collider2.enabled = !collider2.enabled;
+ if (collider2.enabled)
+ {
+ this.COff = true;
+ }
+ else
+ {
+ this.COn = true;
+ }
+ }
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Disable nearby Anglerfishes"]))
+ {
+ foreach (AnglerfishController anglerfishController in UnityEngine.Object.FindObjectsOfType())
+ {
+ anglerfishController.gameObject.SetActive(!anglerfishController.gameObject.activeInHierarchy);
+ if (anglerfishController.gameObject.activeInHierarchy)
+ {
+ this.COff = true;
+ }
+ else
+ {
+ this.COn = true;
+ }
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Toggle nearby Anglerfishes AI"]))
+ {
+
+ foreach (AnglerfishController anglerfishController in UnityEngine.Object.FindObjectsOfType())
+ {
+ anglerfishController.enabled = !anglerfishController.enabled;
+ if (anglerfishController.enabled)
+ {
+ this.COff = true;
+ }
+ else
+ {
+ this.COn = true;
+ }
+ }
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Break all BH fragments"]))
+ {
+ this.COn = true;
+ FragmentIntegrity[] array2 = UnityEngine.Object.FindObjectsOfType();
+ for (int j = 0; j < array2.Length; j++)
+ {
+ array2[j].AddDamage(10000f);
+ }
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Trigger Supernova"]))
+ {
+ this.COn = true;
+ GlobalMessenger.FireEvent("TriggerSupernova");
+ }
+ if (ModHelper.Input.IsNewlyPressed(inputs["Debug Vessel Warp"]))
+ {
+ if (PlayerData.GetWarpedToTheEye()) PlayerData.SaveEyeCompletion();
+ else GlobalMessenger.FireEvent("DebugWarpVessel");
+ this.COn = true;
+ }
+ if (Mathf.Abs(Time.timeScale - 1f) < 1e-4 || Mathf.Abs(Time.timeScale - 10f) < 1e-4)
+ {
+ if (ModHelper.Input.IsNewlyPressed(inputs["Timelapse"]))
+ {
+ Time.timeScale = 10f;
+ }
+ else if (Mathf.Abs(Time.timeScale - 1f) > 1e-4 && !ModHelper.Input.IsPressed(inputs["Timelapse"]))
+ {
+ Time.timeScale = 1f;
+ }
+ }
- if (this.COn)
- {
- AudioClip[] audioClipArray = Locator.GetAudioManager().GetAudioClipArray(global::AudioType.Menu_Confirm);
- AudioSource.PlayClipAtPoint(audioClipArray[UnityEngine.Random.Range(0, audioClipArray.Length)], Locator.GetActiveCamera().transform.position);
- this.COn = false;
- }
- if (this.COff)
- {
- AudioClip[] audioClipArray2 = Locator.GetAudioManager().GetAudioClipArray(global::AudioType.Menu_Cancel);
- AudioSource.PlayClipAtPoint(audioClipArray2[UnityEngine.Random.Range(0, audioClipArray2.Length)], Locator.GetActiveCamera().transform.position);
- this.COff = false;
- }
- }
+ if (this.COn)
+ {
+ AudioClip[] audioClipArray = Locator.GetAudioManager().GetAudioClipArray(global::AudioType.Menu_Confirm);
+ AudioSource.PlayClipAtPoint(audioClipArray[UnityEngine.Random.Range(0, audioClipArray.Length)], Locator.GetActiveCamera().transform.position);
+ this.COn = false;
+ }
+ if (this.COff)
+ {
+ AudioClip[] audioClipArray2 = Locator.GetAudioManager().GetAudioClipArray(global::AudioType.Menu_Cancel);
+ AudioSource.PlayClipAtPoint(audioClipArray2[UnityEngine.Random.Range(0, audioClipArray2.Length)], Locator.GetActiveCamera().transform.position);
+ this.COff = false;
+ }
+ }
- public static OWRigidbody GetWarpOWRigidbody()
- {
- return DebugInput._relativeBody[DebugInput.relIndex];
- }
+ public OWRigidbody GetWarpOWRigidbody()
+ {
+ return _relativeBody[relIndex];
+ }
- private bool altPressed, shiftPressed, ctrlPressed;
- public static bool cheatsOn;
- private bool COff, COn, CMOn, CMOff;
+ private bool altPressed, shiftPressed, ctrlPressed;
+ private bool cheatsOn;
+ private bool COff, COn, CMOn, CMOff;
- private bool _revealRumorsOnly = true;
+ private bool _revealRumorsOnly = true;
- private bool _engageLudicrousSpeed;
- private float ludicrousMult = 1f;
+ private bool _engageLudicrousSpeed;
+ private float ludicrousMult = 1f;
- private bool invincible = false;
+ private bool invincible = false;
- private bool wasBoosted;
- private float jetpackStanard = 6f;
+ private bool wasBoosted;
+ private float jetpackStanard = 6f;
- private bool _gotoWarpPointNextFrame;
- private static RelativeLocationData[] _relativeData = new RelativeLocationData[10];
- private static OWRigidbody[] _relativeBody = new OWRigidbody[10];
- private static bool[] _hasSetWarpPoint = new bool[10];
- private static int relIndex;
- public static RaycastHit hit;
- public static int rayMask;
+ private bool _gotoWarpPointNextFrame;
+ private RelativeLocationData[] _relativeData = new RelativeLocationData[10];
+ private OWRigidbody[] _relativeBody = new OWRigidbody[10];
+ private bool[] _hasSetWarpPoint = new bool[10];
+ private int relIndex;
+ private RaycastHit hit;
+ private int rayMask;
- private int oldmode;
- public static bool hiddenHUD;
- public static int inputHUD = 0;
- }
-}
+ private int oldmode;
+ private bool hiddenHUD;
+ private int inputHUD = 0;
+ }
+}
\ No newline at end of file
diff --git a/OW_TAIcheat/buttons.txt b/OW_TAIcheat/buttons.txt
deleted file mode 100644
index f111f44..0000000
--- a/OW_TAIcheat/buttons.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-enable cheat mode = ` or ~
-
-VesselWarp (requires reload) = E + U
-
-suitUp = G
-learnLaunchCodes = Alt + G
-
-toggle Helmet = H
-toggle HUD = Alt + H
-
-refillResources, heal and repair ship = J
-damage ship components = Alt + J
-destroy ship = Alt + Shift + J
-
-EngageLudicrousSpeed = L
-increase ludicrousness = Shift + L
-decrease ludicrousness = Alt + L
-
-powerOverwhelming (invincibility) = P
-toggle superjetpack = Alt + P
-
-revealAllShipLogFacts = O
-learnForgetFrequencies = Alt + O
-
-cycle through DebugHUD types = \
-
-toggle player collision = N
-toggle player collision AND gravity (separate mechanism) = Alt + N
-toggle ship collision = M
-toggle ship collision AND gravity (separate mechanism) = Alt + M
-
-triggerSupernova = Delete
-break all Brittle Hollow's Fragments = Alt + Delete
-
-timeLapse = Equals
-
-uiTestAndSuicide = Minus
-
-raycast single layer inspector (crosshair, can be used for teleportation too) = Home
-switch filter = Home + Alt
-
-set warp point:
- player's position = PageDown
- player's crosshair (mostly works) = Alt + PageDown
- scout's position (somewhat buggy) = (Shift or Ctrl) + PageDown
-teleport to warp point = PageUp
-cycle warp point (10 slots available) = Alt + PageUp
-
-toggle nearby anglerfishes' AI = K
-disable nearby anglerfishes = Alt + K
\ No newline at end of file
diff --git a/OW_TAIcheat/default-config.json b/OW_TAIcheat/default-config.json
new file mode 100644
index 0000000..9d51335
--- /dev/null
+++ b/OW_TAIcheat/default-config.json
@@ -0,0 +1,138 @@
+{
+ "enabled": true,
+ "requireVR": false,
+ "settings": {
+ "(tele) Save probe's pos": {
+ "type": "input",
+ "value": "PageDown+LeftShift/PageDown+RightShift"
+ },
+ "(tele) Save RayCast pos": {
+ "type": "input",
+ "value": "PageDown+LeftAlt/PageDown+RightAlt"
+ },
+ "(tele) Save player's pos": {
+ "type": "input",
+ "value": "PageDown"
+ },
+ "(tele) Cycle through pos": {
+ "type": "input",
+ "value": "PageUp+LeftAlt/PageUp+RightAlt"
+ },
+ "(tele) Tele to saved pos": {
+ "type": "input",
+ "value": "PageUp"
+ },
+ "(insp) RayCast": {
+ "type": "input",
+ "value": "Home"
+ },
+ "(insp) Cycle through layers": {
+ "type": "input",
+ "value": "LeftAlt+Home/RightAlt+Home"
+ },
+ "Toggle spacesuit": {
+ "type": "input",
+ "value": "G"
+ },
+ "Learn launchcode": {
+ "type": "input",
+ "value": "LeftAlt+G/RightAlt+G"
+ },
+ "Toggle helmet": {
+ "type": "input",
+ "value": "H"
+ },
+ "Toggle HUD": {
+ "type": "input",
+ "value": "LeftAlt+H/RightAlt+H"
+ },
+ "Fuel+heal": {
+ "type": "input",
+ "value": "J"
+ },
+ "Damage ship": {
+ "type": "input",
+ "value": "LeftAlt+J/RightAlt+J"
+ },
+ "Destroy ship": {
+ "type": "input",
+ "value": "LeftAlt+LeftShift+J/RightAlt+RightShift+J"
+ },
+ "Engage Ludicrous Speed": {
+ "type": "input",
+ "value": "L"
+ },
+ "Increase Ludicrous Speed": {
+ "type": "input",
+ "value": "LeftShift+L/RightShift+L"
+ },
+ "Decrease Ludicrous Speed": {
+ "type": "input",
+ "value": "LeftAlt+L/RightAlt+L"
+ },
+ "Toggle PowerOverwhelming": {
+ "type": "input",
+ "value": "P"
+ },
+ "Toggle superjetpack": {
+ "type": "input",
+ "value": "LeftAlt+P/RightAlt+P"
+ },
+ "Cycle DebugHUD": {
+ "type": "input",
+ "value": "Backslash"
+ },
+ "Reveal all facts": {
+ "type": "input",
+ "value": "O"
+ },
+ "Learn all frequencies": {
+ "type": "input",
+ "value": "LeftAlt+O/RightAlt+O"
+ },
+ "Trigger Supernova": {
+ "type": "input",
+ "value": "Delete"
+ },
+ "Break all BH fragments": {
+ "type": "input",
+ "value": "LeftAlt+Delete/RightAlt+Delete"
+ },
+ "Timelapse": {
+ "type": "input",
+ "value": "Equals"
+ },
+ "Suicide": {
+ "type": "input",
+ "value": "Minus"
+ },
+ "Toggle nearby Anglerfishes AI": {
+ "type": "input",
+ "value": "K"
+ },
+ "Disable nearby Anglerfishes": {
+ "type": "input",
+ "value": "LeftAlt+K/RightAlt+K"
+ },
+ "Toggle player collision": {
+ "type": "input",
+ "value": "N"
+ },
+ "Toggle player collision extra": {
+ "type": "input",
+ "value": "LeftAlt+N/RightAlt+N"
+ },
+ "Toggle ship collision": {
+ "type": "input",
+ "value": "M"
+ },
+ "Toggle ship collision extra": {
+ "type": "input",
+ "value": "LeftAlt+M/RightAlt+M"
+ },
+ "Debug Vessel Warp": {
+ "type": "input",
+ "value": "E+U"
+ }
+ }
+}
\ No newline at end of file
diff --git a/OW_TAIcheat/manifest.json b/OW_TAIcheat/manifest.json
index ad49493..e42d9f6 100644
--- a/OW_TAIcheat/manifest.json
+++ b/OW_TAIcheat/manifest.json
@@ -3,7 +3,7 @@
"author": "TAImatem",
"name": "TAICheat",
"uniqueName": "TruAI.TAICheat",
- "version": "0.6.2",
- "owmlVersion": "0.3.44",
+ "version": "0.9.0",
+ "owmlVersion": "0.3.57",
"enabled": true
}
\ No newline at end of file
diff --git a/OW_TAIcheat/packages.config b/OW_TAIcheat/packages.config
index ef61169..f48eeb9 100644
--- a/OW_TAIcheat/packages.config
+++ b/OW_TAIcheat/packages.config
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file