Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
official-notfishvr committed Mar 31, 2024
1 parent 97dfc63 commit d08b904
Show file tree
Hide file tree
Showing 3 changed files with 454 additions and 598 deletions.
63 changes: 47 additions & 16 deletions Main/MainGUI.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
using System.Collections;
using System.Reflection;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx;
using FishMenu.MainUtils;
using GorillaNetworking;
using GorillaTag;
using HarmonyLib;
using Photon.Pun;
using Photon.Realtime;
using PlayFab;
using PlayFab.ClientModels;
using System;
using System.Collections;
using System.Reflection;
using System.Text.RegularExpressions;
using UnityEngine;
using static FishMenu.MainUtils.Utils;
using static NetworkSystem;
using UnityEngine.InputSystem;
using static UnityEngine.Rendering.DebugUI;
using Object = UnityEngine.Object;

namespace FishMenu.Main
{
Expand All @@ -32,7 +33,7 @@ private void DrawMainTab()
private void DrawMicModsTab()
{
scrollPosition = GUILayout.BeginScrollView(scrollPosition);

GUILayout.EndScrollView();
}
private void DrawMenuTab()
Expand Down Expand Up @@ -285,12 +286,16 @@ private void DrawPlayerListTab()

if (playerManagerEnabled && selectedPlayer == player)
{
Instance.StartCoroutine(Instance.AntiBan());
if (HasPlayerTouchedLiquid(selectedPlayer)) { if (GUILayout.Button("UnAcid " + selectedPlayer.NickName)) { MainMenu.Mods.MainStuff.OpMods.AcidKid(selectedPlayer); } }
if (!HasPlayerTouchedLiquid(selectedPlayer)) { if (GUILayout.Button("Acid " + selectedPlayer.NickName)) { MainMenu.Mods.MainStuff.OpMods.AcidKid(selectedPlayer); } }
if (GUILayout.Button("Back")) { selectedPlayer = null; playerManagerEnabled = false; }
foreach (GorillaTagManager gorillaTagManager in Object.FindObjectsOfType<GorillaTagManager>())
{
Instance.StartCoroutine(Instance.AntiBan());
if (HasPlayerTouchedLiquid(selectedPlayer)) { if (GUILayout.Button("UnAcid " + selectedPlayer.NickName)) { MainMenu.Mods.MainStuff.OpMods.AcidKid(selectedPlayer); } }
if (!HasPlayerTouchedLiquid(selectedPlayer)) { if (GUILayout.Button("Acid " + selectedPlayer.NickName)) { MainMenu.Mods.MainStuff.OpMods.AcidKid(selectedPlayer); } }
if (!gorillaTagManager.currentInfected.Contains(selectedPlayer)) { if (GUILayout.Button("Tag " + selectedPlayer.NickName)) { gorillaTagManager.currentInfected.Add(selectedPlayer); } }
if (gorillaTagManager.currentInfected.Contains(selectedPlayer)) { if (GUILayout.Button("UnTag " + selectedPlayer.NickName)) { gorillaTagManager.currentInfected.Remove(selectedPlayer); } }
if (GUILayout.Button("Back")) { selectedPlayer = null; playerManagerEnabled = false; }
}
}

num++;
}
}
Expand Down Expand Up @@ -322,11 +327,38 @@ public void Update()
}
if (ToggleMain[3])
{

if (MainMenu.Instance.IsModded())
{
GameObject[] rootObjects = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects();

foreach (GameObject rootObject in rootObjects)
{
RoomInfo roomInfoComponent = rootObject.GetComponent<RoomInfo>();
RoomOptions RoomOptionsComponent = rootObject.GetComponent<RoomOptions>();

if (roomInfoComponent != null && RoomOptionsComponent != null)
{
Type type = typeof(RoomInfo);

FieldInfo reliableStateField = type.GetField("maxPlayers", BindingFlags.NonPublic);
FieldInfo isVisibleField = type.GetField("isVisible", BindingFlags.NonPublic);
FieldInfo isOpenField = type.GetField("isOpen", BindingFlags.NonPublic);

reliableStateField?.SetValue(roomInfoComponent, Byte.MaxValue);
isVisibleField?.SetValue(roomInfoComponent, true);
isOpenField?.SetValue(roomInfoComponent, true);

reliableStateField?.SetValue(RoomOptionsComponent, Byte.MaxValue);
isVisibleField?.SetValue(RoomOptionsComponent, true);
isOpenField?.SetValue(RoomOptionsComponent, true);
}
}
}
else { Instance.StartCoroutine(Instance.AntiBan()); }
}
}
#region Main GUI
private void OnGUI()
private void OnGUI()
{
GUI.skin = GUI.skin ?? new GUISkin();
UpdateStyles();
Expand Down Expand Up @@ -559,7 +591,6 @@ public bool HasPlayerTouchedLiquid(Photon.Realtime.Player player)
}
private IEnumerator AntiBan()
{

if (!PhotonNetwork.CurrentRoom.CustomProperties["gameMode"].ToString().Contains("MODDED"))
{
ExecuteCloudScriptRequest executeCloudScriptRequest = new ExecuteCloudScriptRequest();
Expand Down
Loading

0 comments on commit d08b904

Please sign in to comment.