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 ChillaxSCRAPS v0.8.3
ChillaxMods.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; 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 ChillaxMods.NetcodePatcher; using GameNetcodeStuff; using HarmonyLib; using LethalLib; using LethalLib.Extras; using LethalLib.Modules; using LethalThings; using LethalThings.Extensions; using Microsoft.CodeAnalysis; using TMPro; using Unity.Netcode; using Unity.Netcode.Components; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [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("ChillaxMods")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Chillax Mods")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+c0324eed5311fb7bd30a3a4028d035d4b72196d9")] [assembly: AssemblyProduct("ChillaxMods")] [assembly: AssemblyTitle("ChillaxMods")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>(); } } 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 ChillaxMods { public class DeathDanceCanvas : MonoBehaviour { [SerializeField] private Transform container; [SerializeField] private GameObject namePrefab; [SerializeField] private Button closeButton; public void Initialize(DeathDanceNote note) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown Debug.Log((object)"Initialized Canvas"); ((UnityEvent)closeButton.onClick).AddListener(new UnityAction(note.Close)); List<PlayerControllerB> playerList = note.playerList; foreach (PlayerControllerB item in playerList) { DeathDanceName component = Object.Instantiate<GameObject>(namePrefab, container).GetComponent<DeathDanceName>(); component.Initialize(item, note); } } } public class DeathDanceName : MonoBehaviour { [SerializeField] private TMP_Text playerName; [SerializeField] private Button activateButton; public void Initialize(PlayerControllerB player, DeathDanceNote note) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown playerName.text = player.playerUsername; ((UnityEvent)activateButton.onClick).AddListener((UnityAction)delegate { note.ActivateDeathDance(player); }); } } public class DeathDanceNote : NoisemakerProp { [SerializeField] private DeathDanceCanvas canvasPrefab; [SerializeField] private GameObject warningPrefab; [SerializeField] private Vector3 aoeCenter; [SerializeField] private float aoeRadius; [SerializeField] private GameObject glowingParticle; [SerializeField] private GameObject aoeParticle; public List<AudioClip> musicClips; [SerializeField] private GameObject danceMusic; private GameObject _tempMusic; public List<PlayerControllerB> playerList; private DeathDanceCanvas _temp; private bool _opened; private NetworkVariable<int> playerDancing = new NetworkVariable<int>(-1, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); private NetworkVariable<bool> canPickUp = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); [SerializeField] private float transitionTime; [SerializeField] private float danceTime; private GameObject _tempGlow; private float _elapsedTransitionTime; private float _elapsedDanceTime; private bool _spawned; private bool _activated; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsHost) { canPickUp.Value = true; } NetworkVariable<bool> obj = canPickUp; obj.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)obj.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool oldValue, bool newValue) { ((GrabbableObject)this).grabbableToEnemies = newValue; ((GrabbableObject)this).grabbable = newValue; if (!newValue && (Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null) { PlayerControllerExtensions.DropItem(((GrabbableObject)this).playerHeldBy, (GrabbableObject)(object)this, 0, true); } }); _opened = false; _spawned = true; _elapsedDanceTime = danceTime; _elapsedTransitionTime = transitionTime; } private void OnDrawGizmos() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Gizmos.color = new Color(1f, 0f, 0f, 0.5f); Gizmos.DrawSphere(((Component)this).transform.position + aoeCenter, aoeRadius); } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).grabbable = canPickUp.Value; ((GrabbableObject)this).grabbableToEnemies = canPickUp.Value; if (!_spawned || (Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) { return; } int num = (int)StartOfRound.Instance.localPlayerController.playerClientId; if (num != playerDancing.Value) { return; } _elapsedTransitionTime -= Time.deltaTime; if (!(_elapsedTransitionTime > 0f)) { _elapsedDanceTime -= Time.deltaTime; if (_elapsedDanceTime <= 0f) { ResetServerRpc(); AOEKills(StartOfRound.Instance.localPlayerController); } else { TargetedUpdate(StartOfRound.Instance.localPlayerController); } } } private void TargetedUpdate(PlayerControllerB player) { //IL_006d: 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) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)_tempGlow)) { PlayGlowingParticleServerRpc(player.playerClientId); } if (!player.performingEmote) { ResetServerRpc(); Debug.Log((object)"KILL PLAYER CUZ HE WAS NOT DANCING"); Vector3 val = new Vector3(Random.Range(-1f, 1f), Random.Range(0f, 1f), Random.Range(-1f, 1f)); Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 val2 = normalized * 10f; val = default(Vector3); player.KillPlayer(val2, true, (CauseOfDeath)0, 0, val); } } private void AOEKills(PlayerControllerB player) { //IL_0061: 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_0092: 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) //IL_00d8: 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_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) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"AOE KILL"); PlayAOEParticleServerRpc(player.playerClientId); PlayerControllerB[] array = Object.FindObjectsOfType<PlayerControllerB>(); foreach (PlayerControllerB val in array) { if (!((Object)(object)val == (Object)(object)player) && val.playerSteamId != 0) { float num = Vector3.Distance(((Component)player.thisPlayerBody).transform.position, ((Component)val.thisPlayerBody).transform.position); Debug.Log((object)$"Player {val.playerUsername}, Distance: {Vector3.Distance(((Component)player.thisPlayerBody).transform.position, ((Component)val.thisPlayerBody).transform.position)}"); if (!(num > aoeRadius)) { Vector3 val2 = ((Component)val.thisPlayerBody).transform.position - ((Component)player.thisPlayerBody).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = normalized * 10f; val2 = default(Vector3); val.KillPlayer(val3, true, (CauseOfDeath)0, 0, val2); } } } EnemyAI[] array2 = Object.FindObjectsOfType<EnemyAI>(); foreach (EnemyAI val4 in array2) { if (!((Object)(object)val4 == (Object)null) && val4.enemyType.canDie) { float num2 = Vector3.Distance(((Component)player.thisPlayerBody).transform.position, ((Component)val4).transform.position); if (!(num2 > aoeRadius)) { val4.KillEnemy(false); } } } } public override void ItemActivate(bool used, bool buttonDown = true) { if (!_opened) { ((NoisemakerProp)this).ItemActivate(used, buttonDown); if (!((Object)(object)StartOfRound.Instance.localPlayerController != (Object)(object)((GrabbableObject)this).playerHeldBy)) { _opened = true; playerList = new List<PlayerControllerB>(); playerList = UpdatePlayerList(); _temp = Object.Instantiate<DeathDanceCanvas>(canvasPrefab); _temp.Initialize(this); Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } } } private IEnumerator DestroyDelay() { PlayerControllerExtensions.DropItem(((GrabbableObject)this).playerHeldBy, (GrabbableObject)(object)this, 0, true); if (((NetworkBehaviour)this).IsHost) { canPickUp.Value = false; } else { DisablePickupServerRpc(); } yield return (object)new WaitForSeconds(transitionTime + danceTime); if (((NetworkBehaviour)this).IsHost) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } else { DestroyServerRpc(); } } [ServerRpc(RequireOwnership = false)] private void DisablePickupServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3060219544u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3060219544u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { canPickUp.Value = false; } } } [ServerRpc(RequireOwnership = false)] private void DestroyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(92084580u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 92084580u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); Close(); } public override void DiscardItem() { Close(); ((GrabbableObject)this).DiscardItem(); } public void Close() { if (!((Object)(object)StartOfRound.Instance.localPlayerController != (Object)(object)((GrabbableObject)this).playerHeldBy)) { if ((Object)(object)_temp != (Object)null) { Object.Destroy((Object)(object)((Component)_temp).gameObject); } _opened = false; Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; } } private List<PlayerControllerB> UpdatePlayerList() { List<PlayerControllerB> list = Object.FindObjectsOfType<PlayerControllerB>().ToList(); List<PlayerControllerB> list2 = new List<PlayerControllerB>(list); foreach (PlayerControllerB item in list) { if (item.playerSteamId == 0) { list2.Remove(item); } Debug.Log((object)("Players in-game: " + item.playerUsername)); } return list2; } public void ActivateDeathDance(PlayerControllerB player) { Close(); if (!_activated) { _activated = true; ((MonoBehaviour)this).Invoke("ResetActivate", transitionTime + danceTime); ((MonoBehaviour)this).StartCoroutine(DestroyDelay()); ActivateDeathDanceServerRpc(player.playerClientId); } } private void ResetActivate() { _activated = false; } [ServerRpc(RequireOwnership = false)] private void ActivateDeathDanceServerRpc(ulong 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1946520276u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1946520276u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { playerDancing.Value = (int)playerId; Debug.Log((object)("Player Dancing is: " + playerDancing.Value)); int clipToPlay = Random.Range(0, musicClips.Count); ActivateDeathDanceClientRpc(playerId, clipToPlay); } } } [ClientRpc] private void ActivateDeathDanceClientRpc(ulong playerId, int clipToPlay) { //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_007e: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1887628593u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, clipToPlay); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1887628593u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); if (Object.op_Implicit((Object)(object)component)) { ((MonoBehaviour)this).StartCoroutine(PlayMusic(component, clipToPlay)); } else { Debug.Log((object)"TARGET PLAYER IS NULL"); } if (playerId == StartOfRound.Instance.localPlayerController.playerClientId) { Debug.Log((object)"START DANCING"); _elapsedTransitionTime = transitionTime; _elapsedDanceTime = danceTime; GameObject val3 = Object.Instantiate<GameObject>(warningPrefab); Object.Destroy((Object)(object)val3, transitionTime + 1f); } } } private IEnumerator PlayMusic(PlayerControllerB targetedPlayer, int clipToPlay) { if ((Object)(object)danceMusic != (Object)null) { Debug.Log((object)"Spawning Music"); _tempMusic = Object.Instantiate<GameObject>(danceMusic, ((Component)targetedPlayer.thisPlayerBody).transform.position + Vector3.up, Quaternion.identity, ((Component)targetedPlayer).transform); _tempMusic.GetComponent<AudioSource>().clip = musicClips[clipToPlay]; _tempMusic.GetComponent<AudioSource>().loop = false; _tempMusic.GetComponent<AudioSource>().Play(); } else { Debug.Log((object)"MUSIC NOT AVAILABLE"); } ((MonoBehaviour)this).Invoke("DestroyTempMusic", transitionTime + danceTime); yield return null; } private void DestroyTempMusic() { if ((Object)(object)_tempMusic != (Object)null) { Debug.Log((object)"Destroy Music"); Object.Destroy((Object)(object)_tempMusic); } } [ServerRpc(RequireOwnership = false)] private void ResetServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2279872089u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2279872089u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { playerDancing.Value = -1; } } } [ServerRpc(RequireOwnership = false)] private void PlayGlowingParticleServerRpc(ulong 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2294252830u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2294252830u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { PlayGlowingParticleClientRpc(playerId); } } } [ClientRpc] private void PlayGlowingParticleClientRpc(ulong 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(228266792u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 228266792u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((Object)(object)_tempGlow == (Object)null)) { PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); if ((Object)(object)component != (Object)null) { _tempGlow = Object.Instantiate<GameObject>(glowingParticle, ((Component)component.thisPlayerBody).transform.position + Vector3.up, Quaternion.identity, ((Component)component).transform); Debug.Log((object)"PLAYING GLOWING PARTICLE"); Object.Destroy((Object)(object)_tempGlow.gameObject, transitionTime + danceTime); } } } [ServerRpc(RequireOwnership = false)] private void PlayAOEParticleServerRpc(ulong 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2348203400u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2348203400u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { PlayAOEParticleClientRpc(playerId); } } } [ClientRpc] private void PlayAOEParticleClientRpc(ulong 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1321187740u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1321187740u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); if ((Object)(object)component != (Object)null) { GameObject val3 = Object.Instantiate<GameObject>(aoeParticle, ((Component)component.thisPlayerBody).transform.position + Vector3.up, Quaternion.identity); Object.Destroy((Object)(object)val3, 10f); Debug.Log((object)"PLAY AOE PARTICLE"); } } } protected override void __initializeVariables() { if (playerDancing == null) { throw new Exception("DeathDanceNote.playerDancing cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)playerDancing).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)playerDancing, "playerDancing"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)playerDancing); if (canPickUp == null) { throw new Exception("DeathDanceNote.canPickUp cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)canPickUp).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)canPickUp, "canPickUp"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)canPickUp); ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_DeathDanceNote() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(3060219544u, new RpcReceiveHandler(__rpc_handler_3060219544)); NetworkManager.__rpc_func_table.Add(92084580u, new RpcReceiveHandler(__rpc_handler_92084580)); NetworkManager.__rpc_func_table.Add(1946520276u, new RpcReceiveHandler(__rpc_handler_1946520276)); NetworkManager.__rpc_func_table.Add(1887628593u, new RpcReceiveHandler(__rpc_handler_1887628593)); NetworkManager.__rpc_func_table.Add(2279872089u, new RpcReceiveHandler(__rpc_handler_2279872089)); NetworkManager.__rpc_func_table.Add(2294252830u, new RpcReceiveHandler(__rpc_handler_2294252830)); NetworkManager.__rpc_func_table.Add(228266792u, new RpcReceiveHandler(__rpc_handler_228266792)); NetworkManager.__rpc_func_table.Add(2348203400u, new RpcReceiveHandler(__rpc_handler_2348203400)); NetworkManager.__rpc_func_table.Add(1321187740u, new RpcReceiveHandler(__rpc_handler_1321187740)); } private static void __rpc_handler_3060219544(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathDanceNote)(object)target).DisablePickupServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_92084580(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathDanceNote)(object)target).DestroyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1946520276(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathDanceNote)(object)target).ActivateDeathDanceServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1887628593(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int clipToPlay = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipToPlay); target.__rpc_exec_stage = (__RpcExecStage)2; ((DeathDanceNote)(object)target).ActivateDeathDanceClientRpc(playerId, clipToPlay); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2279872089(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathDanceNote)(object)target).ResetServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2294252830(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathDanceNote)(object)target).PlayGlowingParticleServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_228266792(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)2; ((DeathDanceNote)(object)target).PlayGlowingParticleClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2348203400(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathDanceNote)(object)target).PlayAOEParticleServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1321187740(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 playerId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)2; ((DeathDanceNote)(object)target).PlayAOEParticleClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DeathDanceNote"; } } public class DrainAllBatteries : GrabbableObject { [SerializeField] private AudioSource effectSource; public override void EquipItem() { ((GrabbableObject)this).EquipItem(); GrabbableObject[] itemSlots = base.playerHeldBy.ItemSlots; foreach (GrabbableObject val in itemSlots) { if (!((Object)(object)val == (Object)null) && val.insertedBattery != null) { val.insertedBattery.charge = 0f; val.insertedBattery.empty = true; } } PlayEffectServerRpc(); } [ServerRpc(RequireOwnership = false)] public void PlayEffectServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(901441707u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 901441707u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { PlayEffectClientRpc(); } } } [ClientRpc] public void PlayEffectClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1607689738u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1607689738u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((Object)(object)effectSource == (Object)null)) { effectSource.Play(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_DrainAllBatteries() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(901441707u, new RpcReceiveHandler(__rpc_handler_901441707)); NetworkManager.__rpc_func_table.Add(1607689738u, new RpcReceiveHandler(__rpc_handler_1607689738)); } private static void __rpc_handler_901441707(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DrainAllBatteries)(object)target).PlayEffectServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1607689738(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((DrainAllBatteries)(object)target).PlayEffectClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DrainAllBatteries"; } } public class FixedScrapValue : GrabbableObject { public int newScrapValue = 0; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); ((GrabbableObject)this).SetScrapValue(newScrapValue); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected internal override string __getTypeName() { return "FixedScrapValue"; } } public class InifiniteKey : GrabbableObject { public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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) RaycastHit val = default(RaycastHit); if (!((Object)(object)base.playerHeldBy == (Object)null) && ((NetworkBehaviour)this).IsOwner && Physics.Raycast(new Ray(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward), ref val, 3f, 2816)) { DoorLock component = ((Component)((RaycastHit)(ref val)).transform).GetComponent<DoorLock>(); if ((Object)(object)component != (Object)null && component.isLocked && !component.isPickingLock) { component.UnlockDoorSyncWithServer(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected internal override string __getTypeName() { return "InifiniteKey"; } } public class SuperSneakers : GrabbableObject { [SerializeField] private float jumpMultiplier = 2f; private float _originalJumpForce; public override void EquipItem() { ((GrabbableObject)this).EquipItem(); _originalJumpForce = base.playerHeldBy.jumpForce; PlayerControllerB playerHeldBy = base.playerHeldBy; playerHeldBy.jumpForce *= jumpMultiplier; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); base.playerHeldBy.jumpForce = _originalJumpForce; } public override void DiscardItem() { base.playerHeldBy.jumpForce = _originalJumpForce; ((GrabbableObject)this).DiscardItem(); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected internal override string __getTypeName() { return "SuperSneakers"; } } public class TotemOfUndying : GrabbableObject { private bool _spawned = false; private int _holdCount = 0; private NetworkVariable<bool> canPickUp = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); _spawned = true; if (((NetworkBehaviour)this).IsHost) { canPickUp.Value = true; } NetworkVariable<bool> obj = canPickUp; obj.OnValueChanged = (OnValueChangedDelegate<bool>)(object)Delegate.Combine((Delegate?)(object)obj.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate<bool>)delegate(bool oldValue, bool newValue) { base.grabbableToEnemies = newValue; base.grabbable = newValue; if (!newValue && (Object)(object)base.playerHeldBy != (Object)null) { PlayerControllerExtensions.DropItem(base.playerHeldBy, (GrabbableObject)(object)this, 0, true); } }); _holdCount = 0; } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); if (!((Object)(object)base.playerHeldBy != (Object)(object)StartOfRound.Instance.localPlayerController)) { StartOfRound.Instance.allowLocalPlayerDeath = false; _holdCount++; if (_holdCount > 2) { ((MonoBehaviour)this).StartCoroutine(DestroyDelay()); } } } public override void PocketItem() { ResetInvincibility(); ((GrabbableObject)this).PocketItem(); } public override void DiscardItem() { ResetInvincibility(); ((GrabbableObject)this).DiscardItem(); } private void ResetInvincibility() { if ((Object)(object)base.playerHeldBy == (Object)(object)StartOfRound.Instance.localPlayerController) { StartOfRound.Instance.allowLocalPlayerDeath = true; } } private IEnumerator DestroyDelay() { PlayerControllerExtensions.DropItem(base.playerHeldBy, (GrabbableObject)(object)this, 0, true); if (((NetworkBehaviour)this).IsHost) { canPickUp.Value = false; } else { DisablePickupServerRpc(); } yield return (object)new WaitForSeconds(1f); if (((NetworkBehaviour)this).IsHost) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } else { DestroyServerRpc(); } } [ServerRpc(RequireOwnership = false)] private void DisablePickupServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(43596256u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 43596256u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { canPickUp.Value = false; } } } [ServerRpc(RequireOwnership = false)] private void DestroyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2506564063u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2506564063u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } } } protected override void __initializeVariables() { if (canPickUp == null) { throw new Exception("TotemOfUndying.canPickUp cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)canPickUp).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)canPickUp, "canPickUp"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)canPickUp); ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_TotemOfUndying() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(43596256u, new RpcReceiveHandler(__rpc_handler_43596256)); NetworkManager.__rpc_func_table.Add(2506564063u, new RpcReceiveHandler(__rpc_handler_2506564063)); } private static void __rpc_handler_43596256(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((TotemOfUndying)(object)target).DisablePickupServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2506564063(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((TotemOfUndying)(object)target).DestroyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TotemOfUndying"; } } public static class PluginInfo { public const string PLUGIN_GUID = "ChillaxMods"; public const string PLUGIN_NAME = "ChillaxMods"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace Chillax.Bastard.BogBog { public class Boink : NoisemakerProp { private Vector3 targetForce; private bool push; private float _elapsedTime; public override void OnNetworkSpawn() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((NetworkBehaviour)this).OnNetworkSpawn(); targetForce = Vector3.zero; push = false; _elapsedTime = 0f; ((GrabbableObject)this).useCooldown = Config.boinkCooldown.Value; } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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) if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { Vector3 val = -((Component)this).transform.forward + Vector3.up; Push(((Vector3)(ref val)).normalized * 500f, 0.5f); ChillaxModPlugin.logger.LogInfo((object)"[CHILLAX] ACTIVATE BOINK!"); ((NoisemakerProp)this).ItemActivate(used, buttonDown); } } public override void Update() { //IL_0047: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null) && push) { _elapsedTime -= Time.deltaTime; ((GrabbableObject)this).playerHeldBy.externalForces = Vector3.Lerp(((GrabbableObject)this).playerHeldBy.externalForces, targetForce, Time.deltaTime * 5f); if (_elapsedTime <= 0f) { push = false; } } } private void Push(Vector3 targetForce, float duration) { //IL_0014: 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) if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { this.targetForce = targetForce; _elapsedTime = duration; push = true; } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } protected internal override string __getTypeName() { return "Boink"; } } public class BoinkCustomDirection : NoisemakerProp { private Vector3 targetForce; private bool push; private float _elapsedTime; [SerializeField] private bool random; [SerializeField] private bool forward; public override void OnNetworkSpawn() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((NetworkBehaviour)this).OnNetworkSpawn(); targetForce = Vector3.zero; push = false; _elapsedTime = 0f; ((GrabbableObject)this).useCooldown = Config.boinkCooldown.Value; } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { if (random) { Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(Random.Range(-1f, 1f), 1f, Random.Range(-1f, 1f)); Push(((Vector3)(ref val)).normalized * 500f, 0.5f); } else if (forward) { Vector3 val2 = ((Component)this).transform.forward + Vector3.up; Push(((Vector3)(ref val2)).normalized * 500f, 0.5f); } else { Vector3 val3 = -((Component)this).transform.forward + Vector3.up; Push(((Vector3)(ref val3)).normalized * 500f, 0.5f); } ChillaxModPlugin.logger.LogInfo((object)"[CHILLAX] ACTIVATE BOINK!"); ((NoisemakerProp)this).ItemActivate(used, buttonDown); } } public override void Update() { //IL_0047: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null) && push) { _elapsedTime -= Time.deltaTime; ((GrabbableObject)this).playerHeldBy.externalForces = Vector3.Lerp(((GrabbableObject)this).playerHeldBy.externalForces, targetForce, Time.deltaTime * 5f); if (_elapsedTime <= 0f) { push = false; } } } private void Push(Vector3 targetForce, float duration) { //IL_0014: 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) if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { this.targetForce = targetForce; _elapsedTime = duration; push = true; } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } protected internal override string __getTypeName() { return "BoinkCustomDirection"; } } [BepInPlugin("chillax.bastard.mod", "Chillax Mods", "0.8.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ChillaxModPlugin : BaseUnityPlugin { public static ManualLogSource logger; public const string PluginGuid = "chillax.bastard.mod"; public const string PluginName = "Chillax Mods"; public const string PluginVersion = "0.8.2"; public static readonly Harmony harmony = new Harmony("chillax.bastard.mod"); public static ConfigFile config; public void Awake() { logger = ((BaseUnityPlugin)this).Logger; config = ((BaseUnityPlugin)this).Config; Config.Load(); Content.Load(); harmony.PatchAll(typeof(ChillaxModPlugin)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"CHILLAX Plugin Loaded"); } } public class Config { public static ConfigEntry<int> boinkSpawnChance; public static ConfigEntry<int> cupNoodleSpawnChance; public static ConfigEntry<int> freddySpawnChance; public static ConfigEntry<int> moaiSpawnChance; public static ConfigEntry<int> froggySpawnChance; public static ConfigEntry<int> eeveeSpawnChance; public static ConfigEntry<int> deathNoteSpawnChance; public static ConfigEntry<int> emergencyMeetingChance; public static ConfigEntry<bool> canUseDeathNote; public static ConfigEntry<int> superSneakChance; public static ConfigEntry<int> totemChance; public static ConfigEntry<int> deathDanceNote; public static ConfigEntry<int> masterSword; public static ConfigEntry<int> ocarinaSpawn; public static ConfigEntry<int> unoReverseCardSpawnChance; public static ConfigEntry<bool> enableUnoReverseCard; public static ConfigEntry<int> boinkCooldown; public static ConfigEntry<int> blueDuckSpawnChance; public static ConfigEntry<int> redDuckSpawnChance; public static ConfigEntry<int> goldDuckSpawnChance; public static void Load() { boinkSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "Boink", 15, "How much does this Item spawn, higher = more common"); boinkCooldown = ChillaxModPlugin.config.Bind<int>("Scrap", "BoinkCooldown", 5, "Boink's cooldown in seconds"); cupNoodleSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "CupNoodle", 15, "How much does this Item spawn, higher = more common"); moaiSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "Moai", 10, "How much does this Item spawn, higher = more common"); froggySpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "Froggy", 15, "How much does this Item spawn, higher = more common"); eeveeSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "Eevee", 10, "How much does this Item spawn, higher = more common"); deathNoteSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "DeathNote", 5, "How much does this Item spawn, higher = more common"); canUseDeathNote = ChillaxModPlugin.config.Bind<bool>("Death Note", "DeathNoteActive", true, "Can the Death Note be used, turn this off to avoid griefing"); emergencyMeetingChance = ChillaxModPlugin.config.Bind<int>("Scrap", "EmergencyMeeting", 10, "How much does this Item spawn, higher = more common"); superSneakChance = ChillaxModPlugin.config.Bind<int>("Scrap", "SuperSneakers", 15, "How much does this Item spawn, higher = more common"); deathDanceNote = ChillaxModPlugin.config.Bind<int>("Scrap", "DeathDanceNote", 5, "How much does this Item spawn, higher = more common"); masterSword = ChillaxModPlugin.config.Bind<int>("Scrap", "MasterSword", 5, "How much does this Item spawn, higher = more common"); ocarinaSpawn = ChillaxModPlugin.config.Bind<int>("Scrap", "Ocarina", 5, "How much does this Item spawn, higher = more common"); unoReverseCardSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "UnoReverseCard", 5, "How much does this Item spawn, higher = more common"); enableUnoReverseCard = ChillaxModPlugin.config.Bind<bool>("UnoReverseCard", "UnoReverseCardActive", true, "Enable Uno Reverse Card (Can be jank, and have bugs)"); blueDuckSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "BlueDuck", 5, "How much does this Item spawn, higher = more common"); redDuckSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "RedDuck", 5, "How much does this Item spawn, higher = more common"); goldDuckSpawnChance = ChillaxModPlugin.config.Bind<int>("Scrap", "GoldDuck", 5, "How much does this Item spawn, higher = more common"); } } public class Content { public class CustomItem { public string name = ""; public string itemPath = ""; public string infoPath = ""; public Action<Item> itemAction = delegate { }; public bool enabled = true; public CustomItem(string name, string itemPath, string infoPath, Action<Item> action = null) { this.name = name; this.itemPath = itemPath; this.infoPath = infoPath; if (action != null) { itemAction = action; } } public static CustomItem Add(string name, string itemPath, string infoPath = null, Action<Item> action = null) { return new CustomItem(name, itemPath, infoPath, action); } } public class CustomUnlockable { public string name = ""; public string unlockablePath = ""; public string infoPath = ""; public Action<UnlockableItem> unlockableAction = delegate { }; public bool enabled = true; public int unlockCost = -1; public CustomUnlockable(string name, string unlockablePath, string infoPath, Action<UnlockableItem> action = null, int unlockCost = -1) { this.name = name; this.unlockablePath = unlockablePath; this.infoPath = infoPath; if (action != null) { unlockableAction = action; } this.unlockCost = unlockCost; } public static CustomUnlockable Add(string name, string unlockablePath, string infoPath = null, Action<UnlockableItem> action = null, int unlockCost = -1, bool enabled = true) { return new CustomUnlockable(name, unlockablePath, infoPath, action, unlockCost) { enabled = enabled }; } } public class CustomShopItem : CustomItem { public int itemPrice; public CustomShopItem(string name, string itemPath, string infoPath = null, int itemPrice = 0, Action<Item> action = null) : base(name, itemPath, infoPath, action) { this.itemPrice = itemPrice; } public static CustomShopItem Add(string name, string itemPath, string infoPath = null, int itemPrice = 0, Action<Item> action = null, bool enabled = true) { CustomShopItem customShopItem = new CustomShopItem(name, itemPath, infoPath, itemPrice, action); customShopItem.enabled = enabled; return customShopItem; } } public class CustomScrap : CustomItem { public LevelTypes levelType = (LevelTypes)(-1); public int rarity; public CustomScrap(string name, string itemPath, LevelTypes levelType, int rarity, Action<Item> action = null) : base(name, itemPath, null, action) { //IL_0002: 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_0016: Unknown result type (might be due to invalid IL or missing references) this.levelType = levelType; this.rarity = rarity; } public static CustomScrap Add(string name, string itemPath, LevelTypes levelType, int rarity, Action<Item> action = null) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return new CustomScrap(name, itemPath, levelType, rarity, action); } } public class CustomEnemy { public string name; public string enemyPath; public int rarity; public LevelTypes levelFlags; public SpawnType spawnType; public string infoKeyword; public string infoNode; public bool enabled = true; public CustomEnemy(string name, string enemyPath, int rarity, LevelTypes levelFlags, SpawnType spawnType, string infoKeyword, string infoNode) { //IL_0025: 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) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) this.name = name; this.enemyPath = enemyPath; this.rarity = rarity; this.levelFlags = levelFlags; this.spawnType = spawnType; this.infoKeyword = infoKeyword; this.infoNode = infoNode; } public static CustomEnemy Add(string name, string enemyPath, int rarity, LevelTypes levelFlags, SpawnType spawnType, string infoKeyword, string infoNode, bool enabled = true) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return new CustomEnemy(name, enemyPath, rarity, levelFlags, spawnType, infoKeyword, infoNode) { enabled = enabled }; } } public class CustomMapObject { public string name; public string objectPath; public LevelTypes levelFlags; public Func<SelectableLevel, AnimationCurve> spawnRateFunction; public bool enabled = true; public CustomMapObject(string name, string objectPath, LevelTypes levelFlags, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null, bool enabled = false) { //IL_001e: 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) this.name = name; this.objectPath = objectPath; this.levelFlags = levelFlags; this.spawnRateFunction = spawnRateFunction; this.enabled = enabled; } public static CustomMapObject Add(string name, string objectPath, LevelTypes levelFlags, Func<SelectableLevel, AnimationCurve> spawnRateFunction = null, bool enabled = false) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return new CustomMapObject(name, objectPath, levelFlags, spawnRateFunction, enabled); } } public static AssetBundle MainAssets; public static Dictionary<string, GameObject> Prefabs = new Dictionary<string, GameObject>(); public static List<CustomUnlockable> customUnlockables; public static List<CustomItem> customItems; public static List<CustomEnemy> customEnemies; public static List<CustomMapObject> customMapObjects; public static GameObject ConfigManagerPrefab; public static void TryLoadAssets() { if ((Object)(object)MainAssets == (Object)null) { MainAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "chillaxBundle")); Plugin.logger.LogInfo((object)"Loaded asset bundle"); } } public static void Load() { //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Unknown result type (might be due to invalid IL or missing references) TryLoadAssets(); customItems = new List<CustomItem> { CustomScrap.Add("Boink", "Assets/Chillax/ChillaxMods/Boink/Boink.asset", (LevelTypes)(-1), Config.boinkSpawnChance.Value), CustomScrap.Add("MamaMooSup", "Assets/Chillax/ChillaxMods/Cup Noodle/Cup Noodle.asset", (LevelTypes)(-1), Config.cupNoodleSpawnChance.Value), CustomScrap.Add("Moai", "Assets/Chillax/ChillaxMods/Moai/Moai.asset", (LevelTypes)(-1), Config.moaiSpawnChance.Value), CustomScrap.Add("Froggy", "Assets/Chillax/ChillaxMods/Froggy Chair/Froggy Chair.asset", (LevelTypes)(-1), Config.froggySpawnChance.Value), CustomScrap.Add("Eevee", "Assets/Chillax/ChillaxMods/Eevee Plush/Eevee.asset", (LevelTypes)(-1), Config.eeveeSpawnChance.Value), CustomScrap.Add("DeathNote", "Assets/Chillax/ChillaxMods/DeathNote/DeathNote.asset", (LevelTypes)(-1), Config.deathNoteSpawnChance.Value), CustomScrap.Add("EmergencyMeeting", "Assets/Chillax/ChillaxMods/EmergencyMeeting/EmergencyMeeting.asset", (LevelTypes)(-1), Config.emergencyMeetingChance.Value), CustomScrap.Add("SuperSneakers", "Assets/Chillax/ChillaxMods/SuperSneakers/SuperSneakers.asset", (LevelTypes)(-1), Config.superSneakChance.Value), CustomScrap.Add("DeathDanceNote", "Assets/Chillax/ChillaxMods/DeathDanceNote/DeathDanceNote.asset", (LevelTypes)(-1), Config.deathDanceNote.Value), CustomScrap.Add("MasterSword", "Assets/Chillax/ChillaxMods/MasterSword/MasterSword.asset", (LevelTypes)(-1), Config.masterSword.Value), CustomScrap.Add("Ocarina", "Assets/Chillax/ChillaxMods/Ocarina/Ocarina.asset", (LevelTypes)(-1), Config.ocarinaSpawn.Value), CustomScrap.Add("BlueDuck", "Assets/Chillax/ChillaxMods/BlueDuck/BlueDuck.asset", (LevelTypes)(-1), Config.blueDuckSpawnChance.Value), CustomScrap.Add("RedDuck", "Assets/Chillax/ChillaxMods/RedDuck/RedDuck.asset", (LevelTypes)(-1), Config.redDuckSpawnChance.Value), CustomScrap.Add("GoldDuck", "Assets/Chillax/ChillaxMods/GoldDuck/GoldDuck.asset", (LevelTypes)(-1), Config.goldDuckSpawnChance.Value), CustomScrap.Add("CursedBlueDuck", "Assets/Chillax/ChillaxMods/CursedBlueDuck/CursedBlueDuck.asset", (LevelTypes)(-1), Config.blueDuckSpawnChance.Value), CustomScrap.Add("CursedRedDuck", "Assets/Chillax/ChillaxMods/CursedRedDuck/CursedRedDuck.asset", (LevelTypes)(-1), Config.redDuckSpawnChance.Value) }; if (Config.enableUnoReverseCard.Value) { customItems.Add(CustomScrap.Add("UnoReverse", "Assets/Chillax/ChillaxMods/UnoReverse/UnoReverse.asset", (LevelTypes)(-1), Config.unoReverseCardSpawnChance.Value)); } customEnemies = new List<CustomEnemy>(); customUnlockables = new List<CustomUnlockable>(); customMapObjects = new List<CustomMapObject>(); foreach (CustomItem customItem in customItems) { if (customItem.enabled) { Item val = MainAssets.LoadAsset<Item>(customItem.itemPath); if ((Object)(object)val.spawnPrefab.GetComponent<NetworkTransform>() == (Object)null) { val.spawnPrefab.AddComponent<NetworkTransform>(); } Prefabs.Add(customItem.name, val.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); customItem.itemAction(val); if (customItem is CustomShopItem) { TerminalNode val2 = MainAssets.LoadAsset<TerminalNode>(customItem.infoPath); Plugin.logger.LogInfo((object)$"Registering shop item {customItem.name} with price {((CustomShopItem)customItem).itemPrice}"); Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, ((CustomShopItem)customItem).itemPrice); } else if (customItem is CustomScrap customScrap) { ChillaxModPlugin.logger.LogInfo((object)$"[CHILLAX] Registering... {val.itemName} at rarity {customScrap.rarity}"); Items.RegisterScrap(val, customScrap.rarity, customScrap.levelType); } } } foreach (CustomUnlockable customUnlockable in customUnlockables) { if (customUnlockable.enabled) { UnlockableItem unlockable = MainAssets.LoadAsset<UnlockableItemDef>(customUnlockable.unlockablePath).unlockable; if ((Object)(object)unlockable.prefabObject != (Object)null) { NetworkPrefabs.RegisterNetworkPrefab(unlockable.prefabObject); } Prefabs.Add(customUnlockable.name, unlockable.prefabObject); TerminalNode val3 = null; if (customUnlockable.infoPath != null) { val3 = MainAssets.LoadAsset<TerminalNode>(customUnlockable.infoPath); } Unlockables.RegisterUnlockable(unlockable, (StoreType)2, (TerminalNode)null, (TerminalNode)null, val3, customUnlockable.unlockCost); } } foreach (CustomEnemy customEnemy in customEnemies) { if (customEnemy.enabled) { EnemyType val4 = MainAssets.LoadAsset<EnemyType>(customEnemy.enemyPath); TerminalNode val5 = MainAssets.LoadAsset<TerminalNode>(customEnemy.infoNode); TerminalKeyword val6 = null; if (customEnemy.infoKeyword != null) { val6 = MainAssets.LoadAsset<TerminalKeyword>(customEnemy.infoKeyword); } NetworkPrefabs.RegisterNetworkPrefab(val4.enemyPrefab); Prefabs.Add(customEnemy.name, val4.enemyPrefab); Enemies.RegisterEnemy(val4, customEnemy.rarity, customEnemy.levelFlags, customEnemy.spawnType, val5, val6); } } foreach (CustomMapObject customMapObject in customMapObjects) { if (customMapObject.enabled) { SpawnableMapObjectDef val7 = MainAssets.LoadAsset<SpawnableMapObjectDef>(customMapObject.objectPath); NetworkPrefabs.RegisterNetworkPrefab(val7.spawnableMapObject.prefabToSpawn); Prefabs.Add(customMapObject.name, val7.spawnableMapObject.prefabToSpawn); MapObjects.RegisterMapObject(val7, customMapObject.levelFlags, customMapObject.spawnRateFunction); } } Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false).Length != 0) { methodInfo.Invoke(null, null); } } } Plugin.logger.LogInfo((object)"[CHILLAX] Custom content loaded!"); } } public class DeathNote : NoisemakerProp { private NetworkVariable<bool> canUseDeathNote = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); [SerializeField] private AudioClip killSfx; [SerializeField] private GameObject canvasPrefab; private float _currentCooldown; [SerializeField] private float checkRate; [SerializeField] private Renderer deathNoteRenderer; [SerializeField] private Material[] materials; [SerializeField] private string[] textNodes; [SerializeField] private Sprite[] icons; [SerializeField] private ScanNodeProperties scanNodeProperties; private DeathNoteCanvas _temp; public List<PlayerControllerB> playerList; public List<EnemyAI> enemyList; private bool _opened; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); canUseDeathNote = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); playerList = new List<PlayerControllerB>(); enemyList = new List<EnemyAI>(); Item itemProperties = Object.Instantiate<Item>(((GrabbableObject)this).itemProperties); ((GrabbableObject)this).itemProperties = itemProperties; UpdateList(); _opened = false; ((MonoBehaviour)this).InvokeRepeating("ProcessCooldown", checkRate, checkRate); if (((NetworkBehaviour)this).IsHost) { canUseDeathNote.Value = Config.canUseDeathNote.Value; UpdateVisuals(0); UpdateVisualsClientRpc(0); } } [ClientRpc] private void UpdateVisualsClientRpc(int index) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(531245751u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 531245751u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { UpdateVisuals(index); } } } private void UpdateVisuals(int index) { if ((Object)(object)deathNoteRenderer.material != (Object)(object)materials[index]) { deathNoteRenderer.material = materials[index]; } scanNodeProperties.headerText = textNodes[index]; ((GrabbableObject)this).itemProperties.itemName = textNodes[index]; ((GrabbableObject)this).itemProperties.itemIcon = icons[index]; } [ServerRpc(RequireOwnership = false)] private void StartCooldownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(246655775u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 246655775u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { Random random = new Random(); StartCooldownClientRpc(_currentCooldown = random.Next(600, 1800)); } } } [ClientRpc] private void StartCooldownClientRpc(float cooldown) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(316831956u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref cooldown, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 316831956u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { _currentCooldown = cooldown; } } } private void ProcessCooldown() { if (_currentCooldown > 0f) { _currentCooldown -= checkRate; UpdateVisuals(1); } else { UpdateVisuals(0); } } private void UpdateList() { List<PlayerControllerB> list = Object.FindObjectsOfType<PlayerControllerB>().ToList(); List<PlayerControllerB> list2 = new List<PlayerControllerB>(list); foreach (PlayerControllerB item in list) { if (item.playerSteamId == 0) { list2.Remove(item); } } playerList = list2; enemyList = Object.FindObjectsOfType<EnemyAI>().ToList(); } private void OnDisable() { if ((Object)(object)_temp != (Object)null) { _temp.Close(); } } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); if ((Object)(object)_temp != (Object)null) { _temp.Close(); } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); if ((Object)(object)_temp != (Object)null) { _temp.Close(); } } public override void ItemActivate(bool used, bool buttonDown = true) { if (canUseDeathNote.Value && !_opened && !(_currentCooldown > 0f)) { ((NoisemakerProp)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)((GrabbableObject)this).playerHeldBy).IsOwner) { UpdateList(); _temp = Object.Instantiate<GameObject>(canvasPrefab, ((Component)this).transform).GetComponent<DeathNoteCanvas>(); _temp.Initialize(this); _opened = true; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; DeathNoteCanvas temp = _temp; temp.onExit = (Action)Delegate.Combine(temp.onExit, new Action(OnExit)); } } } private void OnExit() { Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; _opened = false; } public void ActivateDeathNote(GameObject objectToKill) { OnExit(); if (Object.op_Implicit((Object)(object)objectToKill.GetComponent<PlayerControllerB>())) { KillPlayer(objectToKill.GetComponent<PlayerControllerB>()); } if (Object.op_Implicit((Object)(object)objectToKill.GetComponent<EnemyAI>())) { KillEnemy(objectToKill.GetComponent<EnemyAI>()); } StartCooldownServerRpc(); } private void KillPlayer(PlayerControllerB controller) { if (!((Object)(object)controller == (Object)null)) { Debug.Log((object)("[CHILLAX] [DEATH NOTE] killing off player: " + controller.playerUsername)); DeathNoteServerRpc(controller.playerClientId, ((NetworkBehaviour)controller).OwnerClientId); } } private void KillEnemy(EnemyAI enemy) { if (!((Object)(object)enemy == (Object)null)) { Debug.Log((object)("[CHILLAX] [DEATH NOTE] killing off enemy: " + enemy.enemyType.enemyName)); enemy.KillEnemyServerRpc(false); } } [ServerRpc(RequireOwnership = false)] private void DeathNoteServerRpc(ulong playerID, 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_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_007e: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2937588739u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerID); BytePacker.WriteValueBitPacked(val2, clientID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2937588739u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerID].GetComponent<PlayerControllerB>(); Debug.Log((object)("[DEATH NOTE] Receive Server RPC, player to kill: " + component.playerUsername)); ClientRpcParams val3 = default(ClientRpcParams); val3.Send = new ClientRpcSendParams { TargetClientIds = new ulong[1] { clientID } }; ClientRpcParams clientRpcParams = val3; DeathNoteClientRpc(component.playerClientId, clientRpcParams); } } } [ClientRpc] private void DeathNoteClientRpc(ulong playerID, ClientRpcParams clientRpcParams = default(ClientRpcParams)) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2281964886u, clientRpcParams, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2281964886u, clientRpcParams, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerID].GetComponent<PlayerControllerB>(); Debug.Log((object)("[DEATH NOTE] Receive Client RPC, player to kill: " + component.playerUsername)); Debug.Log((object)("[DEATH NOTE] Killing: " + component.playerUsername)); ((MonoBehaviour)this).StartCoroutine(KilLDelay(component)); } } } private IEnumerator KilLDelay(PlayerControllerB controller) { if (((NetworkBehaviour)controller).IsOwner) { AudioSource tempSource = ((Component)controller).gameObject.AddComponent<AudioSource>(); tempSource.PlayOneShot(killSfx); Object.Destroy((Object)(object)tempSource, 3f); } yield return (object)new WaitForSeconds(3f); Debug.Log((object)("[DEATH NOTE] Kill On Player Client: " + controller.playerUsername + " Is Owner: " + ((NetworkBehaviour)controller).IsOwner)); controller.KillPlayer(Vector3.up * 10f, true, (CauseOfDeath)0, 0, default(Vector3)); } protected override void __initializeVariables() { if (canUseDeathNote == null) { throw new Exception("DeathNote.canUseDeathNote cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)canUseDeathNote).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)canUseDeathNote, "canUseDeathNote"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)canUseDeathNote); ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_DeathNote() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(531245751u, new RpcReceiveHandler(__rpc_handler_531245751)); NetworkManager.__rpc_func_table.Add(246655775u, new RpcReceiveHandler(__rpc_handler_246655775)); NetworkManager.__rpc_func_table.Add(316831956u, new RpcReceiveHandler(__rpc_handler_316831956)); NetworkManager.__rpc_func_table.Add(2937588739u, new RpcReceiveHandler(__rpc_handler_2937588739)); NetworkManager.__rpc_func_table.Add(2281964886u, new RpcReceiveHandler(__rpc_handler_2281964886)); } private static void __rpc_handler_531245751(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 index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)2; ((DeathNote)(object)target).UpdateVisualsClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_246655775(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathNote)(object)target).StartCooldownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_316831956(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float cooldown = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref cooldown, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((DeathNote)(object)target).StartCooldownClientRpc(cooldown); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2937588739(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); ulong clientID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref clientID); target.__rpc_exec_stage = (__RpcExecStage)1; ((DeathNote)(object)target).DeathNoteServerRpc(playerID, clientID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2281964886(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerID = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); ClientRpcParams client = rpcParams.Client; target.__rpc_exec_stage = (__RpcExecStage)2; ((DeathNote)(object)target).DeathNoteClientRpc(playerID, client); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DeathNote"; } } public class DeathNoteCanvas : MonoBehaviour { [SerializeField] private Button closeButton; [SerializeField] private GameObject namesPrefab; [SerializeField] private Transform contentContainer; private string _chosenName; private DeathNote _deathNote; public Action onExit; public void Initialize(DeathNote deathNote) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown foreach (Transform item in contentContainer) { Transform val = item; Object.Destroy((Object)(object)((Component)val).gameObject); } ((UnityEvent)closeButton.onClick).AddListener(new UnityAction(Close)); _deathNote = deathNot