Skip to content

Commit 0caf794

Browse files
committed
parented trigger boxes, added "mousemin" command
1 parent 829ba1d commit 0caf794

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using UnityEngine;
88
using Harmony;
99

10-
[assembly: MelonInfo(typeof(SuperliminalPracticeMod.Main), "Superliminal Practice Mod", "0.3.1", "Micrologist#2351")]
10+
[assembly: MelonInfo(typeof(SuperliminalPracticeMod.Main), "Superliminal Practice Mod", "0.3.2", "Micrologist#2351")]
1111
[assembly: MelonGame("PillowCastle", "Superliminal")]
1212
[assembly: MelonGame("PillowCastle", "SuperliminalSteam")]
1313

PracticeModManager.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ void Update()
229229
}
230230
}
231231

232+
public void SetMouseMinY(float mouseMinY)
233+
{
234+
if (GameManager.GM.player != null && GameManager.GM.playerCamera.GetComponent<MouseLook>() != null)
235+
GameManager.GM.playerCamera.GetComponent<MouseLook>().minimumY = (mouseMinY);
236+
}
232237

233238
Text NewPlayerText()
234239
{

SLPMod_Console.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ private void ParseCommand(string command)
9191
{
9292
PracticeModManager.Instance.ToggleTriggerVisibility();
9393
}
94+
else if (commandArray[0].ToLower() == "mousemin" && commandArray.Length >= 2)
95+
{
96+
float mouseMinY;
97+
MelonLogger.Log("test");
98+
if (float.TryParse(commandArray[1], out mouseMinY))
99+
{
100+
MelonLogger.Log(mouseMinY.ToString());
101+
PracticeModManager.Instance.SetMouseMinY(mouseMinY);
102+
}
103+
}
104+
94105

95106
}
96107

SLPMod_Patcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class SLPMod_Patcher
1414
{
1515
public static void Patch()
1616
{
17-
var harmony = HarmonyInstance.Create("com.harmonypatch.test");
17+
var harmony = HarmonyInstance.Create("com.superliminalpracticemod.patch");
1818
harmony.PatchAll(Assembly.GetExecutingAssembly());
1919
}
2020
}
@@ -25,7 +25,6 @@ class VendingMachinePatch
2525
{
2626
static void Prefix(VendingMachine __instance)
2727
{
28-
MelonLogger.Log("VendingMachine.Start()");
2928
__instance.HasInfinite = true;
3029
}
3130
}
@@ -40,6 +39,7 @@ static void Prefix(MOSTTriggerEnterCollider __instance)
4039
GameObject gameObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
4140
gameObject.transform.position = bounds.center;
4241
gameObject.transform.localScale = bounds.extents * 2f;
42+
gameObject.transform.parent = __instance.gameObject.transform;
4343
gameObject.GetComponent<BoxCollider>().enabled = false;
4444
MeshRenderer component = gameObject.GetComponent<MeshRenderer>();
4545
component.material.shader = Shader.Find("Transparent/Diffuse");

0 commit comments

Comments
 (0)