Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Roblox Classic Valuables v1.2.7
roblox_valuables.dll
Decompiled a year agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using REPOLib.Modules; using UnityEngine; using roblox_valuables; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("Autodesk.Fbx")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("FbxBuildTestAssets")] [assembly: IgnoresAccessChecksTo("Klattersynth")] [assembly: IgnoresAccessChecksTo("Photon3Unity3D")] [assembly: IgnoresAccessChecksTo("PhotonChat")] [assembly: IgnoresAccessChecksTo("PhotonRealtime")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Utilities")] [assembly: IgnoresAccessChecksTo("PhotonVoice.API")] [assembly: IgnoresAccessChecksTo("PhotonVoice")] [assembly: IgnoresAccessChecksTo("PhotonVoice.PUN")] [assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime")] [assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime.Public")] [assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Attributes")] [assembly: IgnoresAccessChecksTo("Sirenix.Serialization.Config")] [assembly: IgnoresAccessChecksTo("Sirenix.Serialization")] [assembly: IgnoresAccessChecksTo("Sirenix.Utilities")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Formats.Fbx.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Postprocessing.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Antlr3.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Core")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Flow")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.State")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("websocket-sharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("kekprod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("roblox_valuables")] [assembly: AssemblyTitle("roblox_valuables")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class GiverItemSpawn : MonoBehaviour { public int grabNum = 3; public Sound success; public Sound failure; public GameObject itemspawn; private string val; private Vector3 pos; private Rigidbody rb; private PhysGrabObject physgrabobject; private PhotonView photonView; private string[] valuables = new string[10] { "rbx_BloxyCola", "rbx_Chezburger", "rbx_Pizza", "rbx_Teddy", "rbx_GravityCoil", "rbx_BCHat", "rbx_EpikDuck", "rbx_SillyGuitar", "rbx_MonsterMash", "rbx_RedRobloxCap" }; private void Start() { rb = ((Component)this).GetComponent<Rigidbody>(); physgrabobject = ((Component)this).GetComponent<PhysGrabObject>(); photonView = ((Component)this).GetComponent<PhotonView>(); } private ValuableObject getRandomValuable() { val = valuables[Random.Range(0, valuables.Length)]; return Valuables.GetValuableByName(val); } [PunRPC] public void PlaySound() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) int num = grabNum; int num2 = num; if (num2 > 0) { success.Play(pos, 1f, 1f, 1f, 1f); } else { failure.Play(pos, 1f, 1f, 1f, 1f); } } private void HandleSound() { if (SemiFunc.IsMultiplayer()) { if (SemiFunc.IsMasterClient()) { photonView.RPC("PlaySound", (RpcTarget)0, Array.Empty<object>()); } } else { PlaySound(); } } public void OnGrab() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) pos = itemspawn.transform.position; ValuableObject randomValuable = getRandomValuable(); if ((Object)(object)randomValuable != (Object)null && grabNum > 0) { Valuables.SpawnValuable(randomValuable, pos, Random.rotation); grabNum--; } HandleSound(); } } public class GunVendingMachine : MonoBehaviour { public struct weaponStats { public int Chance; public bool Enabled; public weaponStats(int chance, bool enabled) { Chance = chance; Enabled = enabled; } } public GameObject itemspawn; public Sound success; public Sound failure; private PhotonView photonView; private PhysGrabObject physgrabobject; private Vector3 pos; private string[] weaponnames = new string[3] { "Shotgun", "Handgun", "Tranq" }; private Dictionary<string, weaponStats> weapons = new Dictionary<string, weaponStats> { ["Shotgun"] = new weaponStats(8, enabled: false), ["Handgun"] = new weaponStats(6, enabled: false), ["Tranq"] = new weaponStats(10, enabled: false) }; private void Start() { photonView = ((Component)this).GetComponent<PhotonView>(); physgrabobject = ((Component)this).GetComponent<PhysGrabObject>(); } private void Update() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (physgrabobject.grabbed) { pos = itemspawn.transform.position; } } [PunRPC] public void PlaySound(string soundName, Vector3 pos) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) Sound soundByName = GetSoundByName(soundName); soundByName.Play(pos, 1f, 1f, 1f, 1f); } private void HandleSound(string soundName, Vector3 pos) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMultiplayer()) { if (SemiFunc.IsMasterClient()) { photonView.RPC("PlaySound", (RpcTarget)0, new object[2] { soundName, pos }); } } else { PlaySound(soundName, pos); } } public void OnBreak() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (!(Random.value < 0.3f)) { return; } _ = pos; if (true) { string text = weaponnames[Random.Range(0, weaponnames.Length)]; Item val = default(Item); if (Items.TryGetItemThatContainsName(text, ref val)) { GameObject val2 = Items.SpawnItem(val, pos, Random.rotation); val2.GetComponent<Rigidbody>().AddForce(Random.insideUnitSphere * 4f, (ForceMode)1); } } } private void SpawnWeapon(string weapon) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Item val = default(Item); if (Items.TryGetItemThatContainsName(weapon, ref val)) { Items.SpawnItem(val, pos, Quaternion.identity); HandleSound("success", pos); } } public void CheckChancesToSpawnWeapon(string weapon) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) pos = itemspawn.transform.position; weaponStats value = weapons[weapon]; if (!value.Enabled) { int chance = weapons[weapon].Chance; if (Random.Range(0, chance) == 0) { value.Enabled = true; weapons[weapon] = value; SpawnWeapon(weapon); MonoBehaviour.print((object)$"{weapon} dropped from vending machine. (1 / {weapons[weapon].Chance} chance!)"); return; } } HandleSound("failure", pos); value.Enabled = true; weapons[weapon] = value; } private Sound GetSoundByName(string soundName) { if (soundName == "success") { return success; } if (soundName == "failure") { return failure; } return null; } } public class MonsterMash : MonoBehaviour { public Sound sound; public int chance = 10; public float force = 2f; public float torque = 5f; public float fadeIn = 0.1f; public float fadeOut = 2f; private PhysGrabObject physgrabobject; private Rigidbody rb; private bool grabbed; private void Start() { physgrabobject = ((Component)this).GetComponent<PhysGrabObject>(); rb = ((Component)this).GetComponent<Rigidbody>(); } private void Update() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)rb != (Object)null)) { return; } sound.PlayLoop(grabbed, fadeIn, fadeOut, 1f); if (physgrabobject.grabbed) { if (Random.Range(0, 100) < chance) { rb.AddForce(Random.insideUnitSphere * force, (ForceMode)1); rb.AddTorque(Random.insideUnitSphere * torque, (ForceMode)1); } if (!grabbed) { grabbed = true; } } else { grabbed = false; } } } public class PickSound : MonoBehaviour { private PhysGrabObject physgrabobject; private PhotonView photonView; public Sound sound; private bool grabbed; private void Start() { physgrabobject = ((Component)this).GetComponent<PhysGrabObject>(); photonView = ((Component)this).GetComponent<PhotonView>(); } [PunRPC] public void PlaySound(Vector3 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) sound.Play(pos, 1f, 1f, 1f, 1f); global::roblox_valuables.roblox_valuables.Logger.LogInfo((object)"playing"); } private void HandleSound(Vector3 pos) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMultiplayer()) { if (SemiFunc.IsMasterClient()) { photonView.RPC("PlaySound", (RpcTarget)0, new object[1] { pos }); } } else { PlaySound(pos); } } private void Update() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (physgrabobject.grabbed) { if (!grabbed) { HandleSound(physgrabobject.centerPoint); grabbed = true; } } else { grabbed = false; } } } public class RocketLauncher : MonoBehaviour { [CompilerGenerated] private sealed class <WaitToggle>d__17 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public RocketLauncher <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitToggle>d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(<>4__this.weaponCooldown); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.toggled = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public float weaponCooldown = 3.5f; public float rocketSpeed = 2f; public float batteryDrain = 25f; public Transform rocketSpawnpoint; public GameObject rocket; public BoxCollider box; private ItemToggle itemToggle; private ItemBattery itemBattery; private PhysGrabObject physGrabObject; private PhotonView photonView; private bool prevToggleState; private bool toggled; private Vector3 pos; private void Start() { itemToggle = ((Component)this).GetComponent<ItemToggle>(); physGrabObject = ((Component)this).GetComponent<PhysGrabObject>(); itemBattery = ((Component)this).GetComponent<ItemBattery>(); photonView = ((Component)this).GetComponent<PhotonView>(); } private void Update() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (physGrabObject.grabbed || physGrabObject.grabbedLocal) { if (!(itemBattery.batteryLife <= 0f)) { Quaternion val = Quaternion.Euler(0f, 0f, 0f); Quaternion val2 = Quaternion.Euler(0f, 0f, 0f); physGrabObject.TurnXYZ(val, Quaternion.identity, val2); ((Collider)box).isTrigger = true; if (itemToggle.toggleState != prevToggleState && itemToggle.toggleState && !toggled) { toggled = true; itemToggle.toggleState = false; ((MonoBehaviour)this).StartCoroutine(WaitToggle()); shootRocket(); } } } else { ((Collider)box).isTrigger = false; } } private void shootRocket() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) Quaternion val = Quaternion.LookRotation(rocketSpawnpoint.forward) * Quaternion.Euler(0f, -90f, 0f); Vector3 position = ((Component)rocketSpawnpoint).transform.position; GameObject val2 = NetworkPrefabs.SpawnNetworkPrefab("rbx_RocketPrefab", position, val, (byte)0, (object[])null); RocketProjectile component = val2.GetComponent<RocketProjectile>(); component.InitialRocketFire(((Component)rocketSpawnpoint).transform.forward, rocketSpeed); itemBattery.batteryLife = Mathf.Clamp(itemBattery.batteryLife - batteryDrain, 0f, 100f); } private void OnPhotonInstantiate(PhotonMessageInfo info) { global::roblox_valuables.roblox_valuables.Logger.LogInfo((object)"onphotoninstantiate"); } [IteratorStateMachine(typeof(<WaitToggle>d__17))] private IEnumerator WaitToggle() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitToggle>d__17(0) { <>4__this = this }; } } public class RocketProjectile : MonoBehaviour { private Rigidbody rb; private ParticleScriptExplosion particleScriptExplosion; private PhotonView photonView; public Sound audio; private void Awake() { rb = ((Component)this).GetComponent<Rigidbody>(); particleScriptExplosion = ((Component)this).GetComponent<ParticleScriptExplosion>(); photonView = ((Component)this).GetComponent<PhotonView>(); } [PunRPC] private void SendRocket(Vector3 pos, Vector3 forward, float rocketSpeed) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) audio.Play(pos, 1f, 1f, 1f, 1f); rb.velocity = forward * rocketSpeed; } public void InitialRocketFire(Vector3 forward, float rocketSpeed) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMultiplayer()) { if (SemiFunc.IsMasterClient()) { photonView.RPC("SendRocket", (RpcTarget)0, new object[3] { ((Component)rb).transform.position, forward, rocketSpeed }); } } else { SendRocket(((Component)rb).transform.position, forward, rocketSpeed); } } private void OnCollisionEnter(Collision collision) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (!collision.collider.isTrigger) { particleScriptExplosion.Spawn(((Component)rb).transform.position, 0.7f, 50, 75, 1f, false, false, 1f); Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class ZombieStaff : Trap { public Sound sound; private Rigidbody rb; private bool grabbedPrev; public override void Start() { ((Trap)this).Start(); rb = ((Component)this).GetComponent<Rigidbody>(); } public override void Update() { ((Trap)this).Update(); if (!base.trapActive) { if (base.physGrabObject.grabbed && !grabbedPrev) { grabbedPrev = true; } if (base.trapStart && grabbedPrev && !base.trapTriggered) { OnBreak(); } } } [PunRPC] public void PlaySound(Vector3 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) sound.Play(pos, 1f, 1f, 1f, 1f); } private void HandleSound(Vector3 pos) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMultiplayer()) { if (SemiFunc.IsMasterClient()) { base.photonView.RPC("PlaySound", (RpcTarget)0, new object[1] { pos }); } } else { PlaySound(pos); } } private void OnBreak() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) base.trapActive = true; base.trapTriggered = true; base.enemyInvestigate = true; base.enemyInvestigateRange = 40f; HandleSound(base.physGrabObject.centerPoint); GameDirector.instance.CameraImpact.ShakeDistance(3f, 6f, 12f, ((Component)rb).transform.position, 2f); } public void TrapStop() { base.trapActive = false; base.trapStart = false; base.trapTriggered = false; } } namespace roblox_valuables { public class Paths { public static string path; public static AssetBundle bundle; } [BepInPlugin("kekprod.roblox_valuables", "roblox_valuables", "1.2.7")] public class roblox_valuables : BaseUnityPlugin { private string[] valuables = new string[21] { "Giver", "OverseerArmor", "SpawnPoint", "Chezburger", "Zombie", "GravityCoil", "BloxyCola", "Pumpkin", "Dog", "BCHat", "Cake", "MonsterMash", "Pizza", "EpikDuck", "Teddy", "SillyGuitar", "Flag", "ZombieStaff", "RedRobloxCap", "Teapot", "GunVendingMachine" }; private string[] items = new string[1] { "RocketLauncher" }; internal static roblox_valuables Instance { get; private set; } internal static ManualLogSource Logger => Instance._logger; private ManualLogSource _logger => ((BaseUnityPlugin)this).Logger; internal Harmony? Harmony { get; set; } private void Awake() { Instance = this; Paths.path = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "assets", "roblox_items"); List<string> list = new List<string> { "Valuables - Generic" }; Paths.bundle = AssetBundle.LoadFromFile(Paths.path); string[] array = valuables; foreach (string text in array) { GameObject val = Paths.bundle.LoadAsset<GameObject>("Valuable rbx_" + text); Valuables.RegisterValuable(val, list); Logger.LogInfo((object)("roblox_valuables: " + text)); } string[] array2 = items; foreach (string text2 in array2) { Item val2 = Paths.bundle.LoadAsset<Item>("Item Gun rbx_RocketLauncher"); Items.RegisterItem(val2); Logger.LogInfo((object)("roblox_valuables: " + text2)); } GameObject val3 = Paths.bundle.LoadAsset<GameObject>("rbx_RocketPrefab"); NetworkPrefabs.RegisterNetworkPrefab(val3); Logger.LogInfo((object)"roblox_valuables: rbx_RocketPrefab"); ((Component)this).gameObject.transform.parent = null; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; Patch(); Logger.LogInfo((object)$"{((BaseUnityPlugin)this).Info.Metadata.GUID} v{((BaseUnityPlugin)this).Info.Metadata.Version} is ready!!!!!"); } internal void Patch() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0026: Expected O, but got Unknown if (Harmony == null) { Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID); Harmony val2 = val; Harmony = val; } Harmony.PatchAll(); } internal void Unpatch() { Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } } } }