Skip to content

Commit 9411c22

Browse files
author
iiDk
committed
5.1.3
1 parent 54ec688 commit 9411c22

File tree

15 files changed

+437
-58
lines changed

15 files changed

+437
-58
lines changed

Classes/ColorChanger.cs

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using iiMenu.Menu;
2+
using System;
23
using System.Collections.Generic;
34
using System.Text;
45
using UnityEngine;
@@ -19,39 +20,62 @@ public override void Update()
1920
base.Update();
2021
if (colors != null)
2122
{
22-
if (!isMonkeColors)
23+
if (!iiMenu.Menu.Main.dynamicGradients)
2324
{
24-
if (timeBased)
25+
if (!isMonkeColors)
2526
{
26-
//color = colors.Evaluate(progress);
27-
color = colors.Evaluate((Time.time / 2f) % 1);
27+
if (timeBased)
28+
{
29+
//color = colors.Evaluate(progress);
30+
color = colors.Evaluate((Time.time / 2f) % 1);
31+
}
32+
if (isRainbow)
33+
{
34+
float h = (Time.frameCount / 180f) % 1f;
35+
color = UnityEngine.Color.HSVToRGB(h, 1f, 1f);
36+
}
37+
if (isPastelRainbow)
38+
{
39+
float h = (Time.frameCount / 180f) % 1f;
40+
color = UnityEngine.Color.HSVToRGB(h, 0.3f, 1f);
41+
}
42+
if (isEpileptic)
43+
{
44+
color = new Color32((byte)UnityEngine.Random.Range(0, 255), (byte)UnityEngine.Random.Range(0, 255), (byte)UnityEngine.Random.Range(0, 255), 255);
45+
}
46+
gameObjectRenderer.material.color = color;
2847
}
29-
if (isRainbow)
48+
else
3049
{
31-
float h = (Time.frameCount / 180f) % 1f;
32-
color = UnityEngine.Color.HSVToRGB(h, 1f, 1f);
33-
}
34-
if (isPastelRainbow)
35-
{
36-
float h = (Time.frameCount / 180f) % 1f;
37-
color = UnityEngine.Color.HSVToRGB(h, 0.3f, 1f);
38-
}
39-
if (isEpileptic)
40-
{
41-
color = new Color32((byte)UnityEngine.Random.Range(0, 255), (byte)UnityEngine.Random.Range(0, 255), (byte)UnityEngine.Random.Range(0, 255), 255);
50+
if (!Menu.Main.PlayerIsTagged(GorillaTagger.Instance.offlineVRRig))
51+
{
52+
gameObjectRenderer.material.color = GorillaTagger.Instance.offlineVRRig.mainSkin.material.color;
53+
}
54+
else
55+
{
56+
gameObjectRenderer.material.color = new Color32(255, 111, 0, 255);
57+
}
58+
4259
}
43-
gameObjectRenderer.material.color = color;
4460
}
4561
else
4662
{
47-
if (!Menu.Main.PlayerIsTagged(GorillaTagger.Instance.offlineVRRig))
63+
if (colors.colorKeys[0].color == colors.colorKeys[1].color)
4864
{
49-
gameObjectRenderer.material.color = GorillaTagger.Instance.offlineVRRig.mainSkin.material.color;
65+
gameObjectRenderer.material.color = colors.colorKeys[0].color;
5066
} else
5167
{
52-
gameObjectRenderer.material.color = new Color32(255, 111, 0, 255);
68+
if (gameObjectRenderer.material.shader.name != "Universal Render Pipeline/Lit")
69+
{
70+
gameObjectRenderer.material = new Material(Shader.Find("Universal Render Pipeline/Lit"));
71+
72+
gameObjectRenderer.material.SetFloat("_Glossiness", 0f);
73+
gameObjectRenderer.material.SetFloat("_Metallic", 0f);
74+
75+
76+
gameObjectRenderer.material.mainTexture = iiMenu.Menu.Main.GetGradientTexture(colors.colorKeys[0].color, colors.colorKeys[1].color);
77+
}
5378
}
54-
5579
}
5680
}
5781
}

