using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using ExitGames.Client.Photon;
using HarmonyLib;
using Photon.Pun;
using Photon.Realtime;
using TMPro;
using UnityEngine;
using Zorro.Core.CLI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("TipeMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TipeMod")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("29fd7c0e-6df8-4099-8c9b-8c00605cc917")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace TipeMod;
public static class HostPatch
{
[HarmonyPatch(typeof(MainMenuHandler), "OnCreatedRoom")]
public static class MainMenuHandler_CreateRoom_Patch
{
public static void Postfix()
{
Debug.Log((object)"Making room private cos yk, mods");
PhotonNetwork.CurrentRoom.IsVisible = false;
Hashtable customProperties = ((RoomInfo)PhotonNetwork.CurrentRoom).CustomProperties;
((Dictionary<object, object>)(object)customProperties).Add((object)"Tipe", (object)"Modded Room");
}
}
}
public static class DebugUIHandlerPatch
{
[HarmonyPatch(typeof(DebugUIHandler), "Update")]
public static class DebugUIHandler_Update_Patch
{
public static void Postfix(DebugUIHandler __instance)
{
ToggleVisibility(__instance);
}
}
private static void ToggleVisibility(DebugUIHandler instance)
{
if (Input.GetKeyDown((KeyCode)96) && ((Dictionary<object, object>)(object)((RoomInfo)PhotonNetwork.CurrentRoom).CustomProperties).ContainsKey((object)"Tipe"))
{
if (instance.IsOpen)
{
instance.Hide();
}
else
{
instance.Show();
}
}
}
}
internal class TipeCommands
{
[ConsoleCommand]
public static void GetStuff()
{
GameObject[] array = Resources.LoadAll<GameObject>("");
for (int i = 0; i < array.Length; i++)
{
Debug.Log((object)((Object)array[i]).name);
}
}
[ConsoleCommand]
public static void Jump()
{
Player[] array = Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
array[i].refs.controller.TryJump();
}
}
[ConsoleCommand]
public static void KillPlayers()
{
Player[] array = Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
array[i].RPCA_PlayerDie();
}
}
[ConsoleCommand]
public static void KillOthers()
{
Player[] array = Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
if (!array[i].IsLocal)
{
array[i].RPCA_PlayerDie();
}
}
}
[ConsoleCommand]
public static void RagdollPlayers(float HowLong)
{
Player[] array = Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
array[i].refs.view.RPC("RPCA_Fall", (RpcTarget)5, new object[1] { HowLong });
}
}
[ConsoleCommand]
public static void RagdollOthers(float HowLong)
{
Player[] array = Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
if (!array[i].IsLocal)
{
array[i].refs.view.RPC("RPCA_Fall", (RpcTarget)5, new object[1] { HowLong });
}
}
}
[ConsoleCommand]
public static void Revive()
{
Player[] array = Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
array[i].CallRevive();
}
}
[ConsoleCommand]
public static void ReviveMe()
{
Player.localPlayer.CallRevive();
}
[ConsoleCommand]
public static void Slap()
{
MonsterSpawner.SpawnMonster("BigSlap");
}
[ConsoleCommand]
public static void Items(Item item, int Amount)
{
for (int i = 0; i < Amount; i++)
{
Item.SpawnItem(item);
}
}
[ConsoleCommand]
public static void Monsters(string Monster, int Amount)
{
for (int i = 0; i < Amount; i++)
{
MonsterSpawner.SpawnMonster(Monster);
}
}
[ConsoleCommand]
public static void GetFace()
{
PlayerVisor visor = Player.localPlayer.refs.visor;
Debug.Log((object)$"VisorColor: {visor.hue.Value}");
Debug.Log((object)$"FaceText: {((TMP_Text)visor.visorFaceText).text}");
Debug.Log((object)$"FaceRotation: {visor.FaceRotation}");
Debug.Log((object)$"FaceSize: {visor.FaceSize}");
Debug.Log((object)$"FaceColorIndex: {visor.visorColorIndex}");
}
}
[BepInPlugin("Tipe.TipeMod", "TipeMod", "4.0.0")]
public class TipeMod : BaseUnityPlugin
{
public const string pluginGuid = "Tipe.TipeMod";
public const string pluginName = "TipeMod";
public const string pluginVersion = "4.0.0";
internal static ManualLogSource Logger;
private void Awake()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"I exist wow!");
Harmony val = new Harmony("Tipe.TipeMod");
val.PatchAll();
}
}