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 NoseMod v1.0.2
BepInEx/plugins/Nose.dll
Decompiled 2 years agousing System; using System.Collections; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using GameNetcodeStuff; using HarmonyLib; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Nose")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Nose")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("93dcefb8-d370-4584-a2b3-0e9cbef74795")] [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 Nose; [BepInPlugin("duviz.duviz.nose", "nose", "0.1")] public class NoseMod : BaseUnityPlugin { public const string pluginGuid = "duviz.duviz.nose"; public const string pluginName = "nose"; public const string pluginVersion = "0.1"; public static bool cheats; public static bool isPlayerDead; public static bool F2; public static bool F3; public static bool F4; public static bool F5; public static bool F6; public static bool Noclip; public static bool CarryHack; public static bool isAdmin; public static bool putojumpscaredeloscojonesmevoyasuicidarporfavor; public static float MyCharacterControllerRadius; public static Vector3 PPos; public static GameObject P; public static int Mode; public static string[] tool = new string[4]; public static float controlsTimer; public static bool Jumpscare; public static bool audioscare; public static int alpha; public static float jumpscaretimer; public static float alphatimer; public static float timertojumpscare; public static Texture2D JUMPSCAREIMAGE; private static NoseMod instance; public static AudioClip Jumpscareaudio; public static string[] QuestsText = new string[3]; public static int[] QuestsSecs = new int[3]; public static bool Activequest; public static int Selectedquest; public static float QuestSeconds; public static float QuestTimer; private GUIStyle guiStyle = new GUIStyle(); public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) Harmony val = new Harmony("duviz.duviz.nose"); for (int i = 0; i < 1; i++) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Esta vaina funciona gente"); } InputAction val2 = new InputAction((string)null, (InputActionType)0, "<Keyboard>/F1", (string)null, (string)null, (string)null); val2.performed += delegate { ToggleCheats(); }; val2.Enable(); InputAction val3 = new InputAction((string)null, (InputActionType)0, "<Keyboard>/F2", (string)null, (string)null, (string)null); val3.performed += delegate { SpawnEnemy(); }; val3.Enable(); InputAction val4 = new InputAction((string)null, (InputActionType)0, "<Keyboard>/F3", (string)null, (string)null, (string)null); val4.performed += delegate { SpawnEnemyOutside(); }; val4.Enable(); InputAction val5 = new InputAction((string)null, (InputActionType)0, "<Keyboard>/F4", (string)null, (string)null, (string)null); val5.performed += delegate { ClearEnemies(1); }; val5.Enable(); InputAction val6 = new InputAction((string)null, (InputActionType)0, "<Keyboard>/F5", (string)null, (string)null, (string)null); val6.performed += delegate { ClearEnemies(2); }; val6.Enable(); InputAction val7 = new InputAction((string)null, (InputActionType)0, "<Keyboard>/F6", (string)null, (string)null, (string)null); val7.performed += delegate { ClearEnemies(3); }; val7.Enable(); val.PatchAll(typeof(PlayerCheats)); val.PatchAll(typeof(HUDCheats)); val.PatchAll(typeof(RoundManagerCheats)); guiStyle.alignment = (TextAnchor)8; guiStyle.normal.textColor = Color.white; guiStyle.fontSize = 20; instance = this; QuestsText[0] = "Enter the building"; QuestsText[1] = "Go to the ship"; QuestsText[2] = "Get a two-handed item"; QuestsSecs[0] = 30; QuestsSecs[1] = 30; QuestsSecs[2] = 30; LoadImage(); ((MonoBehaviour)this).StartCoroutine(DownloadAudio("https://pene.duviz.xyz/Pngs/mp3.mp3")); } public void LoadImage() { ((MonoBehaviour)this).StartCoroutine(CargarImagenDesdeURL($"https://pene.duviz.xyz/Pngs/{Random.Range(1, 35)}.png")); } public void Update() { if (putojumpscaredeloscojonesmevoyasuicidarporfavor) { putojumpscaredeloscojonesmevoyasuicidarporfavor = false; LoadImage(); } } private IEnumerator CargarImagenDesdeURL(string url) { UnityWebRequest webRequest = UnityWebRequestTexture.GetTexture(url); try { yield return webRequest.SendWebRequest(); if ((int)webRequest.result == 1) { Texture2D textura = DownloadHandlerTexture.GetContent(webRequest); JUMPSCAREIMAGE = textura; } else { Debug.LogError((object)("Error al cargar la imagen: " + webRequest.error)); } } finally { ((IDisposable)webRequest)?.Dispose(); } } private IEnumerator DownloadAudio(string url) { UnityWebRequest webRequest = UnityWebRequestMultimedia.GetAudioClip(url, (AudioType)13); try { yield return webRequest.SendWebRequest(); if ((int)webRequest.result == 1) { AudioClip audioClip = DownloadHandlerAudioClip.GetContent(webRequest); Jumpscareaudio = audioClip; } else { Debug.LogError((object)("Error al descargar el archivo de audio: " + webRequest.error)); } } finally { ((IDisposable)webRequest)?.Dispose(); } } public void OnGUI() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (Activequest) { string[] array = new string[1] { QuestsText[Selectedquest] + ". " + QuestSeconds }; float num = 300f; float num2 = (float)tool.Length * 30f; float num3 = (float)Screen.width - num - 10f; float num4 = (float)Screen.height - num2 + 90f; for (int i = 0; i < array.Length; i++) { GUI.Label(new Rect(num3, num4 + (float)(-i) * 30f, num, 30f), array[i], guiStyle); } } if (Jumpscare) { Color color = default(Color); ((Color)(ref color))..ctor(1f, 1f, 1f, (float)alpha / 255f); Rect val = default(Rect); ((Rect)(ref val))..ctor(0f, 0f, (float)Screen.width, (float)Screen.height); GUI.color = color; GUI.DrawTexture(val, (Texture)(object)JUMPSCAREIMAGE); GUI.color = Color.white; } } private void ToggleCheats() { if (isAdmin) { cheats = !cheats; } } private void SpawnEnemy() { F2 = true; } private void SpawnEnemyOutside() { F3 = true; } private void ClearEnemies(int type) { if (type == 1) { F4 = true; } if (type == 2) { F5 = true; } if (type == 3) { F6 = true; } } } [HarmonyPatch(typeof(PlayerControllerB))] [HarmonyPatch("Update")] public class PlayerCheats { [HarmonyPostfix] public static void Update(PlayerControllerB __instance) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) if ((!((NetworkBehaviour)__instance).IsOwner || !__instance.isPlayerControlled || (((NetworkBehaviour)__instance).IsServer && !__instance.isHostPlayerObject)) && !__instance.isTestingPlayer) { return; } NoseMod.PPos = ((Component)__instance).transform.position; NoseMod.PPos = __instance.cameraContainerTransform.position; NoseMod.isAdmin = ((NetworkBehaviour)__instance).IsHost; if (__instance.isPlayerDead) { Camera[] array = Object.FindObjectsOfType<Camera>(); Camera[] array2 = array; foreach (Camera val in array2) { if (((Object)((Component)val).transform).name == "SpectateCamera") { NoseMod.PPos = ((Component)val).transform.position; } } } if (NoseMod.MyCharacterControllerRadius == 0f) { CharacterController component = ((Component)__instance).GetComponent<CharacterController>(); NoseMod.MyCharacterControllerRadius = component.radius; } if (NoseMod.CarryHack) { __instance.twoHanded = false; ((Behaviour)HUDManager.Instance.holdingTwoHandedItem).enabled = false; __instance.carryWeight = 1f; NoseMod.isPlayerDead = __instance.isPlayerDead; } else { ((Behaviour)HUDManager.Instance.weightCounter).enabled = true; } if (NoseMod.Noclip) { StartOfRound.Instance.allowLocalPlayerDeath = false; CharacterController component2 = ((Component)__instance).GetComponent<CharacterController>(); Rigidbody component3 = ((Component)__instance).GetComponent<Rigidbody>(); ((Collider)component2).enabled = !NoseMod.Noclip; __instance.isInHangarShipRoom = false; component2.radius = float.PositiveInfinity; component3.useGravity = false; component3.isKinematic = true; __instance.ResetFallGravity(); component3.velocity = Vector3.zero; float num = 20f; if (((ButtonControl)Keyboard.current.leftShiftKey).isPressed) { num *= 2f; } Vector2 val2 = (((ButtonControl)Keyboard.current.wKey).isPressed ? Vector2.up : (((ButtonControl)Keyboard.current.sKey).isPressed ? Vector2.down : (((ButtonControl)Keyboard.current.aKey).isPressed ? Vector2.left : (((ButtonControl)Keyboard.current.dKey).isPressed ? Vector2.right : Vector2.zero)))); float num2 = 0f; if (((ButtonControl)Keyboard.current.spaceKey).isPressed) { num2 = 0.75f; } else if (((ButtonControl)Keyboard.current.leftCtrlKey).isPressed) { num2 = -0.75f; } Vector3 val3 = new Vector3(val2.x, num2, val2.y) * num * Time.deltaTime; ((Component)__instance).transform.Translate(val3); } else { CharacterController component4 = ((Component)__instance).GetComponent<CharacterController>(); ((Collider)component4).enabled = true; component4.radius = NoseMod.MyCharacterControllerRadius; StartOfRound.Instance.allowLocalPlayerDeath = true; } if (StartOfRound.Instance.allowLocalPlayerDeath && StartOfRound.Instance.shipHasLanded) { NoseMod.jumpscaretimer += Time.deltaTime; } if (NoseMod.timertojumpscare == 0f) { NoseMod.timertojumpscare = Random.Range(5, 6); } if (NoseMod.jumpscaretimer >= NoseMod.timertojumpscare - 0.3f && !NoseMod.audioscare) { AudioSource val4 = ((Component)__instance).gameObject.AddComponent<AudioSource>(); val4.clip = NoseMod.Jumpscareaudio; val4.Play(); NoseMod.audioscare = true; } if (NoseMod.jumpscaretimer >= NoseMod.timertojumpscare) { NoseMod.Jumpscare = true; NoseMod.jumpscaretimer = 0f; NoseMod.alphatimer = 0f; NoseMod.alpha = 255; NoseMod.timertojumpscare = Random.Range(20f, 200f); __instance.JumpToFearLevel(5f, false); if (StartOfRound.Instance.allowLocalPlayerDeath) { NoseMod.Activequest = true; NoseMod.Selectedquest = Random.Range(0, NoseMod.QuestsText.Length); NoseMod.QuestSeconds = NoseMod.QuestsSecs[NoseMod.Selectedquest]; } } if (NoseMod.Jumpscare) { NoseMod.alphatimer += Time.deltaTime; if (NoseMod.alphatimer >= 0.5f) { NoseMod.alpha--; if (NoseMod.alpha == 0) { NoseMod.Jumpscare = false; NoseMod.putojumpscaredeloscojonesmevoyasuicidarporfavor = true; NoseMod.audioscare = false; } } else { NoseMod.alpha = 255; } } if (NoseMod.Activequest && !__instance.isPlayerDead) { NoseMod.QuestTimer += Time.deltaTime; if (NoseMod.QuestTimer >= 1f) { NoseMod.QuestTimer = 0f; NoseMod.QuestSeconds -= 1f; if (NoseMod.QuestSeconds <= 0f) { __instance.KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0); NoseMod.Activequest = false; } } } if (NoseMod.Activequest && !__instance.isPlayerDead) { if (NoseMod.Selectedquest == 0 && __instance.isInsideFactory) { NoseMod.Activequest = false; } if (NoseMod.Selectedquest == 1 && __instance.isInElevator) { NoseMod.Activequest = false; } if (NoseMod.Selectedquest == 2 && __instance.twoHanded) { NoseMod.Activequest = false; } } } } [HarmonyPatch(typeof(HUDManager))] [HarmonyPatch("Update")] public class HUDCheats { [HarmonyPostfix] public static void Update(HUDManager __instance) { if (NoseMod.cheats) { NoseMod.controlsTimer += Time.deltaTime; if (NoseMod.cheats) { } if (NoseMod.Mode == 0) { NoseMod.tool[0] = "F1: Cheats"; NoseMod.tool[1] = "F2: Enemy inside"; NoseMod.tool[2] = "F3: Enemy outside"; NoseMod.tool[3] = "F4: Spawn shotgun"; __instance.ChangeControlTipMultiple(NoseMod.tool, false, (Item)null); } if (NoseMod.Mode == 1) { NoseMod.tool[0] = "F1: Cheats"; NoseMod.tool[1] = "F2: Spawn ammo"; NoseMod.tool[2] = "F3: Teleport to building"; NoseMod.tool[3] = "F4: Noclip"; __instance.ChangeControlTipMultiple(NoseMod.tool, false, (Item)null); } if (NoseMod.Mode == 2) { NoseMod.tool[0] = "F1: Cheats"; NoseMod.tool[1] = "F2: Spawn flashlight"; NoseMod.tool[2] = "F3: Spawn walkie-talkie"; NoseMod.tool[3] = "F4: Spawn shovel"; __instance.ChangeControlTipMultiple(NoseMod.tool, false, (Item)null); } if (NoseMod.Mode == 3) { NoseMod.tool[0] = "F1: Cheats"; NoseMod.tool[1] = "F2: Carryhack"; NoseMod.tool[2] = "F3: "; NoseMod.tool[3] = "F4: "; __instance.ChangeControlTipMultiple(NoseMod.tool, false, (Item)null); } } } } [HarmonyPatch(typeof(RoundManager))] [HarmonyPatch("Update")] public class RoundManagerCheats { [HarmonyPostfix] public static void Update(RoundManager __instance) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) if (!NoseMod.cheats) { return; } if (NoseMod.Mode == 0) { if (NoseMod.F2) { NoseMod.F2 = false; __instance.SpawnEnemyOnServer(__instance.allEnemyVents[Random.Range(0, __instance.allEnemyVents.Length)].floorNode.position, __instance.allEnemyVents[0].floorNode.eulerAngles.y, -1); HUDManager.Instance.DisplayTip("Nose", "Spawned a random enemy inside", false, false, "LC_Tip1"); } if (NoseMod.F3) { NoseMod.F3 = false; __instance.SpawnEnemyOnServer(GameObject.FindGameObjectsWithTag("OutsideAINode")[Random.Range(0, GameObject.FindGameObjectsWithTag("OutsideAINode").Length - 1)].transform.position, __instance.allEnemyVents[0].floorNode.eulerAngles.y, -3); HUDManager.Instance.DisplayTip("Nose", "Spawned a random enemy outside", false, false, "LC_Tip1"); } if (NoseMod.F4) { NoseMod.F4 = false; for (int i = 0; i < StartOfRound.Instance.allItemsList.itemsList.Count; i++) { Item val = StartOfRound.Instance.allItemsList.itemsList[i]; MonoBehaviour.print((object)(val.itemName + "/" + i)); if (val.itemName == "Shotgun") { GameObject val2 = Object.Instantiate<GameObject>(val.spawnPrefab, NoseMod.PPos, Quaternion.identity, StartOfRound.Instance.propsContainer); val2.GetComponent<GrabbableObject>().fallTime = 0f; int scrapValue = (int)((float)Random.Range(val2.GetComponent<GrabbableObject>().itemProperties.minValue + 25, val2.GetComponent<GrabbableObject>().itemProperties.maxValue + 35) * RoundManager.Instance.scrapValueMultiplier); val2.GetComponent<GrabbableObject>().SetScrapValue(scrapValue); val2.GetComponent<NetworkObject>().Spawn(false); } } HUDManager.Instance.DisplayTip("Nose", "Spawned shotgun", false, false, "LC_Tip1"); } if (NoseMod.F5) { NoseMod.F5 = false; NoseMod.Mode++; } } if (NoseMod.Mode == 1) { if (NoseMod.F2) { NoseMod.F2 = false; for (int j = 0; j < StartOfRound.Instance.allItemsList.itemsList.Count; j++) { Item val3 = StartOfRound.Instance.allItemsList.itemsList[j]; MonoBehaviour.print((object)(val3.itemName + "/" + j)); if (val3.itemName == "Ammo") { GameObject val4 = Object.Instantiate<GameObject>(val3.spawnPrefab, NoseMod.PPos, Quaternion.identity, StartOfRound.Instance.propsContainer); val4.GetComponent<GrabbableObject>().fallTime = 0f; int scrapValue2 = (int)((float)Random.Range(val4.GetComponent<GrabbableObject>().itemProperties.minValue + 25, val4.GetComponent<GrabbableObject>().itemProperties.maxValue + 35) * RoundManager.Instance.scrapValueMultiplier); val4.GetComponent<GrabbableObject>().SetScrapValue(scrapValue2); val4.GetComponent<NetworkObject>().Spawn(false); } } HUDManager.Instance.DisplayTip("Nose", "Spawned ammo", false, false, "LC_Tip1"); } if (NoseMod.F3) { NoseMod.F3 = false; EntranceTeleport[] array = Object.FindObjectsOfType<EntranceTeleport>(false); foreach (EntranceTeleport val5 in array) { if (val5.entranceId == 0 && val5.isEntranceToBuilding) { val5.TeleportPlayer(); } } HUDManager.Instance.DisplayTip("Nose", "Teleported to building", false, false, "LC_Tip1"); } if (NoseMod.F4) { NoseMod.F4 = false; NoseMod.Noclip = !NoseMod.Noclip; HUDManager.Instance.DisplayTip("Nose", "Noclip toggled", false, false, "LC_Tip1"); } if (NoseMod.F5) { NoseMod.F5 = false; NoseMod.Mode++; } } if (NoseMod.Mode == 2) { if (NoseMod.F2) { NoseMod.F2 = false; for (int l = 0; l < StartOfRound.Instance.allItemsList.itemsList.Count; l++) { Item val6 = StartOfRound.Instance.allItemsList.itemsList[l]; MonoBehaviour.print((object)(val6.itemName + "/" + l)); if (val6.itemName == "Flashlight") { GameObject val7 = Object.Instantiate<GameObject>(val6.spawnPrefab, NoseMod.PPos, Quaternion.identity, StartOfRound.Instance.propsContainer); val7.GetComponent<GrabbableObject>().fallTime = 0f; int scrapValue3 = (int)((float)Random.Range(val7.GetComponent<GrabbableObject>().itemProperties.minValue + 25, val7.GetComponent<GrabbableObject>().itemProperties.maxValue + 35) * RoundManager.Instance.scrapValueMultiplier); val7.GetComponent<GrabbableObject>().SetScrapValue(scrapValue3); val7.GetComponent<NetworkObject>().Spawn(false); } } HUDManager.Instance.DisplayTip("Nose", "Spawned flashlight", false, false, "LC_Tip1"); } if (NoseMod.F3) { NoseMod.F3 = false; for (int m = 0; m < StartOfRound.Instance.allItemsList.itemsList.Count; m++) { Item val8 = StartOfRound.Instance.allItemsList.itemsList[m]; MonoBehaviour.print((object)(val8.itemName + "/" + m)); if (val8.itemName == "Walkie-talkie") { GameObject val9 = Object.Instantiate<GameObject>(val8.spawnPrefab, NoseMod.PPos, Quaternion.identity, StartOfRound.Instance.propsContainer); val9.GetComponent<GrabbableObject>().fallTime = 0f; int scrapValue4 = (int)((float)Random.Range(val9.GetComponent<GrabbableObject>().itemProperties.minValue + 25, val9.GetComponent<GrabbableObject>().itemProperties.maxValue + 35) * RoundManager.Instance.scrapValueMultiplier); val9.GetComponent<GrabbableObject>().SetScrapValue(scrapValue4); val9.GetComponent<NetworkObject>().Spawn(false); } } HUDManager.Instance.DisplayTip("Nose", "Spawned walkie-talkie", false, false, "LC_Tip1"); } if (NoseMod.F4) { NoseMod.F4 = false; for (int n = 0; n < StartOfRound.Instance.allItemsList.itemsList.Count; n++) { Item val10 = StartOfRound.Instance.allItemsList.itemsList[n]; MonoBehaviour.print((object)(val10.itemName + "/" + n)); if (val10.itemName == "Shovel") { GameObject val11 = Object.Instantiate<GameObject>(val10.spawnPrefab, NoseMod.PPos, Quaternion.identity, StartOfRound.Instance.propsContainer); val11.GetComponent<GrabbableObject>().fallTime = 0f; int scrapValue5 = (int)((float)Random.Range(val11.GetComponent<GrabbableObject>().itemProperties.minValue + 25, val11.GetComponent<GrabbableObject>().itemProperties.maxValue + 35) * RoundManager.Instance.scrapValueMultiplier); val11.GetComponent<GrabbableObject>().SetScrapValue(scrapValue5); val11.GetComponent<NetworkObject>().Spawn(false); } } HUDManager.Instance.DisplayTip("Nose", "Spawned shovel", false, false, "LC_Tip1"); } if (NoseMod.F5) { NoseMod.F5 = false; NoseMod.Mode++; } } if (NoseMod.Mode == 3) { if (NoseMod.F2) { NoseMod.F2 = false; NoseMod.CarryHack = !NoseMod.CarryHack; HUDManager.Instance.DisplayTip("Nose", "Carryhack toggled", false, false, "LC_Tip1"); } if (NoseMod.F5) { NoseMod.F5 = false; NoseMod.Mode = 0; } } } }