Menu/Main.cs

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public static void Prefix()
238238
if (v.name.Contains("forestatlas"))
239239
{
240240
indexOfThatThing++;
241-
if (indexOfThatThing == 4)
241+
if (indexOfThatThing == 2)
242242
{
243243
UnityEngine.Debug.Log("Board found");
244244
found2 = true;
@@ -1803,6 +1803,8 @@ public static void Draw()
18031803
pride.wrapMode = TextureWrapMode.Clamp;
18041804
}
18051805
menuBackground.GetComponent<Renderer>().material.shader = Shader.Find("Universal Render Pipeline/Lit");
1806+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Glossiness", 0f);
1807+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Metallic", 0f);
18061808
menuBackground.GetComponent<Renderer>().material.color = Color.white;
18071809
menuBackground.GetComponent<Renderer>().material.mainTexture = pride;
18081810
UnityEngine.Debug.Log("gayed the texture");
@@ -1815,6 +1817,8 @@ public static void Draw()
18151817
trans.wrapMode = TextureWrapMode.Clamp;
18161818
}
18171819
menuBackground.GetComponent<Renderer>().material.shader = Shader.Find("Universal Render Pipeline/Lit");
1820+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Glossiness", 0f);
1821+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Metallic", 0f);
18181822
menuBackground.GetComponent<Renderer>().material.color = Color.white;
18191823
menuBackground.GetComponent<Renderer>().material.mainTexture = trans;
18201824
break;
@@ -1826,6 +1830,8 @@ public static void Draw()
18261830
gay.wrapMode = TextureWrapMode.Clamp;
18271831
}
18281832
menuBackground.GetComponent<Renderer>().material.shader = Shader.Find("Universal Render Pipeline/Lit");
1833+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Glossiness", 0f);
1834+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Metallic", 0f);
18291835
menuBackground.GetComponent<Renderer>().material.color = Color.white;
18301836
menuBackground.GetComponent<Renderer>().material.mainTexture = gay;
18311837
break;
@@ -1838,6 +1844,8 @@ public static void Draw()
18381844
if (doCustomMenuBackground)
18391845
{
18401846
menuBackground.GetComponent<Renderer>().material.shader = Shader.Find("Universal Render Pipeline/Lit");
1847+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Glossiness", 0f);
1848+
menuBackground.GetComponent<Renderer>().material.SetFloat("_Metallic", 0f);
18411849
menuBackground.GetComponent<Renderer>().material.color = Color.white;
18421850
menuBackground.GetComponent<Renderer>().material.mainTexture = customMenuBackgroundImage;
18431851
}
@@ -3301,6 +3309,25 @@ public static Texture2D LoadTextureFromURL(string resourcePath, string fileName)
33013309
return texture;
33023310
}
33033311

3312+
private static Dictionary<Color[], Texture2D> cacheGradients = new Dictionary<Color[], Texture2D> { };
3313+
public static Texture2D GetGradientTexture(Color colorA, Color colorB)
3314+
{
3315+
if (cacheGradients.ContainsKey(new Color[] { colorA, colorB }))
3316+
return cacheGradients[new Color[] { colorA, colorB }];
3317+
3318+
Texture2D txt2d = new Texture2D(128, 128);
3319+
for (int i = 1; i <= 128; i++)
3320+
{
3321+
for (int j = 1; j <= 128; j++)
3322+
{
3323+
Color clr = Color.Lerp(colorA, colorB, i / 128f);
3324+
txt2d.SetPixel(i, j, clr);
3325+
}
3326+
}
3327+
txt2d.Apply();
3328+
return txt2d;
3329+
}
3330+
33043331
public static void RPCProtection()
33053332
{
33063333
try
@@ -4001,6 +4028,21 @@ public static List<NetPlayer> InfectedList()
40014028
}
40024029
}
40034030
}
4031+
if (gamemode.Contains("ambush") || gamemode.Contains("stealth"))
4032+
{
4033+
GorillaAmbushManager tagman = GameObject.Find("GT Systems/GameModeSystem/Gorilla Stealth Manager").GetComponent<GorillaAmbushManager>();
4034+
if (tagman.isCurrentlyTag)
4035+
{
4036+
infected.Add(tagman.currentIt);
4037+
}
4038+
else
4039+
{
4040+
foreach (NetPlayer plr in tagman.currentInfected)
4041+
{
4042+
infected.Add(plr);
4043+
}
4044+
}
4045+
}
40044046
return infected;
40054047
}
40064048

