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 SlayersSillyStuff v0.0.11
SlayersSillyStuff.dll
Decompiled 6 months 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.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalLib.Modules; using Microsoft.CodeAnalysis; using SlayersSillyStuff.NetcodePatcher; using SlayersSillyStuff.Scrap; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SlayersSillyStuff")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Slayers Silly Stuff")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SlayersSillyStuff")] [assembly: AssemblyTitle("SlayersSillyStuff")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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; } } } namespace SlayersSillyStuff { public class IngameKeybinds : LcInputActions { [InputAction("<Keyboard>/R", Name = "FurbyMassButton")] public InputAction FurbyButton { get; set; } = null; } public class Networker : NetworkBehaviour { public static Networker Instance { get; private set; } public override void OnNetworkSpawn() { Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); if (!((NetworkBehaviour)this).IsServer) { } } [ServerRpc(RequireOwnership = false)] public void MoveItemServerRpc(Vector3 position, int newValue, ulong clientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1157311365u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); BytePacker.WriteValueBitPacked(val2, newValue); BytePacker.WriteValueBitPacked(val2, clientId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1157311365u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MoveItemClientRpc(position, newValue, clientId); } } } [ClientRpc] public void MoveItemClientRpc(Vector3 position, int newValue, ulong itemID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3685289889u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); BytePacker.WriteValueBitPacked(val2, newValue); BytePacker.WriteValueBitPacked(val2, itemID); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3685289889u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(itemID, out var value)) { Landmine.SpawnExplosion(position, true, 0f, 1f, 20, 1f, (GameObject)null, false); GameObject gameObject = ((Component)value).gameObject; gameObject.transform.position = position; Hmmmm hmmmm = default(Hmmmm); if (gameObject.TryGetComponent<Hmmmm>(ref hmmmm)) { ((GrabbableObject)hmmmm).SetScrapValue(newValue); ((GrabbableObject)hmmmm).targetFloorPosition = position; ((GrabbableObject)hmmmm).startFallingPosition = position; ((GrabbableObject)hmmmm).FallToGround(false, false, position); hmmmm.scanNodeProperties.scrapValue = newValue; } } } [ServerRpc(RequireOwnership = false)] public void hurtAllServerRpc(int playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1504757100u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1504757100u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerID]; PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val4 in allPlayerScripts) { if ((Object)(object)val4 == (Object)(object)val3) { val3.DamagePlayerFromOtherClientServerRpc(22, Vector3.forward, 0); } else { val4.DamagePlayerFromOtherClientServerRpc(5, Vector3.forward, Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val3)); } } } [ServerRpc(RequireOwnership = false)] public void hurtEveryEnemyServerRpc(int playerWhoHits) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4027168314u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoHits); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4027168314u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { spawnedEnemy.HitEnemyClientRpc(2, playerWhoHits, false, -1); } } [ServerRpc(RequireOwnership = false)] public void KillAllServerRpc(ulong itemID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(977293774u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, itemID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 977293774u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(itemID, out var value)) { return; } GameObject gameObject = ((Component)value).gameObject; Landmine.SpawnExplosion(gameObject.transform.position, true, 0f, 0f, 0, 1f, (GameObject)null, false); value.Despawn(true); foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { if (spawnedEnemy.isOutside) { continue; } try { Landmine.SpawnExplosion(((Component)spawnedEnemy).transform.position, true, 2f, 5f, 50, 0f, (GameObject)null, false); spawnedEnemy.KillEnemy(true); try { if (!spawnedEnemy.isEnemyDead) { ((Component)spawnedEnemy).GetComponent<NetworkObject>().Despawn(true); } } catch (Exception) { } } catch (Exception) { } } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val3 in allPlayerScripts) { if (val3.isInsideFactory) { killPlayerClientRpc(Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val3)); } } } [ClientRpc] public void killPlayerClientRpc(int playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1034668425u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerID); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1034668425u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerID]; Landmine.SpawnExplosion(((Component)val3).transform.position, true, 1f, 1f, 200, 1f, (GameObject)null, false); val3.KillPlayer(Vector3.up, true, (CauseOfDeath)0, 0, default(Vector3)); } } } [ServerRpc(RequireOwnership = false)] public void TPAllServerRpc(ulong itemID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1610337453u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, itemID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1610337453u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(itemID, out var value)) { return; } GameObject gameObject = ((Component)value).gameObject; Landmine.SpawnExplosion(gameObject.transform.position, true, 0f, 0f, 0, 1f, (GameObject)null, false); value.Despawn(true); foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { if (spawnedEnemy.isOutside) { continue; } try { spawnedEnemy.isOutside = true; spawnedEnemy.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); spawnedEnemy.serverPosition = RoundManager.Instance.outsideAINodes[Random.Range(0, RoundManager.Instance.outsideAINodes.Length)].transform.position; Transform val3 = spawnedEnemy.ChooseClosestNodeToPosition(spawnedEnemy.serverPosition, true, 0); if (Vector3.Magnitude(val3.position - spawnedEnemy.serverPosition) > 10f) { spawnedEnemy.serverPosition = val3.position; } ((Component)spawnedEnemy).transform.position = spawnedEnemy.serverPosition; spawnedEnemy.agent.Warp(spawnedEnemy.serverPosition); spawnedEnemy.SyncPositionToClients(); if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null) { spawnedEnemy.EnableEnemyMesh(!StartOfRound.Instance.hangarDoorsClosed || !GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom, false); } } catch (Exception) { } } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val4 in allPlayerScripts) { if (val4.isInsideFactory) { Vector3 position = RoundManager.Instance.outsideAINodes[Random.Range(0, RoundManager.Instance.outsideAINodes.Length)].transform.position; TeleportPlayerClientRPC(Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val4), position); } } } [ClientRpc] public void TeleportPlayerClientRPC(int playerID, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2249014279u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerID); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2249014279u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerID]; val3.TeleportPlayer(position, false, 0f, false, true); val3.isInsideFactory = false; val3.isInElevator = false; } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1157311365u, new RpcReceiveHandler(__rpc_handler_1157311365), "MoveItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(3685289889u, new RpcReceiveHandler(__rpc_handler_3685289889), "MoveItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(1504757100u, new RpcReceiveHandler(__rpc_handler_1504757100), "hurtAllServerRpc"); ((NetworkBehaviour)this).__registerRpc(4027168314u, new RpcReceiveHandler(__rpc_handler_4027168314), "hurtEveryEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(977293774u, new RpcReceiveHandler(__rpc_handler_977293774), "KillAllServerRpc"); ((NetworkBehaviour)this).__registerRpc(1034668425u, new RpcReceiveHandler(__rpc_handler_1034668425), "killPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1610337453u, new RpcReceiveHandler(__rpc_handler_1610337453), "TPAllServerRpc"); ((NetworkBehaviour)this).__registerRpc(2249014279u, new RpcReceiveHandler(__rpc_handler_2249014279), "TeleportPlayerClientRPC"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1157311365(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); int newValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newValue); ulong clientId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref clientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).MoveItemServerRpc(position, newValue, clientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3685289889(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); int newValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newValue); ulong itemID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).MoveItemClientRpc(position, newValue, itemID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1504757100(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).hurtAllServerRpc(playerID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4027168314(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerWhoHits = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHits); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).hurtEveryEnemyServerRpc(playerWhoHits); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_977293774(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong itemID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).KillAllServerRpc(itemID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1034668425(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).killPlayerClientRpc(playerID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1610337453(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong itemID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref itemID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).TPAllServerRpc(itemID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2249014279(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).TeleportPlayerClientRPC(playerID, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Networker"; } } [BepInPlugin("Slayer6409.SlayersSillyStuff", "SlayersSillyStuff", "0.0.11")] public class Plugin : BaseUnityPlugin { private const string modGUID = "Slayer6409.SlayersSillyStuff"; private const string modName = "SlayersSillyStuff"; private const string modVersion = "0.0.11"; public static GameObject NetworkerPrefab; private readonly Harmony harmony = new Harmony("Slayer6409.SlayersSillyStuff"); public static Item Hmmm; public static Item NuclearRemote; public static Item EvilRemote; public static Item FurbySword; public static Item LizziesScrap; public static ManualLogSource Log; public static ConfigFile BepInExConfig = null; public static AssetBundle LoadedAssets; public static IngameKeybinds AllKeybinds; public static Dictionary<string, LevelTypes> RegLevels = new Dictionary<string, LevelTypes> { { "Experimentation", (LevelTypes)4 }, { "Assurance", (LevelTypes)8 }, { "Vow", (LevelTypes)16 }, { "Offense", (LevelTypes)32 }, { "March", (LevelTypes)64 }, { "Rend", (LevelTypes)128 }, { "Dine", (LevelTypes)256 }, { "Titan", (LevelTypes)512 }, { "Adamance", (LevelTypes)2048 }, { "Artifice", (LevelTypes)4096 }, { "Embrion", (LevelTypes)8192 } }; private List<Item> AddedScrap = new List<Item>(); private void Awake() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin SlayersSillyStuff is loaded!"); NetcodeWeaver(); LoadedAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "slayerssillystuff")); NetworkerPrefab = LoadedAssets.LoadAsset<GameObject>("Networker"); NetworkerPrefab.AddComponent<Networker>(); BepInExConfig = new ConfigFile(Path.Combine(Paths.ConfigPath, "Slayers Silly Scrap.cfg"), true); LoadScrap(); AllKeybinds = new IngameKeybinds(); harmony.PatchAll(); } internal void LoadScrap() { //IL_0996: Unknown result type (might be due to invalid IL or missing references) Hmmm = LoadedAssets.LoadAsset<Item>("HmmmItem"); Hmmm.minValue = 110; Hmmm.maxValue = 350; Hmmmm hmmmm = Hmmm.spawnPrefab.AddComponent<Hmmmm>(); ((GrabbableObject)hmmmm).grabbable = true; ((GrabbableObject)hmmmm).grabbableToEnemies = true; ((GrabbableObject)hmmmm).itemProperties = Hmmm; AddedScrap.Add(Hmmm); NuclearRemote = LoadedAssets.LoadAsset<Item>("NuclearRemoteItem"); NuclearRemote.minValue = 110; NuclearRemote.maxValue = 350; NuclearRemote nuclearRemote = NuclearRemote.spawnPrefab.AddComponent<NuclearRemote>(); ((GrabbableObject)nuclearRemote).grabbable = true; ((GrabbableObject)nuclearRemote).grabbableToEnemies = true; ((GrabbableObject)nuclearRemote).itemProperties = NuclearRemote; AddedScrap.Add(NuclearRemote); EvilRemote = LoadedAssets.LoadAsset<Item>("EvilRemoteItem"); EvilRemote.minValue = 110; EvilRemote.maxValue = 350; EvilRemote evilRemote = EvilRemote.spawnPrefab.AddComponent<EvilRemote>(); ((GrabbableObject)evilRemote).grabbable = true; ((GrabbableObject)evilRemote).grabbableToEnemies = true; ((GrabbableObject)evilRemote).itemProperties = EvilRemote; AddedScrap.Add(EvilRemote); FurbySword = LoadedAssets.LoadAsset<Item>("FurbySwordItem"); FurbySword.minValue = 110; FurbySword.maxValue = 350; AddedScrap.Add(FurbySword); LizziesScrap = LoadedAssets.LoadAsset<Item>("LizziesScrapItem"); LizzieItem lizzieItem = LizziesScrap.spawnPrefab.AddComponent<LizzieItem>(); ((GrabbableObject)lizzieItem).grabbable = true; ((GrabbableObject)lizzieItem).grabbableToEnemies = true; ((GrabbableObject)lizzieItem).itemProperties = LizziesScrap; AddedScrap.Add(LizziesScrap); Dictionary<(string, string), int> dictionary = new Dictionary<(string, string), int> { { (Hmmm.itemName, "Default"), 12 }, { (Hmmm.itemName, "Experimentation"), 8 }, { (Hmmm.itemName, "Assurance"), 12 }, { (Hmmm.itemName, "Vow"), 11 }, { (Hmmm.itemName, "Offense"), 14 }, { (Hmmm.itemName, "March"), 18 }, { (Hmmm.itemName, "Rend"), 20 }, { (Hmmm.itemName, "Dine"), 22 }, { (Hmmm.itemName, "Titan"), 24 }, { (Hmmm.itemName, "Adamance"), 11 }, { (Hmmm.itemName, "Artifice"), 13 }, { (Hmmm.itemName, "Embrion"), 28 }, { (NuclearRemote.itemName, "Default"), 1 }, { (NuclearRemote.itemName, "Experimentation"), 0 }, { (NuclearRemote.itemName, "Assurance"), 0 }, { (NuclearRemote.itemName, "Vow"), 0 }, { (NuclearRemote.itemName, "Offense"), 0 }, { (NuclearRemote.itemName, "March"), 1 }, { (NuclearRemote.itemName, "Rend"), 1 }, { (NuclearRemote.itemName, "Dine"), 1 }, { (NuclearRemote.itemName, "Titan"), 2 }, { (NuclearRemote.itemName, "Adamance"), 2 }, { (NuclearRemote.itemName, "Artifice"), 1 }, { (NuclearRemote.itemName, "Embrion"), 3 }, { (EvilRemote.itemName, "Default"), 1 }, { (EvilRemote.itemName, "Experimentation"), 0 }, { (EvilRemote.itemName, "Assurance"), 0 }, { (EvilRemote.itemName, "Vow"), 0 }, { (EvilRemote.itemName, "Offense"), 0 }, { (EvilRemote.itemName, "March"), 1 }, { (EvilRemote.itemName, "Rend"), 1 }, { (EvilRemote.itemName, "Dine"), 1 }, { (EvilRemote.itemName, "Titan"), 2 }, { (EvilRemote.itemName, "Adamance"), 2 }, { (EvilRemote.itemName, "Artifice"), 1 }, { (EvilRemote.itemName, "Embrion"), 3 }, { (FurbySword.itemName, "Default"), 1 }, { (FurbySword.itemName, "Experimentation"), 0 }, { (FurbySword.itemName, "Assurance"), 0 }, { (FurbySword.itemName, "Vow"), 0 }, { (FurbySword.itemName, "Offense"), 0 }, { (FurbySword.itemName, "March"), 1 }, { (FurbySword.itemName, "Rend"), 1 }, { (FurbySword.itemName, "Dine"), 1 }, { (FurbySword.itemName, "Titan"), 2 }, { (FurbySword.itemName, "Adamance"), 2 }, { (FurbySword.itemName, "Artifice"), 1 }, { (FurbySword.itemName, "Embrion"), 3 }, { (LizziesScrap.itemName, "Default"), 1 }, { (LizziesScrap.itemName, "Experimentation"), 0 }, { (LizziesScrap.itemName, "Assurance"), 0 }, { (LizziesScrap.itemName, "Vow"), 0 }, { (LizziesScrap.itemName, "Offense"), 0 }, { (LizziesScrap.itemName, "March"), 1 }, { (LizziesScrap.itemName, "Rend"), 1 }, { (LizziesScrap.itemName, "Dine"), 1 }, { (LizziesScrap.itemName, "Titan"), 2 }, { (LizziesScrap.itemName, "Adamance"), 2 }, { (LizziesScrap.itemName, "Artifice"), 1 }, { (LizziesScrap.itemName, "Embrion"), 3 } }; foreach (Item item in AddedScrap) { NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab); Utilities.FixMixerGroups(item.spawnPrefab); } foreach (Item item2 in AddedScrap) { ConfigEntry<int> val = BepInExConfig.Bind<int>(item2.itemName + " Spawn rates", "Default", dictionary[(item2.itemName, "Default")], "Default spawn rate for all levels"); foreach (KeyValuePair<string, LevelTypes> regLevel in RegLevels) { ConfigEntry<int> val2 = BepInExConfig.Bind<int>(item2.itemName + " Spawn rates", regLevel.Key, dictionary[(item2.itemName, regLevel.Key)], "Sets how often " + item2.itemName + " spawns on " + regLevel.Key); Items.RegisterScrap(item2, val2.Value, regLevel.Value); } Items.RegisterScrap(item2, val.Value, (LevelTypes)(-1)); } } private static void NetcodeWeaver() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public class Consts { public const string Default = "Default"; public const string Experimentation = "Experimentation"; public const string Assurance = "Assurance"; public const string Vow = "Vow"; public const string Offense = "Offense"; public const string March = "March"; public const string Rend = "Rend"; public const string Dine = "Dine"; public const string Titan = "Titan"; public const string Adamance = "Adamance"; public const string Artifice = "Artifice"; public const string Embrion = "Embrion"; } public static class MyPluginInfo { public const string PLUGIN_GUID = "SlayersSillyStuff"; public const string PLUGIN_NAME = "SlayersSillyStuff"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace SlayersSillyStuff.Scrap { public class EvilRemote : PhysicsProp { public PlayerControllerB PlayerUser = null; public ScanNodeProperties scanNodeProperties; public override void Start() { scanNodeProperties = ((Component)this).GetComponentInChildren<ScanNodeProperties>(); ((GrabbableObject)this).Start(); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && !((Object)(object)StartOfRound.Instance == (Object)null) && !StartOfRound.Instance.inShipPhase && StartOfRound.Instance.shipHasLanded && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { PlayerUser = ((GrabbableObject)this).playerHeldBy; GameNetworkManager.Instance.localPlayerController.DiscardHeldObject(true, (NetworkObject)null, ((GrabbableObject)this).GetItemFloorPosition(((Component)this).transform.position), false); Networker.Instance.TPAllServerRpc(((NetworkBehaviour)this).NetworkObjectId); } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "EvilRemote"; } } public class FurbySword : Shovel { [CompilerGenerated] private sealed class <cooldown>d__16 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FurbySword <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <cooldown>d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.swinging = 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 batteryDrainAmount = 0.05f; private bool swinging = false; public float cooldownTime = 0f; private bool _keybound = false; private Action<CallbackContext> _furbyHandler; private void Awake() { _furbyHandler = delegate { if (((GrabbableObject)this).isHeld && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { hitAll(); } }; } public override void ItemActivate(bool used, bool buttonDown = true) { base.shovelAudio.pitch = ((GrabbableObject)this).insertedBattery.charge; if (!((((GrabbableObject)this).insertedBattery.charge <= 0f || ((GrabbableObject)this).insertedBattery.empty) && buttonDown) && !(swinging && buttonDown)) { ((Shovel)this).ItemActivate(used, buttonDown); if (!swinging && buttonDown) { swinging = true; Battery insertedBattery = ((GrabbableObject)this).insertedBattery; insertedBattery.charge -= batteryDrainAmount; ((MonoBehaviour)this).StartCoroutine(cooldown()); } } } public override void DiscardItem() { UnregisterKeybind(); ((Shovel)this).DiscardItem(); } public override void PocketItem() { UnregisterKeybind(); ((GrabbableObject)this).PocketItem(); } public override void EquipItem() { RegisterKeybind(); ((GrabbableObject)this).EquipItem(); } public override void GrabItem() { RegisterKeybind(); ((GrabbableObject)this).GrabItem(); } public override void OnDestroy() { UnregisterKeybind(); ((NetworkBehaviour)this).OnDestroy(); } public void RegisterKeybind() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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) string[] toolTips = ((GrabbableObject)this).itemProperties.toolTips; InputBinding val = Plugin.AllKeybinds.FurbyButton.bindings[0]; toolTips[1] = "Toh-Loo Kah : [" + ((InputBinding)(ref val)).ToDisplayString((DisplayStringOptions)0, (InputControl)null) + "]"; if (((GrabbableObject)this).isHeld && (Object)(object)((GrabbableObject)this).playerHeldBy == (Object)(object)StartOfRound.Instance.localPlayerController && !((GrabbableObject)this).isPocketed == Object.op_Implicit((Object)(object)StartOfRound.Instance.localPlayerController)) { HUDManager.Instance.ChangeControlTip(2, ((GrabbableObject)this).itemProperties.toolTips[1], false); } if (!_keybound) { Plugin.AllKeybinds.FurbyButton.performed += _furbyHandler; _keybound = true; if (!Plugin.AllKeybinds.FurbyButton.enabled) { Plugin.AllKeybinds.FurbyButton.Enable(); } } } public void UnregisterKeybind(bool keepToolTip = false) { PlayerControllerB val = ((GrabbableObject)this).playerHeldBy; if ((Object)(object)val == (Object)null) { val = base.previousPlayerHeldBy; } if ((Object)(object)val == (Object)(object)StartOfRound.Instance.localPlayerController && !keepToolTip && (Object)(object)StartOfRound.Instance.localPlayerController.currentlyHeldObject == (Object)null) { HUDManager.Instance.ChangeControlTip(2, "", false); } if (_keybound) { Plugin.AllKeybinds.FurbyButton.performed -= _furbyHandler; _keybound = false; } } public void hitAll() { if (!(cooldownTime > 0f)) { PlayerControllerB val = ((GrabbableObject)this).playerHeldBy; if ((Object)(object)val == (Object)null) { val = base.previousPlayerHeldBy; } if (!((Object)(object)val == (Object)null)) { cooldownTime = 15f; Battery insertedBattery = ((GrabbableObject)this).insertedBattery; insertedBattery.charge -= batteryDrainAmount * 1.5f; Networker.Instance.hurtAllServerRpc(Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val)); Networker.Instance.hurtEveryEnemyServerRpc(Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val)); } } } public void FixedUpdate() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) if (cooldownTime > 0f) { cooldownTime -= Time.fixedDeltaTime; ((GrabbableObject)this).itemProperties.toolTips[1] = $"<color=red>Toh-Loo Kah : [{MathF.Round(cooldownTime)}]"; if (((GrabbableObject)this).isHeld && (Object)(object)((GrabbableObject)this).playerHeldBy == (Object)(object)StartOfRound.Instance.localPlayerController && !((GrabbableObject)this).isPocketed == Object.op_Implicit((Object)(object)StartOfRound.Instance.localPlayerController)) { HUDManager.Instance.ChangeControlTip(2, ((GrabbableObject)this).itemProperties.toolTips[1], false); } } if (((GrabbableObject)this).itemProperties.toolTips[1] == "<color=red>Toh-Loo Kah : [0]") { string[] toolTips = ((GrabbableObject)this).itemProperties.toolTips; InputBinding val = Plugin.AllKeybinds.FurbyButton.bindings[0]; toolTips[1] = "Toh-Loo Kah : [" + ((InputBinding)(ref val)).ToDisplayString((DisplayStringOptions)0, (InputControl)null) + "]"; if (((GrabbableObject)this).isHeld && (Object)(object)((GrabbableObject)this).playerHeldBy == (Object)(object)StartOfRound.Instance.localPlayerController && !((GrabbableObject)this).isPocketed == Object.op_Implicit((Object)(object)StartOfRound.Instance.localPlayerController)) { HUDManager.Instance.ChangeControlTip(2, ((GrabbableObject)this).itemProperties.toolTips[1], false); } } } [IteratorStateMachine(typeof(<cooldown>d__16))] public IEnumerator cooldown() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <cooldown>d__16(0) { <>4__this = this }; } protected override void __initializeVariables() { ((Shovel)this).__initializeVariables(); } protected override void __initializeRpcs() { ((Shovel)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "FurbySword"; } } public class Hmmmm : PhysicsProp { public PlayerControllerB PlayerUser = null; public ScanNodeProperties scanNodeProperties; public override void Start() { scanNodeProperties = ((Component)this).GetComponentInChildren<ScanNodeProperties>(); ((GrabbableObject)this).Start(); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00ab: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!buttonDown || (Object)(object)StartOfRound.Instance == (Object)null || StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipHasLanded || (Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null) { return; } PlayerUser = ((GrabbableObject)this).playerHeldBy; GameNetworkManager.Instance.localPlayerController.DiscardHeldObject(true, (NetworkObject)null, ((GrabbableObject)this).GetItemFloorPosition(((Component)this).transform.position), false); int newValue = ((GrabbableObject)this).scrapValue + Random.Range(40, 80); Vector3 val = Vector3.up; do { try { val = RoundManager.Instance.insideAINodes[Random.Range(0, RoundManager.Instance.insideAINodes.Length)].transform.position; } catch { } } while (val == Vector3.up); ((GrabbableObject)this).targetFloorPosition = val; Networker.Instance.MoveItemServerRpc(val, newValue, ((NetworkBehaviour)this).NetworkObjectId); } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Hmmmm"; } } public class LizzieItem : PhysicsProp { public ParticleSystem particles; public override void Start() { ((GrabbableObject)this).Start(); particles = ((Component)this).GetComponent<ParticleSystem>(); } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { particles.Play(); } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LizzieItem"; } } public class NuclearRemote : PhysicsProp { public PlayerControllerB PlayerUser = null; public ScanNodeProperties scanNodeProperties; public override void Start() { scanNodeProperties = ((Component)this).GetComponentInChildren<ScanNodeProperties>(); ((GrabbableObject)this).Start(); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && !((Object)(object)StartOfRound.Instance == (Object)null) && !StartOfRound.Instance.inShipPhase && StartOfRound.Instance.shipHasLanded && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { PlayerUser = ((GrabbableObject)this).playerHeldBy; GameNetworkManager.Instance.localPlayerController.DiscardHeldObject(true, (NetworkObject)null, ((GrabbableObject)this).GetItemFloorPosition(((Component)this).transform.position), false); Networker.Instance.KillAllServerRpc(((NetworkBehaviour)this).NetworkObjectId); } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "NuclearRemote"; } } } namespace SlayersSillyStuff.Patches { [HarmonyPatch(typeof(GameNetworkManager))] internal class GameNetworkManagerPatch { [HarmonyPostfix] [HarmonyPatch("Start")] public static void AddPrefab(ref GameNetworkManager __instance) { ((Component)__instance).GetComponent<NetworkManager>().AddNetworkPrefab(Plugin.NetworkerPrefab); } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPostfix] [HarmonyPatch("Start")] public static void InstantiateNetworker(StartOfRound __instance) { //IL_0024: 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 (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { GameObject val = Object.Instantiate<GameObject>(Plugin.NetworkerPrefab, Vector3.zero, Quaternion.identity); val.GetComponent<NetworkObject>().Spawn(true); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace SlayersSillyStuff.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }