Skip to content

Commit

Permalink
4.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iiDk committed Oct 5, 2024
1 parent 06053ef commit 248204e
Show file tree
Hide file tree
Showing 11 changed files with 546 additions and 132 deletions.
54 changes: 22 additions & 32 deletions Menu/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ public static void Prefix()
if (PhotonNetwork.InRoom && !lastInRoom)
{
NotifiLib.SendNotification("<color=grey>[</color><color=blue>JOIN ROOM</color><color=grey>]</color> Room Code: " + lastRoom + "");
RPCProtection();
}
if (!PhotonNetwork.InRoom && lastInRoom)
{
Expand All @@ -538,6 +539,7 @@ public static void Prefix()
NotifiLib.ClearAllNotifications();
}
NotifiLib.SendNotification("<color=grey>[</color><color=blue>LEAVE ROOM</color><color=grey>]</color> Room Code: " + lastRoom + "");
RPCProtection();
lastMasterClient = false;
}

Expand Down Expand Up @@ -1103,24 +1105,6 @@ public static void Prefix()
}
}

// Join random code (for if you were already in lobby)
if (PhotonNetwork.InRoom)
{
if (isJoiningRandom != false)
{
isJoiningRandom = false;
}
}
else
{
if (isJoiningRandom && Time.time > jrDebounce)
{
Important.ActJoinRandom();

//jrDebounce = Time.time + (float)internetTime;
}
}

// Party kick code (to return back to the main lobby when you're done
if (PhotonNetwork.InRoom)
{
Expand Down Expand Up @@ -3308,15 +3292,9 @@ public static void RPCProtection()

PhotonNetwork.MaxResendsBeforeDisconnect = int.MaxValue;
PhotonNetwork.QuickResends = int.MaxValue;
// PhotonNetwork.SendRate = int.MaxValue;
// GorillaGameManager.instance.maxProjectilesToKeepTrackOfPerPlayer = int.MaxValue;

PhotonNetwork.RemoveRPCs(PhotonNetwork.LocalPlayer);
PhotonNetwork.OpCleanRpcBuffer(GorillaTagger.Instance.myVRRig.GetView);
PhotonNetwork.RemoveBufferedRPCs(GorillaTagger.Instance.myVRRig.ViewID, null, null);
PhotonNetwork.RemoveRPCsInGroup(int.MaxValue);
PhotonNetwork.SendAllOutgoingCommands();
GorillaNot.instance.OnPlayerLeftRoom(PhotonNetwork.LocalPlayer);
}
}
} catch { UnityEngine.Debug.Log("RPC protection failed, are you in a lobby?"); }
Expand Down Expand Up @@ -3394,7 +3372,11 @@ public static void LoadServerData()
shouldAttemptLoadData = false;
string[] Data = html.Split("\n");

UnityEngine.Debug.Log(Data[0]);
if (Data[3] != null)
{
serverLink = Data[3];
}

if (Data[0] != PluginInfo.Version)
{
if (!isBetaTestVersion)
Expand Down Expand Up @@ -3445,11 +3427,6 @@ public static void LoadServerData()
} catch { }

motdTemplate = Data[2];