@@ -4924,6 +4966,7 @@ public static void OnLaunch()
49244966

49254967
public static bool dynamicSounds = false;
49264968
public static bool dynamicAnimations = false;
4969+
public static bool dynamicGradients = false;
49274970
public static string lastClickedName = "";
49284971

49294972
public static string ascii =

Mods/Buttons.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public class Buttons
7070
new ButtonInfo { buttonText = "Custom Menu Name", enableMethod =() => Settings.CustomMenuName(), disableMethod =() => Settings.NoCustomMenuName(), toolTip = "Changes the name of the menu to whatever. You can change the text inside of your Gorilla Tag files (iisStupidMenu/iiMenu_CustomMenuName.txt)."},
7171

7272
new ButtonInfo { buttonText = "Dynamic Animations", enableMethod =() => Settings.DynamicAnimations(), disableMethod =() => Settings.NoDynamicAnimations(), toolTip = "Adds more animations to the menu, giving you a better sense of control."},
73+
new ButtonInfo { buttonText = "Dynamic Gradients", enableMethod =() => Settings.DynamicGradients(), disableMethod =() => Settings.NoDynamicGradients(), toolTip = "Makes gradients dynamic, showing you the full gradient instead of a pulsing color."},
7374
new ButtonInfo { buttonText = "Dynamic Sounds", enableMethod =() => Settings.DynamicSounds(), disableMethod =() => Settings.NoDynamicSounds(), toolTip = "Adds more sounds to the menu, giving you a better sense of control."},
7475
new ButtonInfo { buttonText = "Voice Commands", enableMethod =() => Settings.VoiceRecognitionOn(), disableMethod =() => Settings.VoiceRecognitionOff(), toolTip = "Enable and disable sounds with your voice. Activate it like how you would any other voice assistant, such as \"Jarvis\"."},
7576
new ButtonInfo { buttonText = "Chain Voice Commands", toolTip = "Makes voice commands chain together, so you don't have to repeatedly ask it to listen to you."},
@@ -805,6 +806,7 @@ public class Buttons
805806

806807
new ButtonInfo { buttonText = "Guardian Spaz", method =() => Overpowered.GuardianSpaz(), toolTip = "Spams the guardian position for everyone in the lobby."},
807808

809+
new ButtonInfo { buttonText = "Unlimited Building", enableMethod =() => Fun.UnlimitedBuilding(), disableMethod =() => Fun.DisableUnlimitedBuilding(), toolTip = "Unlimits building, disabling drop zones and letting you place on people's plots." },
808810
new ButtonInfo { buttonText = "Destroy Building Block Gun", method =() => Fun.DestroyBlockGun(), toolTip = "Shreds whatever building block your hand desires." },
809811
new ButtonInfo { buttonText = "Destroy Building Blocks", method =() => Fun.DestroyBlocks(), toolTip = "Shreds every building block." },
810812

@@ -903,7 +905,7 @@ public class Buttons
903905
new ButtonInfo { buttonText = "Lag Gun", method =() => Overpowered.LagGun(), toolTip = "Lags whoever your hand desires."},
904906
new ButtonInfo { buttonText = "Lag All <color=grey>[</color><color=green>T</color><color=grey>]</color>", method =() => Overpowered.LagAll(), toolTip = "Lags everybody in the lobby when holding <color=green>trigger</color>."},
905907

906-
new ButtonInfo { buttonText = "Kick Gun", method =() => Overpowered.KickGun(), toolTip = "Kicks whoever your hand desires."},
908+
new ButtonInfo { buttonText = "Kick Gun", method =() => Overpowered.KickGun(), disableMethod =() => Overpowered.DisableKickGun(), toolTip = "Kicks whoever your hand desires."},
907909

908910
new ButtonInfo { buttonText = "Virtual Stump Kick Gun", method =() => Overpowered.VirtualStumpKickGun(), toolTip = "Kicks whoever your hand desires in the custom map."},
909911
new ButtonInfo { buttonText = "Virtual Stump Kick All <color=grey>[</color><color=green>T</color><color=grey>]</color>", method =() => Overpowered.VirtualStumpKickAll(), toolTip = "Kicks everybody in the custom map when holding <color=green>trigger</color>."},
@@ -913,9 +915,6 @@ public class Buttons
913915
new ButtonInfo { buttonText = "Attic Crash Gun", method =() => Overpowered.AtticCrashGun(), toolTip = "Crashes whoever your hand desires in the attic."},
914916
new ButtonInfo { buttonText = "Attic Crash All <color=grey>[</color><color=green>T</color><color=grey>]</color>", method =() => Overpowered.AtticCrashAll(), toolTip = "Crashes everybody inside of the attic."},
915917

916-
//new ButtonInfo { buttonText = "Guardian Blind Gun", method =() => Overpowered.GuardianBlindGun(), toolTip = "Blinds whoever your hand desires if you're guardian."},
917-
//new ButtonInfo { buttonText = "Guardian Blind All <color=grey>[</color><color=green>T</color><color=grey>]</color>", method =() => Overpowered.GuardianBlindAll(), toolTip = "Blinds everybody if you're guardian."},
918-
919918
new ButtonInfo { buttonText = "Destroy Gun", method =() => Overpowered.DestroyGun(), toolTip = "Block new players from seeing whoever your hand desires."},
920919
new ButtonInfo { buttonText = "Destroy All", method =() => Overpowered.DestroyAll(), isTogglable = false, toolTip = "Block new players from seeing everyone."},
921920

@@ -1093,9 +1092,9 @@ public class Buttons
10931092
},
10941093

10951094
new ButtonInfo[] { // Overpowered (in Settings) [31]
1096-
new ButtonInfo { buttonText = "Exit Overpowered Settings", method =() => Settings.EnableSettings(), isTogglable = false, toolTip = "Returns you back to the settings menu."}
1095+
new ButtonInfo { buttonText = "Exit Overpowered Settings", method =() => Settings.EnableSettings(), isTogglable = false, toolTip = "Returns you back to the settings menu."},
10971096

1098-
// What a lone category
1097+
new ButtonInfo { buttonText = "Disable Kick Gun Reconnect", toolTip = "Disables automatically reconnecting to the room when the kick gun fails."},
10991098
},
11001099
};
11011100
}

Mods/Fun.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,6 +1566,18 @@ public static void DestroyBlocks()
15661566
}
15671567
}
15681568