if (Data[3] != null)
{
serverLink = Data[3];
}
}
catch { }
}
Expand Down Expand Up @@ -3805,6 +3782,21 @@ public static List<NetPlayer> InfectedList()
}
}
}
if (gamemode.Contains("ghost"))
{
GorillaAmbushManager tagman = GameObject.Find("GT Systems/GameModeSystem/Gorilla GhostTag Manager").GetComponent<GorillaAmbushManager>();
if (tagman.isCurrentlyTag)
{
infected.Add(tagman.currentIt);
}
else
{
foreach (NetPlayer plr in tagman.currentInfected)
{
infected.Add(plr);
}
}
}
if (gamemode.Contains("ambush") || gamemode.Contains("stealth"))
{
GorillaAmbushManager tagman = GameObject.Find("GT Systems/GameModeSystem/Gorilla Stealth Manager").GetComponent<GorillaAmbushManager>();
Expand Down Expand Up @@ -4959,8 +4951,6 @@ public static void OnLaunch()
public static bool lastprimaryhit = false;
public static bool idiotfixthingy = false;

public static bool isJoiningRandom = false;

public static int colorChangeType = 0;
public static bool strobeColor = false;

Expand Down
38 changes: 28 additions & 10 deletions Mods/Buttons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ internal class Buttons

new ButtonInfo { buttonText = "Clear Notifications on Disconnect", toolTip = "Clears all notifications on disconnect."},
new ButtonInfo { buttonText = "Disable Notifications", enableMethod =() => Settings.DisableNotifications(), disableMethod =() => Settings.EnableNotifications(), toolTip = "Disables all notifications."},
new ButtonInfo { buttonText = "Disable Enabled GUI", enableMethod =() => Settings.DisableEnabledGUI(), disableMethod =() => Settings.EnableEnabledGUI(), toolTip = "Disables the GUI that shows the enabled mods."},
new ButtonInfo { buttonText = "Disable Enabled GUI", overlapText = "Disable Arraylist GUI", enableMethod =() => Settings.DisableEnabledGUI(), disableMethod =() => Settings.EnableEnabledGUI(), toolTip = "Disables the GUI that shows the enabled mods."},
new ButtonInfo { buttonText = "Disable Disconnect Button", enableMethod =() => Settings.DisableDisconnectButton(), disableMethod =() => Settings.EnableDisconnectButton(), toolTip = "Disables the disconnect button at the top of the menu."},
new ButtonInfo { buttonText = "Disable Search Button", enableMethod =() => Settings.DisableSearchButton(), disableMethod =() => Settings.EnableSearchButton(), toolTip = "Disables the search button at the bottom of the menu."},
new ButtonInfo { buttonText = "Disable Return Button", enableMethod =() => Settings.DisableReturnButton(), disableMethod =() => Settings.EnableReturnButton(), toolTip = "Disables the return button at the bottom of the menu."},
Expand Down Expand Up @@ -573,6 +573,10 @@ internal class Buttons
new ButtonInfo { buttonText = "Fast Gliders", enableMethod =() => Fun.FastGliders(), disableMethod =() => Fun.FixGliderSpeed(), toolTip = "Makes the gliders fast."},
new ButtonInfo { buttonText = "Slow Gliders", enableMethod =() => Fun.SlowGliders(), disableMethod =() => Fun.FixGliderSpeed(), toolTip = "Makes the gliders slow."},

new ButtonInfo { buttonText = "Fast Brooms", enableMethod =() => Fun.FastBrooms(), disableMethod =() => Fun.FixBroomSpeed(), toolTip = "Makes the brooms become really fast." },
new ButtonInfo { buttonText = "Slow Brooms", enableMethod =() => Fun.SlowBrooms(), disableMethod =() => Fun.FixBroomSpeed(), toolTip = "Makes the brooms become really slow." },
new ButtonInfo { buttonText = "Spaz Brooms", method =() => Fun.SpazBrooms(), toolTip = "Gives the brooms a seizure." },

new ButtonInfo { buttonText = "Glider Blind Gun", method =() => Overpowered.GliderBlindGun(), toolTip = "Moves all of the gliders to whoever your hand desires' faces." },
new ButtonInfo { buttonText = "Glider Blind All", method =() => Overpowered.GliderBlindAll(), toolTip = "Moves all of the gliders to everyone's faces." },

Expand All @@ -583,9 +587,9 @@ internal class Buttons
new ButtonInfo { buttonText = "Break Bug", enableMethod =() => Fun.BreakBug(), disableMethod =() => Fun.FixBug(), toolTip = "Makes the bug ungrabbable."},
new ButtonInfo { buttonText = "Break Bat", enableMethod =() => Fun.BreakBat(), disableMethod =() => Fun.FixBat(), toolTip = "Makes the bat ungrabbable."},

new ButtonInfo { buttonText = "Small Building", enableMethod =() => Fun.SmallBuilding(), disableMethod =() => Fun.BigBuilding(), toolTip = "Lets you build in the attic while small."},
new ButtonInfo { buttonText = "Multi Grab", method =() => Fun.MultiGrab(), toolTip = "Lets you grab multiple objects."},
new ButtonInfo { buttonText = "Grab Trees <color=grey>[</color><color=green>G</color><color=grey>]</color>", enableMethod =() => Fun.GetTrees(), method =() => Fun.GrabTree(), toolTip = "Grabs a tree when you hold <color=green>grip</color>."},
//new ButtonInfo { buttonText = "Small Building", enableMethod =() => Fun.SmallBuilding(), disableMethod =() => Fun.BigBuilding(), toolTip = "Lets you build in the attic while small."},
//new ButtonInfo { buttonText = "Multi Grab", method =() => Fun.MultiGrab(), toolTip = "Lets you grab multiple objects."},
//new ButtonInfo { buttonText = "Grab Trees <color=grey>[</color><color=green>G</color><color=grey>]</color>", enableMethod =() => Fun.GetTrees(), method =() => Fun.GrabTree(), toolTip = "Grabs a tree when you hold <color=green>grip</color>."},

new ButtonInfo { buttonText = "Spaz All Moles", method =() => Fun.SpazMoleMachines(), toolTip = "Gives the moles a seizure."},
new ButtonInfo { buttonText = "Auto Start Moles", method =() => Fun.AutoStartMoles(), toolTip = "Automatically starts the mole games."},
Expand Down Expand Up @@ -744,6 +748,21 @@ internal class Buttons

new ButtonInfo { buttonText = "Master Check", method =() => Overpowered.MasterCheck(), isTogglable = false, toolTip = "Checks if you are master client."},

new ButtonInfo { buttonText = "Spawn Red Lucy", method =() => Overpowered.SpawnRedLucy(), isTogglable = false, toolTip = "Summons the red Lucy in forest." },
new ButtonInfo { buttonText = "Spawn Blue Lucy", method =() => Overpowered.SpawnBlueLucy(), isTogglable = false, toolTip = "Summons the blue Lucy in forest." },
new ButtonInfo { buttonText = "Despawn Lucy", method =() => Overpowered.DespawnLucy(), isTogglable = false, toolTip = "Despawns the ghost Lucy in forest." },
new ButtonInfo { buttonText = "Spaz Lucy", method =() => Overpowered.SpazLucy(), toolTip = "Gives the ghost Lucy a seizure." },

new ButtonInfo { buttonText = "Lucy Chase Self", method =() => Overpowered.LucyChaseSelf(), isTogglable = false, toolTip = "Makes the ghost Lucy chase you." },
new ButtonInfo { buttonText = "Lucy Chase Gun", method =() => Overpowered.LucyChaseGun(), toolTip = "Makes the ghost Lucy chase whoever your hand desires." },
new ButtonInfo { buttonText = "Lucy Chase Spaz", method =() => Overpowered.SpazChaseLucy(), toolTip = "Makes the ghost Lucy become undecided on who to chase." },

new ButtonInfo { buttonText = "Lucy Attack Self", method =() => Overpowered.LucyAttackSelf(), isTogglable = false, toolTip = "Makes the ghost Lucy attack you." },
new ButtonInfo { buttonText = "Lucy Attack Gun", method =() => Overpowered.LucyAttackGun(), toolTip = "Makes the ghost Lucy attack whoever your hand desires." },

new ButtonInfo { buttonText = "Fast Lucy", method =() => Overpowered.FastLucy(), toolTip = "Makes the ghost Lucy become really fast." },
new ButtonInfo { buttonText = "Slow Lucy", method =() => Overpowered.SlowLucy(), toolTip = "Makes the ghost Lucy become really slow." },

new ButtonInfo { buttonText = "Slow Monsters", enableMethod =() => Fun.SlowMonsters(), disableMethod =() => Fun.FixMonsters(), toolTip = "Slows down the basement monsters." },
new ButtonInfo { buttonText = "Fast Monsters", enableMethod =() => Fun.FastMonsters(), disableMethod =() => Fun.FixMonsters(), toolTip = "Speeds up the basement monsters." },

Expand Down Expand Up @@ -797,11 +816,7 @@ internal class Buttons
new ButtonInfo[] { // Overpowered Mods [17]
new ButtonInfo { buttonText = "Exit Overpowered Mods", method =() => Settings.ReturnToMain(), isTogglable = false, toolTip = "Returns you back to the main page."},

new ButtonInfo { buttonText = "Remove Self from Leaderboard", method =() => Overpowered.RemoveSelfFromLeaderboard(), isTogglable = false, toolTip = "Removes yourself from the leaderboard." },

new ButtonInfo { buttonText = "Freeze All <color=grey>[</color><color=green>T</color><color=grey>]</color>", method =() => Overpowered.FreezeAll(), toolTip = "Freezes everyone in the lobby when holding <color=green>trigger</color>." },
new ButtonInfo { buttonText = "Packet Stresser", method =() => Overpowered.PacketStresser(), isTogglable = false, toolTip = "Sends many packets to the server, speeding up Freeze All." },

//new ButtonInfo { buttonText = "Attic Fling Gun", method =() => Overpowered.AtticFlingGun(), toolTip = "Flings whoever your hand desires in the attic." },
//new ButtonInfo { buttonText = "Attic Fling All <color=grey>[</color><color=green>T</color><color=grey>]</color>", method =() => Overpowered.AtticFlingAll(), toolTip = "Flings everyone in the attic when holding <color=green>trigger</color>." },

Expand Down Expand Up @@ -883,7 +898,7 @@ internal class Buttons
new ButtonInfo { buttonText = "Thin Tracers", toolTip = "Makes tracers thinner."},
},

new ButtonInfo[] { // Admin Mods (owner only) [23]
new ButtonInfo[] { // Admin Mods (admins only) [23]
new ButtonInfo { buttonText = "Exit Admin Mods", method =() => Settings.ReturnToMain(), isTogglable = false, toolTip = "Returns you back to the main page."},

new ButtonInfo { buttonText = "Admin Kick Gun", method =() => Experimental.AdminKickGun(), toolTip = "Kicks whoever your hand desires if they're using the menu."},
Expand Down Expand Up @@ -948,6 +963,7 @@ internal class Buttons

new ButtonInfo { buttonText = "carrg", overlapText = "Change Anti Report Distance <color=grey>[</color><color=green>Normal</color><color=grey>]</color>", method =() => Safety.ChangeAntiReportRange(), isTogglable = false, toolTip = "Changes the distance threshold for the anti report mods."},
new ButtonInfo { buttonText = "Visualize Anti Report", toolTip = "Visualizes the distance threshold for the anti report mods."},
new ButtonInfo { buttonText = "Smart Anti Report", enableMethod =() => Safety.SmartAntiReport(), disableMethod =() => Safety.StupidAntiReport(), toolTip = "Makes the anti report mods only activate in non-modded public lobbies."},
},

new ButtonInfo[] { // Temporary Category [29]
Expand Down Expand Up @@ -1069,4 +1085,6 @@ The mod cemetary
new ButtonInfo { buttonText = "Gorilla Voice <color=grey>[</color><color=green>A</color><color=grey>]</color>", method =() => Fun.GorillaVoice(), toolTip = "Turns your voice into the gorilla voice when holding <color=green>A</color>."},
new ButtonInfo { buttonText = "Spam Eat Honey Comb", method =() => Fun.HoneycombSpam(), toolTip = "Spam eats the honey comb when holding <color=green>grip</color>."},
new ButtonInfo { buttonText = "Remove Cherry Blossoms", enableMethod = () => Visuals.EnableRemoveCherryBlossoms(), disableMethod = () => Visuals.DisableRemoveCherryBlossoms(), toolTip = "Removes cherry blossoms on trees, good for branching." }
*/
new ButtonInfo { buttonText = "Remove Self from Leaderboard", method =() => Overpowered.RemoveSelfFromLeaderboard(), isTogglable = false, toolTip = "Removes yourself from the leaderboard." },
*/
52 changes: 52 additions & 0 deletions Mods/Fun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,58 @@ public static void FixGliderSpeed()
}
}

private static float lastRecievedTime = 0f;
public static NoncontrollableBroomstick[] archivebrooms = null;
public static NoncontrollableBroomstick[] GetBroomsticks() // Wicked witch of the west
{
if (Time.time > lastRecievedTime)
{
archivemonsters = null;
lastRecievedTime = Time.time + 5f;
}
if (archivebrooms == null)
{
archivebrooms = UnityEngine.Object.FindObjectsOfType<NoncontrollableBroomstick>();
}
return archivebrooms;
}

public static void FastBrooms()
{
NoncontrollableBroomstick[] brooms = GetBroomsticks();
foreach (NoncontrollableBroomstick broom in brooms)
{
broom.duration = 10f;
}
}

public static void SlowBrooms()
{
NoncontrollableBroomstick[] brooms = GetBroomsticks();
foreach (NoncontrollableBroomstick broom in brooms)
{
broom.duration = 60f;
}
}

public static void SpazBrooms()
{
NoncontrollableBroomstick[] brooms = GetBroomsticks();
foreach (NoncontrollableBroomstick broom in brooms)
{
Traverse.Create(broom).Field("progress").SetValue(UnityEngine.Random.Range(0f, 1f));
}
}

public static void FixBroomSpeed()
{
NoncontrollableBroomstick[] brooms = GetBroomsticks();
foreach (NoncontrollableBroomstick broom in brooms)
{
broom.duration = 30f;
}
}

public static float lastTime = 0f;
public static void SpazGliderMaterial()
{
Expand Down
Loading

0 comments on commit 248204e

Please sign in to comment.