1569+
public static void UnlimitedBuilding()
1570+
{
1571+
BuilderPieceInteractor.instance.maxHoldablePieceStackCount = int.MaxValue;
1572+
Patches.UnlimitPatches.enabled = true;
1573+
}
1574+
1575+
public static void DisableUnlimitedBuilding()
1576+
{
1577+
BuilderPieceInteractor.instance.maxHoldablePieceStackCount = 50;
1578+
Patches.UnlimitPatches.enabled = false;
1579+
}
1580+
15691581
private static float dumbdelay = 0f;
15701582
public static void DestroyBlockGun()
15711583
{

Mods/Important.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public static void JoinRandomR()
126126

127127
public static void CreateRoom(string roomName, bool isPublic) // Once again thanks to Shiny for discovering a thing that doesn't work anymore
128128
{
129-
PhotonNetworkController.Instance.currentJoinTrigger = GorillaComputer.instance.GetJoinTriggerForZone("forest");
129+
//PhotonNetworkController.Instance.currentJoinTrigger = GorillaComputer.instance.GetJoinTriggerForZone("forest");
130130
UnityEngine.Debug.Log((string)typeof(PhotonNetworkController).GetField("platformTag", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(PhotonNetworkController.Instance));
131131
RoomConfig roomConfig = new RoomConfig()
132132
{
@@ -137,7 +137,8 @@ public static void JoinRandomR()
137137
CustomProps = new ExitGames.Client.Photon.Hashtable()
138138
{
139139
{ "gameMode", PhotonNetworkController.Instance.currentJoinTrigger.GetFullDesiredGameModeString() },
140-
{ "platform", (string)typeof(PhotonNetworkController).GetField("platformTag", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(PhotonNetworkController.Instance) }
140+
{ "platform", (string)typeof(PhotonNetworkController).GetField("platformTag", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(PhotonNetworkController.Instance) },
141+
{ "queueName", GorillaComputer.instance.currentQueue }
141142
}
142143
};
143144
NetworkSystem.Instance.ConnectToRoom(roomName, roomConfig);
@@ -283,15 +284,15 @@ public static void CopyPlayerPosition()
283284
GUIUtility.systemCopyBuffer = text;
284285
}
285286

286-
287+
// The oldest bug in this menu: I enabled the AFK kick when turning on ANTI afk. I'm killing myself
287288
public static void EnableAntiAFK()
288289
{
289-
PhotonNetworkController.Instance.disableAFKKick = false;
290+
PhotonNetworkController.Instance.disableAFKKick = true;
290291
}
291292

292293
public static void DisableAntiAFK()
293294
{
294-
PhotonNetworkController.Instance.disableAFKKick = true;
295+
PhotonNetworkController.Instance.disableAFKKick = false;
295296
}
296297

297298
public static void DisableNetworkTriggers()

Mods/Movement.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,17 +1281,17 @@ public static void NoTagFreeze()
12811281

12821282
public static void LowGravity()
12831283
{
1284-
GorillaLocomotion.Player.Instance.bodyCollider.attachedRigidbody.AddForce(Vector3.up * (Time.deltaTime * (6.66f / Time.deltaTime)), ForceMode.Acceleration);
1284+
GorillaLocomotion.Player.Instance.bodyCollider.attachedRigidbody.AddForce(Vector3.up * (Time.unscaledDeltaTime * (6.66f / Time.unscaledDeltaTime)), ForceMode.Acceleration);
12851285
}
12861286

12871287
public static void ZeroGravity()
12881288
{
1289-
GorillaLocomotion.Player.Instance.bodyCollider.attachedRigidbody.AddForce(Vector3.up * (Time.deltaTime * (9.81f / Time.deltaTime)), ForceMode.Acceleration);
1289+
GorillaLocomotion.Player.Instance.bodyCollider.attachedRigidbody.AddForce(Vector3.up * (Time.unscaledDeltaTime * (9.81f / Time.unscaledDeltaTime)), ForceMode.Acceleration);
12901290
}
12911291

12921292
public static void HighGravity()
12931293
{
1294-
GorillaLocomotion.Player.Instance.bodyCollider.attachedRigidbody.AddForce(Vector3.down * (Time.deltaTime * (7.77f / Time.deltaTime)), ForceMode.Acceleration);
1294+
GorillaLocomotion.Player.Instance.bodyCollider.attachedRigidbody.AddForce(Vector3.down * (Time.unscaledDeltaTime * (7.77f / Time.unscaledDeltaTime)), ForceMode.Acceleration);
12951295
}
12961296

12971297
public static void ReverseGravity()

0 commit comments

Comments
 (0)