using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalLevelLoader; using LethalLib.Modules; using Microsoft.CodeAnalysis; using ReindogDLL.Patches; using ReindogFan1372.ReindogDLL.NetcodePatcher; using StaticNetcodeLib; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.InputSystem; 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: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("LethalLevelLoader")] [assembly: IgnoresAccessChecksTo("LethalLib")] [assembly: IgnoresAccessChecksTo("MoreSuits")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: IgnoresAccessChecksTo("Xilophor.StaticNetcodeLib")] [assembly: AssemblyCompany("ReindogFan1372.ReindogDLL")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("2.3.9.0")] [assembly: AssemblyInformationalVersion("2.3.9")] [assembly: AssemblyProduct("ReindogDLL")] [assembly: AssemblyTitle("ReindogFan1372.ReindogDLL")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.3.9.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ReindogDLL { [BepInPlugin("ReindogFan1372.ReindogDLL", "ReindogDLL", "2.3.9")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ReindogDLL : BaseUnityPlugin { public static class MoreSuitsCompat { public static bool Enabled => Chainloader.PluginInfos.ContainsKey("x753.More_Suits"); } internal static AssetBundle MyCustomAssets; internal static Texture2D fosgreathTexture; internal static AudioClip fosgreathClip; public static bool modLoaded; public static ReindogDLL Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } internal static MyModConfig ReindogAndFriendsModConfig { get; private set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; ReindogAndFriendsModConfig = new MyModConfig(((BaseUnityPlugin)this).Config); AssetBundleLoader.AddOnExtendedModLoadedListener((Action)OnExtendedModRegistered, "ReindogFan1372", "ReindogAndFriends"); AssetBundleLoader.AddOnLethalBundleLoadedListener((Action)OnAssetBundleLoaded, "reindogandfriends.lethalbundle"); NetcodePatcher(); Patch(); Logger.LogInfo((object)"ReindogAndFriends has loaded! \r\n \r\n =--. \r\n **+=- \r\n +=: \r\n . -=: \r\n -+ -= -=+ \r\n .=* ===.-+# \r\n -* . :--+#. \r\n == =+#. \r\n =.= -+# \r\n =:= .+# \r\n --+ . +#. .--. \r\n --= =*= -*+-: \r\n -:. +# -*-:.= \r\n --. .:**#=::+*::=- \r\n --: :=*===++++* \r\n -== :::---==+-- \r\n ++.. .::--=++=+=-: \r\n .-: .... ::--=+++++++-::..+ \r\n **. .:::::--=#+*++=====--+.- \r\n -:.:----:---=*%*:::---===::- \r\n ==.-===-----=+=::--++=====* \r\n .--=#-:...:::--=+**+===*= \r\n .-:=%- ------=++****+++* \r\n ..... =###+++++*-.*+***: \r\n ......=##*+****:..-*=*- \r\n .::=--:-=#*+**:..::-**:. \r\n .--=++++===+**..::-:-#%#:.. \r\n .=-=+:....+**=...:---=##*-.. \r\n :+-..........::-=+#*#---: \r\n .==-:::......-:=****--:. \r\n -.=--::..:-:-=**+=:--. \r\n - .*==-:::--***+:.:--.. \r\n . - :**-:::-+**-...---.: \r\n -: ..:*:::+++.....--:.:. \r\n ....==:=*=.....---:.:.. \r\n .....::*......::--::-::. \r\n .......+......------:-:::. \r\n :............:------:---=.. \r\n ............:------------.:. \r\n ..........::---------:-=:--:. \r\n ..........:::--------=:=-:=--. \r\n ::.-:....:-:---------=---=----: \r\n --::+.:=:=::-::------=---:....: \r\n --::-.:--::::--------=-=-----... \r\n .:-:::-+::::::------==+-=-----:.. \r\n .:-=-::-::::..-----===+=-------:. \r\n ..:-=-:-:::- :-.----=++++:-------.. \r\n .:--++-----:..:-:--==+*---:---==+:: \r\n .::-==#+---= ...---===+*=.::--==++=. ..... \r\n .::-===*%+=== -:::====+*=+++:-===++=. ....::::::: \r\n ::--==++##:=.:--::====++++*++:==+*+++...::----::::.. \r\n ::-==++*#: --=-:===+#+*##*+-++*#*+**++===+-:----:. \r\n .:--=++*#: ---==:==+**+*##*+-**#**%##*****-----==-=. \r\n -:-==+*#: .===+===++:++*#*+++*#%% .-*#+======+** \r\n =--==+*#. ---==+++* +++**+=*: =++++++*# \r\n .=+-+#- -=-==++# *+*+++* :#*#### \r\n : .--===*# *+++* \r\n :#:++== . \r\n : \r\n"); } internal static void OnExtendedModRegistered(ExtendedMod myMod) { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Expected O, but got Unknown if ((Object)(object)myMod == (Object)null || modLoaded) { return; } modLoaded = true; foreach (ExtendedItem extendedItem in myMod.ExtendedItems) { int configValueForItem = GetConfigValueForItem(extendedItem.Item.itemName); ((MatchingProperties)extendedItem.LevelMatchingProperties).modNames.Clear(); ((MatchingProperties)extendedItem.LevelMatchingProperties).modNames.TrimExcess(); ((MatchingProperties)extendedItem.LevelMatchingProperties).authorNames.Clear(); ((MatchingProperties)extendedItem.LevelMatchingProperties).authorNames.TrimExcess(); extendedItem.LevelMatchingProperties.levelTags.Clear(); extendedItem.LevelMatchingProperties.levelTags.TrimExcess(); extendedItem.LevelMatchingProperties.currentRoutePrice.Clear(); extendedItem.LevelMatchingProperties.currentRoutePrice.TrimExcess(); extendedItem.LevelMatchingProperties.currentWeather.Clear(); extendedItem.LevelMatchingProperties.currentWeather.TrimExcess(); extendedItem.LevelMatchingProperties.planetNames.Clear(); extendedItem.LevelMatchingProperties.planetNames.TrimExcess(); StringWithRarity item = new StringWithRarity("Vanilla", configValueForItem); StringWithRarity item2 = new StringWithRarity("Custom", configValueForItem); if (configValueForItem > 0) { extendedItem.LevelMatchingProperties.levelTags.Add(item2); extendedItem.LevelMatchingProperties.levelTags.Add(item); } } foreach (ExtendedEnemyType extendedEnemyType in myMod.ExtendedEnemyTypes) { if (extendedEnemyType.EnemyType.enemyName == "Mario") { ((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).modNames.Clear(); ((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).modNames.TrimExcess(); ((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).authorNames.Clear(); ((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).authorNames.TrimExcess(); extendedEnemyType.InsideLevelMatchingProperties.levelTags.Clear(); extendedEnemyType.InsideLevelMatchingProperties.levelTags.TrimExcess(); extendedEnemyType.InsideLevelMatchingProperties.currentRoutePrice.Clear(); extendedEnemyType.InsideLevelMatchingProperties.currentRoutePrice.TrimExcess(); extendedEnemyType.InsideLevelMatchingProperties.currentWeather.Clear(); extendedEnemyType.InsideLevelMatchingProperties.currentWeather.TrimExcess(); extendedEnemyType.InsideLevelMatchingProperties.planetNames.Clear(); extendedEnemyType.InsideLevelMatchingProperties.planetNames.TrimExcess(); int value = ReindogAndFriendsModConfig.marioRarity.Value; StringWithRarity item3 = new StringWithRarity("Vanilla", value); StringWithRarity item4 = new StringWithRarity("Custom", value); if (value > 0) { extendedEnemyType.InsideLevelMatchingProperties.levelTags.Add(item4); extendedEnemyType.InsideLevelMatchingProperties.levelTags.Add(item3); extendedEnemyType.EnemyType.MaxCount = ReindogAndFriendsModConfig.marioMaxCount.Value; extendedEnemyType.EnemyType.PowerLevel = ReindogAndFriendsModConfig.marioPowerLevel.Value; } } } } public static void OnAssetBundleLoaded(AssetBundle myAssetBundle) { int value = ReindogAndFriendsModConfig.holdingPenCost.Value; Item val = myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/holdingpen/data/holdingpenitem.asset"); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); TerminalNode val2 = myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/holdingpen/data/terminal/shoppendata.asset"); Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, value); ReindogTemple reindogTemple = myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/goldenreindog/goldentemple.prefab"); NetworkPrefabs.RegisterNetworkPrefab(myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/goldenreindog/goldentemple.prefab")); CheeseLovingMouse cheeseLovingMouse = myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/cheese/mouse/mouseprefab.prefab"); NetworkPrefabs.RegisterNetworkPrefab(myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/cheese/mouse/mouseprefab.prefab")); if (ReindogAndFriendsModConfig.maximumFosgreathModeEnabled.Value) { fosgreathTexture = myAssetBundle.LoadAsset("assets/lethalcompany/mods/reindogandfriends/items/fosgreath/data/texturegreath.jpg"); fosgreathClip = AssetBundleLoader.assetBundles["reindogandfriends.lethalbundle"].LoadAsset("assets/lethalcompany/mods/reindogandfriends/audio/clipgreath.ogg"); } } private static int GetConfigValueForItem(string itemName) { switch (itemName) { case "Bober Kurwa": return ReindogAndFriendsModConfig.boberKurwaSpawnRate.Value; case "Mini Nuke": return ReindogAndFriendsModConfig.miniNukeSpawnRate.Value; case "Broda": return ReindogAndFriendsModConfig.brodaSpawnRate.Value; case "Chris Griffin": return ReindogAndFriendsModConfig.chrisGriffinSpawnRate.Value; case "Cid": return ReindogAndFriendsModConfig.cidSpawnRate.Value; case "Clyde": return ReindogAndFriendsModConfig.clydeSpawnRate.Value; case "Crawly": return ReindogAndFriendsModConfig.crawlySpawnRate.Value; case "Deku": return ReindogAndFriendsModConfig.dekuSpawnRate.Value; case "Fosgreath": return ReindogAndFriendsModConfig.fosgreathSpawnRate.Value; case "Frieza": return ReindogAndFriendsModConfig.friezaSpawnRate.Value; case "Golden Reindog": return ReindogAndFriendsModConfig.goldenReindogSpawnRate.Value; case "Hamster": return ReindogAndFriendsModConfig.hamsterSpawnRate.Value; case "Iron Giant": return ReindogAndFriendsModConfig.ironGiantSpawnRate.Value; case "Lebron": return ReindogAndFriendsModConfig.lebronSpawnRate.Value; case "Lightning McQueen": return ReindogAndFriendsModConfig.lightningMcqueenSpawnRate.Value; case "Monkey Cube": return ReindogAndFriendsModConfig.monkeyCubeSpawnRate.Value; case "Nerd": return ReindogAndFriendsModConfig.nerdSpawnRate.Value; case "Optimus Prime": return ReindogAndFriendsModConfig.optimusPrimeSpawnRate.Value; case "Rat": return ReindogAndFriendsModConfig.ratSpawnRate.Value; case "Reindog": return ReindogAndFriendsModConfig.reindogSpawnRate.Value; case "Saul Bigman": return ReindogAndFriendsModConfig.saulBigmanSpawnRate.Value; case "Saul Goodman": return ReindogAndFriendsModConfig.saulGoodmanSpawnRate.Value; case "Sonic": return ReindogAndFriendsModConfig.sonicSpawnRate.Value; case "Superman": return ReindogAndFriendsModConfig.supermanSpawnRate.Value; case "Swag Baby": return ReindogAndFriendsModConfig.babySpawnRate.Value; case "Rayman": return ReindogAndFriendsModConfig.raymanSpawnRate.Value; case "Shadow": return ReindogAndFriendsModConfig.shadowSpawnRate.Value; case "Remy": return ReindogAndFriendsModConfig.remySpawnRate.Value; case "Fan": return ReindogAndFriendsModConfig.fanSpawnRate.Value; case "Knuckles": return ReindogAndFriendsModConfig.knucklesSpawnRate.Value; case "1-Up Mushroom": return ReindogAndFriendsModConfig.mushroomSpawnRate.Value; case "Herlock Sholmes": return ReindogAndFriendsModConfig.sholmesSpawnRate.Value; case "Barok Van Zieks": return ReindogAndFriendsModConfig.barokSpawnRate.Value; case "Cheese": return ReindogAndFriendsModConfig.cheeseSpawnRate.Value; default: Logger.LogInfo((object)("No configuration found for item type: " + itemName + ", setting spawn value to 25")); return 25; } } public static float GetGenericVolumeConfig(string itemName) { return itemName switch { "Bober Kurwa" => ReindogAndFriendsModConfig.boberKurwaGenericVolume.Value, "Mini Nuke" => ReindogAndFriendsModConfig.miniNukeGenericVolume.Value, "Broda" => ReindogAndFriendsModConfig.brodaGenericVolume.Value, "Chris Griffin" => ReindogAndFriendsModConfig.chrisGriffinGenericVolume.Value, "Cid" => ReindogAndFriendsModConfig.cidGenericVolume.Value, "Clyde" => ReindogAndFriendsModConfig.clydeGenericVolume.Value, "Crawly" => ReindogAndFriendsModConfig.crawlyGenericVolume.Value, "Deku" => ReindogAndFriendsModConfig.dekuGenericVolume.Value, "Fosgreath" => ReindogAndFriendsModConfig.fosgreathGenericVolume.Value, "Frieza" => ReindogAndFriendsModConfig.friezaGenericVolume.Value, "Golden Reindog" => ReindogAndFriendsModConfig.goldenReindogGenericVolume.Value, "Hamster" => ReindogAndFriendsModConfig.hamsterGenericVolume.Value, "Iron Giant" => ReindogAndFriendsModConfig.ironGiantGenericVolume.Value, "Lebron" => ReindogAndFriendsModConfig.lebronGenericVolume.Value, "Lightning McQueen" => ReindogAndFriendsModConfig.lightningMcQueenGenericVolume.Value, "Monkey Cube" => ReindogAndFriendsModConfig.monkeyCubeGenericVolume.Value, "Nerd" => ReindogAndFriendsModConfig.nerdGenericVolume.Value, "Optimus Prime" => ReindogAndFriendsModConfig.optimusPrimeGenericVolume.Value, "Rat" => ReindogAndFriendsModConfig.ratGenericVolume.Value, "Reindog" => ReindogAndFriendsModConfig.reindogGenericVolume.Value, "Saul Bigman" => ReindogAndFriendsModConfig.saulBigmanGenericVolume.Value, "Saul Goodman" => ReindogAndFriendsModConfig.saulGoodmanGenericVolume.Value, "Sonic" => ReindogAndFriendsModConfig.sonicGenericVolume.Value, "Superman" => ReindogAndFriendsModConfig.supermanGenericVolume.Value, "Swag Baby" => ReindogAndFriendsModConfig.babyGenericVolume.Value, "Rayman" => ReindogAndFriendsModConfig.raymanGenericVolume.Value, "Shadow" => ReindogAndFriendsModConfig.shadowGenericVolume.Value, "Remy" => ReindogAndFriendsModConfig.remyGenericVolume.Value, "Fan" => ReindogAndFriendsModConfig.fanGenericVolume.Value, "Knuckles" => ReindogAndFriendsModConfig.knucklesGenericVolume.Value, "1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomGenericVolume.Value, "Holding Pen" => ReindogAndFriendsModConfig.holdingPenGenericVolume.Value, "Herlock Sholmes" => ReindogAndFriendsModConfig.sholmesGenericVolume.Value, "Barok Van Zieks" => ReindogAndFriendsModConfig.barokGenericVolume.Value, "Cheese" => ReindogAndFriendsModConfig.cheeseGenericVolume.Value, _ => -1f, }; } public static float GetRoamingVolumeConfig(string itemName) { return itemName switch { "Sonic" => ReindogAndFriendsModConfig.sonicVolume.Value, "Crawly" => ReindogAndFriendsModConfig.crawlyVolume.Value, "Deku" => ReindogAndFriendsModConfig.dekuVolume.Value, "Rayman" => ReindogAndFriendsModConfig.raymanVolume.Value, "Shadow" => ReindogAndFriendsModConfig.shadowVolume.Value, "Remy" => ReindogAndFriendsModConfig.remyVolume.Value, "Knuckles" => ReindogAndFriendsModConfig.knucklesVolume.Value, "1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomVolume.Value, _ => 1f, }; } public static float GetSpeedConfig(string itemName) { return itemName switch { "Sonic" => ReindogAndFriendsModConfig.sonicSpeed.Value, "Crawly" => ReindogAndFriendsModConfig.crawlySpeed.Value, "Deku" => ReindogAndFriendsModConfig.dekuSpeed.Value, "Rayman" => ReindogAndFriendsModConfig.raymanSpeed.Value, "Shadow" => ReindogAndFriendsModConfig.shadowSpeed.Value, "Remy" => ReindogAndFriendsModConfig.remySpeed.Value, "Knuckles" => ReindogAndFriendsModConfig.knucklesSpeed.Value, "1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomSpeed.Value, _ => 5f, }; } public static int GetRoamChanceConfig(string itemName) { return itemName switch { "Sonic" => ReindogAndFriendsModConfig.sonicRoamChance.Value, "Crawly" => ReindogAndFriendsModConfig.crawlyRoamChance.Value, "Deku" => ReindogAndFriendsModConfig.dekuRoamChance.Value, "Rayman" => ReindogAndFriendsModConfig.raymanRoamChance.Value, "Shadow" => ReindogAndFriendsModConfig.shadowRoamChance.Value, "Remy" => ReindogAndFriendsModConfig.remyRoamChance.Value, "Knuckles" => ReindogAndFriendsModConfig.knucklesRoamChance.Value, "1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomRoamChance.Value, _ => 100, }; } public static float GetMaxHearableDistanceConfig(string itemName) { return itemName switch { "Sonic" => ReindogAndFriendsModConfig.sonicHearableDist.Value, "Crawly" => ReindogAndFriendsModConfig.crawlyHearableDist.Value, "Deku" => ReindogAndFriendsModConfig.dekuHearableDist.Value, "Rayman" => ReindogAndFriendsModConfig.raymanHearableDist.Value, "Shadow" => ReindogAndFriendsModConfig.shadowHearableDist.Value, "Remy" => ReindogAndFriendsModConfig.remyHearableDist.Value, "Knuckles" => ReindogAndFriendsModConfig.knucklesHearableDist.Value, "1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomHearableDist.Value, _ => 40f, }; } public static int GetMusicMode(string itemName) { if (!(itemName == "Crawly")) { if (itemName == "Knuckles") { return ReindogAndFriendsModConfig.knucklesMusicMode.Value; } return -1; } return ReindogAndFriendsModConfig.crawlyMusicMode.Value; } internal static void Patch() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("ReindogFan1372.ReindogDLL"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); Logger.LogDebug((object)"Finished patching!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } private static void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } internal class MyModConfig { public readonly ConfigEntry barokSpawnRate; public readonly ConfigEntry barokGenericVolume; public readonly ConfigEntry boberKurwaSpawnRate; public readonly ConfigEntry boberKurwaGenericVolume; public readonly ConfigEntry miniNukeSpawnRate; public readonly ConfigEntry miniNukeExplodeChance; public readonly ConfigEntry timeBetweenBombActivationChecksMax; public readonly ConfigEntry nukeDetonationTime; public readonly ConfigEntry miniNukeGenericVolume; public readonly ConfigEntry miniNukeBeepingVolume; public readonly ConfigEntry miniNukeExplosionVolume; public readonly ConfigEntry brodaSpawnRate; public readonly ConfigEntry brodaGenericVolume; public readonly ConfigEntry chrisGriffinSpawnRate; public readonly ConfigEntry chrisGriffinGenericVolume; public readonly ConfigEntry cheeseSpawnRate; public readonly ConfigEntry cheeseGenericVolume; public readonly ConfigEntry cheeseMouseSpawnDelayMin; public readonly ConfigEntry cheeseMouseSpawnDelayMax; public readonly ConfigEntry cheeseMaxNumOfMiceGroups; public readonly ConfigEntry cheeseMouseSpawnChance; public readonly ConfigEntry cheeseMouseSqueakVolume; public readonly ConfigEntry cheeseMouseAgentSpeed; public readonly ConfigEntry cheeseMouseSqueakDelayMin; public readonly ConfigEntry cheeseMouseSqueakDelayMax; public readonly ConfigEntry cheeseMouseSqueakWhilstIdle; public readonly ConfigEntry cheeseOnlySpawnMiceWhilstHeld; public readonly ConfigEntry cidSpawnRate; public readonly ConfigEntry cidGenericVolume; public readonly ConfigEntry clydeSpawnRate; public readonly ConfigEntry clydeGenericVolume; public readonly ConfigEntry crawlySpawnRate; public readonly ConfigEntry crawlyVolume; public readonly ConfigEntry crawlyMusicMode; public readonly ConfigEntry crawlySpeed; public readonly ConfigEntry crawlyRoamChance; public readonly ConfigEntry crawlyHearableDist; public readonly ConfigEntry crawlyGenericVolume; public readonly ConfigEntry randomiseSize; public readonly ConfigEntry minRandomisedSize; public readonly ConfigEntry maxRandomisedSize; public readonly ConfigEntry dekuSpawnRate; public readonly ConfigEntry dekuVolume; public readonly ConfigEntry dekuSpeed; public readonly ConfigEntry dekuRoamChance; public readonly ConfigEntry dekuHearableDist; public readonly ConfigEntry dekuGenericVolume; public readonly ConfigEntry fosgreathSpawnRate; public readonly ConfigEntry fosgreathGenericVolume; public readonly ConfigEntry friezaSpawnRate; public readonly ConfigEntry friezaGenericVolume; public readonly ConfigEntry goldenReindogSpawnRate; public readonly ConfigEntry goldenReindogGenericVolume; public readonly ConfigEntry hamsterSpawnRate; public readonly ConfigEntry hamsterGenericVolume; public readonly ConfigEntry ironGiantSpawnRate; public readonly ConfigEntry ironGiantGenericVolume; public readonly ConfigEntry lebronSpawnRate; public readonly ConfigEntry lebronGenericVolume; public readonly ConfigEntry lightningMcqueenSpawnRate; public readonly ConfigEntry lightningMcQueenGenericVolume; public readonly ConfigEntry monkeyCubeSpawnRate; public readonly ConfigEntry monkeyCubeGenericVolume; public readonly ConfigEntry nerdSpawnRate; public readonly ConfigEntry nerdGenericVolume; public readonly ConfigEntry optimusPrimeSpawnRate; public readonly ConfigEntry optimusPrimeGenericVolume; public readonly ConfigEntry ratSpawnRate; public readonly ConfigEntry ratGenericVolume; public readonly ConfigEntry reindogSpawnRate; public readonly ConfigEntry reindogGenericVolume; public readonly ConfigEntry saulBigmanSpawnRate; public readonly ConfigEntry saulBigmanGenericVolume; public readonly ConfigEntry saulGoodmanSpawnRate; public readonly ConfigEntry saulGoodmanGenericVolume; public readonly ConfigEntry sholmesSpawnRate; public readonly ConfigEntry sholmesGenericVolume; public readonly ConfigEntry sonicSpawnRate; public readonly ConfigEntry sonicVolume; public readonly ConfigEntry sonicSpeed; public readonly ConfigEntry sonicRoamChance; public readonly ConfigEntry sonicHearableDist; public readonly ConfigEntry sonicGenericVolume; public readonly ConfigEntry supermanSpawnRate; public readonly ConfigEntry supermanGenericVolume; public readonly ConfigEntry babySpawnRate; public readonly ConfigEntry babyGenericVolume; public readonly ConfigEntry fanSpawnRate; public readonly ConfigEntry fanVolume; public readonly ConfigEntry fanBlowForceMin; public readonly ConfigEntry fanBlowForceMax; public readonly ConfigEntry fanBlowDist; public readonly ConfigEntry fanActivationChance; public readonly ConfigEntry fanActivationMaxInterval; public readonly ConfigEntry fanGenericVolume; public readonly ConfigEntry raymanSpawnRate; public readonly ConfigEntry raymanVolume; public readonly ConfigEntry raymanSpeed; public readonly ConfigEntry raymanRoamChance; public readonly ConfigEntry raymanHearableDist; public readonly ConfigEntry raymanGenericVolume; public readonly ConfigEntry shadowSpawnRate; public readonly ConfigEntry shadowVolume; public readonly ConfigEntry shadowSpeed; public readonly ConfigEntry shadowRoamChance; public readonly ConfigEntry shadowHearableDist; public readonly ConfigEntry shadowGenericVolume; public readonly ConfigEntry knucklesSpawnRate; public readonly ConfigEntry knucklesVolume; public readonly ConfigEntry knucklesSpeed; public readonly ConfigEntry knucklesRoamChance; public readonly ConfigEntry knucklesHearableDist; public readonly ConfigEntry knucklesMusicMode; public readonly ConfigEntry knucklesGenericVolume; public readonly ConfigEntry remySpawnRate; public readonly ConfigEntry remyVolume; public readonly ConfigEntry remySpeed; public readonly ConfigEntry remyRoamChance; public readonly ConfigEntry remyHearableDist; public readonly ConfigEntry remyGenericVolume; public readonly ConfigEntry maximumFosgreathModeEnabled; public readonly ConfigEntry dekuExplodeTargetPlayerName; public readonly ConfigEntry holdingPenCost; public readonly ConfigEntry holdingPenGenericVolume; public readonly ConfigEntry quicktimeEventsToggle; public readonly ConfigEntry quicktimeEventsDropRate; public readonly ConfigEntry quicktimeEventsIncreaseRate; public readonly ConfigEntry quicktimeEventChance; public readonly ConfigEntry quicktimeEventIntervalMax; public readonly ConfigEntry quicktimeEventIntervalMin; public readonly ConfigEntry marioRarity; public readonly ConfigEntry marioHealth; public readonly ConfigEntry marioSearchSpeed; public readonly ConfigEntry marioChaseSpeed; public readonly ConfigEntry marioChaseMusicVolume; public readonly ConfigEntry marioDamagePerHit; public readonly ConfigEntry mushroomSpawnRate; public readonly ConfigEntry mushroomVolume; public readonly ConfigEntry mushroomSpeed; public readonly ConfigEntry mushroomRoamChance; public readonly ConfigEntry mushroomHearableDist; public readonly ConfigEntry mushroomGenericVolume; public readonly ConfigEntry marioMaxHearableDistSfx; public readonly ConfigEntry marioMaxHearableDistChaseMusic; public readonly ConfigEntry marioMaxCount; public readonly ConfigEntry marioPowerLevel; public readonly ConfigEntry minNumOfMushroomsToSpawn; public readonly ConfigEntry maxNumOfMushroomsToSpawn; public readonly ConfigEntry reindogTriggerChance; public readonly ConfigEntry reindogAmbientAudioVol; public MyModConfig(ConfigFile cfg) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Expected O, but got Unknown //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Expected O, but got Unknown //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Expected O, but got Unknown //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Expected O, but got Unknown //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Expected O, but got Unknown //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Expected O, but got Unknown //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Expected O, but got Unknown //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Expected O, but got Unknown //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Expected O, but got Unknown //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Expected O, but got Unknown //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Expected O, but got Unknown //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Expected O, but got Unknown //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Expected O, but got Unknown //IL_07a2: Unknown result type (might be due to invalid IL or missing references) //IL_07ac: Expected O, but got Unknown //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_0802: Expected O, but got Unknown //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0858: Expected O, but got Unknown //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Expected O, but got Unknown //IL_08fa: Unknown result type (might be due to invalid IL or missing references) //IL_0904: Expected O, but got Unknown //IL_0950: Unknown result type (might be due to invalid IL or missing references) //IL_095a: Expected O, but got Unknown //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09b0: Expected O, but got Unknown //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Expected O, but got Unknown //IL_0a0e: Unknown result type (might be due to invalid IL or missing references) //IL_0a18: Expected O, but got Unknown //IL_0a64: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Expected O, but got Unknown //IL_0aba: Unknown result type (might be due to invalid IL or missing references) //IL_0ac4: Expected O, but got Unknown //IL_0b10: Unknown result type (might be due to invalid IL or missing references) //IL_0b1a: Expected O, but got Unknown //IL_0b66: Unknown result type (might be due to invalid IL or missing references) //IL_0b70: Expected O, but got Unknown //IL_0bbc: Unknown result type (might be due to invalid IL or missing references) //IL_0bc6: Expected O, but got Unknown //IL_0c12: Unknown result type (might be due to invalid IL or missing references) //IL_0c1c: Expected O, but got Unknown //IL_0c68: Unknown result type (might be due to invalid IL or missing references) //IL_0c72: Expected O, but got Unknown //IL_0cbe: Unknown result type (might be due to invalid IL or missing references) //IL_0cc8: Expected O, but got Unknown //IL_0d14: Unknown result type (might be due to invalid IL or missing references) //IL_0d1e: Expected O, but got Unknown //IL_0d6a: Unknown result type (might be due to invalid IL or missing references) //IL_0d74: Expected O, but got Unknown //IL_0d9f: Unknown result type (might be due to invalid IL or missing references) //IL_0da9: Expected O, but got Unknown //IL_0df4: Unknown result type (might be due to invalid IL or missing references) //IL_0dfe: Expected O, but got Unknown //IL_0e2d: Unknown result type (might be due to invalid IL or missing references) //IL_0e37: Expected O, but got Unknown //IL_0e66: Unknown result type (might be due to invalid IL or missing references) //IL_0e70: Expected O, but got Unknown //IL_0e9f: Unknown result type (might be due to invalid IL or missing references) //IL_0ea9: Expected O, but got Unknown //IL_0ed8: Unknown result type (might be due to invalid IL or missing references) //IL_0ee2: Expected O, but got Unknown //IL_0f11: Unknown result type (might be due to invalid IL or missing references) //IL_0f1b: Expected O, but got Unknown //IL_0f4a: Unknown result type (might be due to invalid IL or missing references) //IL_0f54: Expected O, but got Unknown //IL_0f83: Unknown result type (might be due to invalid IL or missing references) //IL_0f8d: Expected O, but got Unknown //IL_0fbc: Unknown result type (might be due to invalid IL or missing references) //IL_0fc6: Expected O, but got Unknown //IL_0ff5: Unknown result type (might be due to invalid IL or missing references) //IL_0fff: Expected O, but got Unknown //IL_102e: Unknown result type (might be due to invalid IL or missing references) //IL_1038: Expected O, but got Unknown //IL_115d: Unknown result type (might be due to invalid IL or missing references) //IL_1167: Expected O, but got Unknown //IL_118c: Unknown result type (might be due to invalid IL or missing references) //IL_1196: Expected O, but got Unknown //IL_11bb: Unknown result type (might be due to invalid IL or missing references) //IL_11c5: Expected O, but got Unknown //IL_11ea: Unknown result type (might be due to invalid IL or missing references) //IL_11f4: Expected O, but got Unknown //IL_1219: Unknown result type (might be due to invalid IL or missing references) //IL_1223: Expected O, but got Unknown //IL_1248: Unknown result type (might be due to invalid IL or missing references) //IL_1252: Expected O, but got Unknown //IL_1277: Unknown result type (might be due to invalid IL or missing references) //IL_1281: Expected O, but got Unknown //IL_12a6: Unknown result type (might be due to invalid IL or missing references) //IL_12b0: Expected O, but got Unknown //IL_14e6: Unknown result type (might be due to invalid IL or missing references) //IL_14f0: Expected O, but got Unknown //IL_1571: Unknown result type (might be due to invalid IL or missing references) //IL_157b: Expected O, but got Unknown //IL_15e2: Unknown result type (might be due to invalid IL or missing references) //IL_15ec: Expected O, but got Unknown //IL_161b: Unknown result type (might be due to invalid IL or missing references) //IL_1625: Expected O, but got Unknown //IL_1654: Unknown result type (might be due to invalid IL or missing references) //IL_165e: Expected O, but got Unknown //IL_168d: Unknown result type (might be due to invalid IL or missing references) //IL_1697: Expected O, but got Unknown //IL_16bc: Unknown result type (might be due to invalid IL or missing references) //IL_16c6: Expected O, but got Unknown //IL_16eb: Unknown result type (might be due to invalid IL or missing references) //IL_16f5: Expected O, but got Unknown //IL_171a: Unknown result type (might be due to invalid IL or missing references) //IL_1724: Expected O, but got Unknown //IL_1747: Unknown result type (might be due to invalid IL or missing references) //IL_1751: Expected O, but got Unknown //IL_1774: Unknown result type (might be due to invalid IL or missing references) //IL_177e: Expected O, but got Unknown //IL_17a2: Unknown result type (might be due to invalid IL or missing references) //IL_17ac: Expected O, but got Unknown //IL_17da: Unknown result type (might be due to invalid IL or missing references) //IL_17e4: Expected O, but got Unknown //IL_1808: Unknown result type (might be due to invalid IL or missing references) //IL_1812: Expected O, but got Unknown //IL_1881: Unknown result type (might be due to invalid IL or missing references) //IL_188b: Expected O, but got Unknown //IL_18ba: Unknown result type (might be due to invalid IL or missing references) //IL_18c4: Expected O, but got Unknown //IL_190f: Unknown result type (might be due to invalid IL or missing references) //IL_1919: Expected O, but got Unknown //IL_1948: Unknown result type (might be due to invalid IL or missing references) //IL_1952: Expected O, but got Unknown cfg.SaveOnConfigSet = false; boberKurwaSpawnRate = cfg.Bind("Bober Kurwa", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); boberKurwaGenericVolume = cfg.Bind("Bober Kurwa", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); barokSpawnRate = cfg.Bind("Barok Van Zieks", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); barokGenericVolume = cfg.Bind("Barok Van Zieks", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); sholmesSpawnRate = cfg.Bind("Herlock Sholmes", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); sholmesGenericVolume = cfg.Bind("Herlock Sholmes", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); miniNukeSpawnRate = cfg.Bind("Mini Nuke", "Item Weighting", 12, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); miniNukeGenericVolume = cfg.Bind("Mini Nuke", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); brodaSpawnRate = cfg.Bind("Broda", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); brodaGenericVolume = cfg.Bind("Broda", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); cheeseSpawnRate = cfg.Bind("Cheese", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); cheeseGenericVolume = cfg.Bind("Cheese", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); cheeseMouseSpawnChance = cfg.Bind("Cheese", "Mouse Spawn Chance", 15, new ConfigDescription("Percent chance for a mouse to spawn", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); cheeseMouseSpawnDelayMin = cfg.Bind("Cheese", "Mouse Spawn Delay Min", 5f, new ConfigDescription("Minimum Delay Before Another Mouse Can Spawn (in seconds)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 300f), Array.Empty())); cheeseMouseSpawnDelayMax = cfg.Bind("Cheese", "Mouse Spawn Delay Max", 5f, new ConfigDescription("Maximum Delay Before Another Mouse Can Spawn (in seconds)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 300f), Array.Empty())); cheeseMaxNumOfMiceGroups = cfg.Bind("Cheese", "Max Number of Mice Groups Per Cheese", 10, new ConfigDescription("Maximum Number of Mice Groups That Can Spawn Per Cheese (the higher the value, the more intensive it will be)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); cheeseMouseSqueakVolume = cfg.Bind("Cheese", "Mouse Squeak Volume", 1f, new ConfigDescription("Mouse Squeak Volume", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); cheeseMouseSqueakDelayMin = cfg.Bind("Cheese", "Mouse Squeak Delay Min", 3f, new ConfigDescription("Minimum Delay Before The Mouse Can Squeak Again", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 300f), Array.Empty())); cheeseMouseSqueakDelayMax = cfg.Bind("Cheese", "Mouse Squeak Delay Max", 9f, new ConfigDescription("Maximum Delay Before The Mouse Can Squeak Again", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 300f), Array.Empty())); cheeseMouseAgentSpeed = cfg.Bind("Cheese", "Mouse Speed", 7f, new ConfigDescription("How Fast The Mice Move", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 30f), Array.Empty())); cheeseMouseSqueakWhilstIdle = cfg.Bind("Cheese", "Squeak Whilst Idle?", true, "Should the mice squeak whilst they are idle as well as whilst they are chasing?"); cheeseOnlySpawnMiceWhilstHeld = cfg.Bind("Cheese", "Only Spawn Mice Whilst Held?", false, "Should the mice only spawn if the cheese is currently being held or pocketed by a player?"); chrisGriffinSpawnRate = cfg.Bind("Chris Griffin", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); chrisGriffinGenericVolume = cfg.Bind("Chris Griffin", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); cidSpawnRate = cfg.Bind("Cid", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); cidGenericVolume = cfg.Bind("Cid", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); clydeSpawnRate = cfg.Bind("Clyde", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); clydeGenericVolume = cfg.Bind("Clyde", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); crawlySpawnRate = cfg.Bind("Crawly The Wizard", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); crawlyGenericVolume = cfg.Bind("Crawly The Wizard", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); dekuSpawnRate = cfg.Bind("Deku", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); dekuGenericVolume = cfg.Bind("Deku", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); fosgreathSpawnRate = cfg.Bind("Fosgreath", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); fosgreathGenericVolume = cfg.Bind("Fosgreath", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); friezaSpawnRate = cfg.Bind("Frieza", "Item Weighting", 35, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); friezaGenericVolume = cfg.Bind("Frieza", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); goldenReindogSpawnRate = cfg.Bind("GoldenReindog", "Item Weighting", 0, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); goldenReindogGenericVolume = cfg.Bind("GoldenReindog", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); hamsterSpawnRate = cfg.Bind("Hamster", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); hamsterGenericVolume = cfg.Bind("Hamster", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); ironGiantSpawnRate = cfg.Bind("Iron Giant", "Item Weighting", 12, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); ironGiantGenericVolume = cfg.Bind("Iron Giant", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); lebronSpawnRate = cfg.Bind("LeBron", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); lebronGenericVolume = cfg.Bind("LeBron", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); lightningMcqueenSpawnRate = cfg.Bind("Lightning McQueen", "Item Weighting", 12, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); lightningMcQueenGenericVolume = cfg.Bind("Lightning McQueen", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); monkeyCubeSpawnRate = cfg.Bind("Monkey Cube", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); monkeyCubeGenericVolume = cfg.Bind("Monkey Cube", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); nerdSpawnRate = cfg.Bind("Nerd", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); nerdGenericVolume = cfg.Bind("Nerd", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); optimusPrimeSpawnRate = cfg.Bind("Optimus Prime", "Item Weighting (Default 30)", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); optimusPrimeGenericVolume = cfg.Bind("Optimus Prime", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); ratSpawnRate = cfg.Bind("Rat", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); ratGenericVolume = cfg.Bind("Rat", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); reindogSpawnRate = cfg.Bind("Reindog", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); reindogGenericVolume = cfg.Bind("Reindog", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); reindogTriggerChance = cfg.Bind("Reindog", "Activation Chance", 10, new ConfigDescription("Chance to trigger Reindogs teleportation", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); reindogAmbientAudioVol = cfg.Bind("Reindog", "Realm Audio", 1f, new ConfigDescription("Controls the volume of the audio that plays in Reindog's Realm", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); saulBigmanSpawnRate = cfg.Bind("Saul Bigman", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); saulBigmanGenericVolume = cfg.Bind("Saul Bigman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); saulGoodmanSpawnRate = cfg.Bind("Saul Goodman", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); saulGoodmanGenericVolume = cfg.Bind("Saul Goodman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); sonicSpawnRate = cfg.Bind("Sonic", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); sonicGenericVolume = cfg.Bind("Sonic", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); supermanSpawnRate = cfg.Bind("Superman", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); supermanGenericVolume = cfg.Bind("Superman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); babySpawnRate = cfg.Bind("Baby", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); babyGenericVolume = cfg.Bind("Baby", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); raymanSpawnRate = cfg.Bind("Rayman", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); raymanGenericVolume = cfg.Bind("Rayman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); shadowSpawnRate = cfg.Bind("Shadow", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); shadowGenericVolume = cfg.Bind("Shadow", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); remySpawnRate = cfg.Bind("Remy", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); remyGenericVolume = cfg.Bind("Remy", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); fanSpawnRate = cfg.Bind("Fan", "Item Weighting", 25, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); fanGenericVolume = cfg.Bind("Fan", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); knucklesSpawnRate = cfg.Bind("Knuckles", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); knucklesGenericVolume = cfg.Bind("Knuckles", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); marioRarity = cfg.Bind("Mario", "Spawn Weighting", 220, new ConfigDescription("How likely this enemy is to spawn over others", (AcceptableValueBase)(object)new AcceptableValueRange(0, 9999), Array.Empty())); mushroomSpawnRate = cfg.Bind("Mushroom", "Item Weighting", 0, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap"); mushroomGenericVolume = cfg.Bind("Mushroom", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); holdingPenGenericVolume = cfg.Bind("Holding Pen", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); crawlyVolume = cfg.Bind("Crawly The Wizard", "Roaming Audio Volume", 0.28f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); sonicVolume = cfg.Bind("Sonic", "Roaming Audio Volume", 0.5f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); dekuVolume = cfg.Bind("Deku", "Roaming Audio Volume", 0.9f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); raymanVolume = cfg.Bind("Rayman", "Roaming Audio Volume", 0.8f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); shadowVolume = cfg.Bind("Shadow", "Roaming Audio Volume", 0.75f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); knucklesVolume = cfg.Bind("Knuckles", "Roaming Audio Volume", 0.7f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); mushroomVolume = cfg.Bind("Mushroom", "Roaming Audio Volume", 0.7f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); fanVolume = cfg.Bind("Fan", "Volume of the fan", 1f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); remyVolume = cfg.Bind("Remy", "Roaming Audio Volume", 0.7f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); sonicSpeed = cfg.Bind("Sonic", "Roaming Speed (Default 16.75)", 16.75f, "How fast should they move around"); crawlySpeed = cfg.Bind("Crawly The Wizard", "Roaming Speed (Default 2.1)", 2.1f, "How fast should they move around"); dekuSpeed = cfg.Bind("Deku", "Chase Speed (Default 12.5)", 12.5f, "How fast should deku chase the player"); raymanSpeed = cfg.Bind("Rayman", "Roaming Speed (Default 9)", 9f, "How fast should they move around"); knucklesSpeed = cfg.Bind("Knuckles", "Roaming Speed (Default 12.5)", 12.5f, "How fast should they move around"); shadowSpeed = cfg.Bind("Shadow", "Roaming Speed (Default 16.5)", 16.5f, "How fast should they move around"); remySpeed = cfg.Bind("Remy", "Roaming Speed (Default 0.9)", 0.9f, "How fast should they move around"); mushroomSpeed = cfg.Bind("Mushroom", "Roaming Speed", 5.5f, "How fast should they move around"); dekuRoamChance = cfg.Bind("Deku", "Chase chance (default 50)", 50, new ConfigDescription("Chance to chase the player on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); sonicRoamChance = cfg.Bind("Sonic", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); crawlyRoamChance = cfg.Bind("Crawly The Wizard", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); raymanRoamChance = cfg.Bind("Rayman", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); knucklesRoamChance = cfg.Bind("Knuckles", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); shadowRoamChance = cfg.Bind("Shadow", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); remyRoamChance = cfg.Bind("Remy", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); mushroomRoamChance = cfg.Bind("Mushroom", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); crawlyHearableDist = cfg.Bind("Crawly The Wizard", "Max Audio Distance (default 32)", 32f, "Max distance at which audio is still audible"); sonicHearableDist = cfg.Bind("Sonic", "Max Audio Distance (default 45f)", 42f, "Max distance at which audio is still audible"); raymanHearableDist = cfg.Bind("Rayman", "Max Audio Distance (default 40f)", 40f, "Max distance at which audio is still audible"); dekuHearableDist = cfg.Bind("Deku", "Max Audio Distance (default 50f)", 50f, "Max distance at which audio is still audible"); shadowHearableDist = cfg.Bind("Shadow", "Max Audio Distance (default 45)", 42f, "Max distance at which audio is still audible"); remyHearableDist = cfg.Bind("Remy", "Max Audio Distance", 32f, "Max distance at which audio is still audible"); mushroomHearableDist = cfg.Bind("Mushroom", "Max Audio Distance", 40f, "Max distance at which audio is still audible"); knucklesHearableDist = cfg.Bind("Knuckles", "Max Audio Distance (default 45)", 45f, "Max distance at which audio is still audible"); maximumFosgreathModeEnabled = cfg.Bind("Fosgreath", "Enable Maximum Fosgreath Mode (default false)", false, "Should Maximum Fosgreath Mode Be Enabled?"); dekuExplodeTargetPlayerName = cfg.Bind("Deku", "Target Player Name (default NULL)", "NUll", "Deku has a small chance to explode when held by the player with the specified username"); holdingPenCost = cfg.Bind("Holding Pen", "Price of the Holding Pen (default 100)", 100, "Price of the Holding Pen when purchasing from the store in the terminal"); crawlyMusicMode = cfg.Bind("Crawly The Wizard", "Roaming Audio (default standard)", 0, "Which Audio should be played whilst roaming {0 = standard, 1 = full, 2 = lyrics}"); knucklesMusicMode = cfg.Bind("Knuckles", "Roaming Audio (default standard)", 0, "Which Audio should be played whilst roaming {0 = standard, 1 = All Knuckles}"); fanBlowForceMin = cfg.Bind("Fan", "Blow Force Minimum", 2.2f, "How much force should the fan exert at minimum (at max distance from fan)"); fanBlowForceMax = cfg.Bind("Fan", "Blow Force Maximum", 12f, "How much force should the fan exert at maximum (close to fan)"); fanBlowDist = cfg.Bind("Fan", "Blowing Distance", 18f, "How far does the fans blow reach"); fanActivationMaxInterval = cfg.Bind("Fan", "Max Activation Interval", 7.5f, "How long should the fan wait at max before checking if it should turn on"); fanActivationChance = cfg.Bind("Fan", "Activation Chance", 10, new ConfigDescription("Chance for the fan to turn on every interval", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); quicktimeEventsToggle = cfg.Bind("Quicktime Events", "Enable Quicktime Events?", true, "Should Quicktime Events be enabled for roaming scrap?"); quicktimeEventsDropRate = cfg.Bind("Quicktime Events", "Drop Rate", 0.4f, "Rate at which the progress bar decreases"); quicktimeEventsIncreaseRate = cfg.Bind("Quicktime Events", "Increase Rate", 0.12f, "Rate at which the progress bar increase per button tap as a percent (0.1 = 10% of the bar per tap)"); quicktimeEventChance = cfg.Bind("Quicktime Events", "Drop Chance", 40, new ConfigDescription("Chance of triggering the dropping quicktime event every quicktime interval", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); quicktimeEventIntervalMin = cfg.Bind("Quicktime Events", "Minimum Interval", 7.5f, "Minimum time holding the item before the quicktime event could possibly trigger (randomised between min and max interval)"); quicktimeEventIntervalMax = cfg.Bind("Quicktime Events", "Maximum Interval", 25f, "Maximum time holding the item before the quicktime event could possibly trigger (randomised between min and max interval)"); marioHealth = cfg.Bind("Mario", "Health", 8, new ConfigDescription("How much health should mario have", (AcceptableValueBase)(object)new AcceptableValueRange(0, 9999), Array.Empty())); marioSearchSpeed = cfg.Bind("Mario", "Search Speed", 2.1f, new ConfigDescription("How fast should Mario move whilst searching?", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 15f), Array.Empty())); marioChaseSpeed = cfg.Bind("Mario", "Chase Speed", 3f, new ConfigDescription("How fast should Mario move whilst chasing a player?", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 20f), Array.Empty())); marioChaseMusicVolume = cfg.Bind("Mario", "Chase Music Volume", 0.9f, new ConfigDescription("How loud should the chase music be? (0 to turn it off)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); marioDamagePerHit = cfg.Bind("Mario", "Mario Damage", 35, new ConfigDescription("How much damage should be dealt when hit by Mario's Punch?", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); marioMaxHearableDistSfx = cfg.Bind("Mario", "Sound Effect Distance", 35, new ConfigDescription("How many units should mario's sound effects travel?", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); marioMaxHearableDistChaseMusic = cfg.Bind("Mario", "Chase Music Distance", 30, new ConfigDescription("How many units should mario's chase music travel?", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); marioMaxCount = cfg.Bind("Mario", "Max Count", 2, new ConfigDescription("Max number of Mario's that can be active each round", (AcceptableValueBase)(object)new AcceptableValueRange(0, 5), Array.Empty())); marioPowerLevel = cfg.Bind("Mario", "Power Level", 2, new ConfigDescription("How much should Mario contribute to the rounds max power level? (for reference, 1 is the power level of a hoarding bug, 3 is a thumper)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 5), Array.Empty())); minNumOfMushroomsToSpawn = cfg.Bind("Mario", "Min Number of Mushrooms to Spawn", 1, new ConfigDescription("How many mushrooms should Mario spawn on death at minimum?)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 10), Array.Empty())); maxNumOfMushroomsToSpawn = cfg.Bind("Mario", "Max Number of Mushrooms to Spawn", 3, new ConfigDescription("How many mushrooms should Mario spawn on death at maximum?)", (AcceptableValueBase)(object)new AcceptableValueRange(minNumOfMushroomsToSpawn.Value, 10), Array.Empty())); miniNukeExplodeChance = cfg.Bind("Mini Nuke", "Explosion Chance (0-100)", 2, new ConfigDescription("Chance for the explosion procedure to be triggered", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); timeBetweenBombActivationChecksMax = cfg.Bind("Mini Nuke", "Activation Check Timer", 10f, "Max time for the bomb to check if it should explode (random between 0 and this value)"); nukeDetonationTime = cfg.Bind("Mini Nuke", "How Long It Takes The Nuke To Explode", 6.5f, "Once the bomb is activated, how long it will take before it explodes"); miniNukeBeepingVolume = cfg.Bind("Mini Nuke", "Beeping Volume", 1f, new ConfigDescription("How loud should this audio be?", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); miniNukeExplosionVolume = cfg.Bind("Mini Nuke", "Explosion Volume", 1f, new ConfigDescription("How loud should this audio be?", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); randomiseSize = cfg.Bind("Randomize Size", "Enable Size Randomisation?", false, "Randomizes item sizes and scales their weight and value accordingly"); minRandomisedSize = cfg.Bind("Randomize Size", "Minimum Randomised Size Modifier", 0.25f, new ConfigDescription("Minimum value the size can randomise to", (AcceptableValueBase)(object)new AcceptableValueRange(0.1f, 10f), Array.Empty())); maxRandomisedSize = cfg.Bind("Randomize Size", "Maximum Randomised Size Modifier", 3f, new ConfigDescription("Maximum value the size can randomise to", (AcceptableValueBase)(object)new AcceptableValueRange(0.1f, 10f), Array.Empty())); ClearOrphanedEntries(cfg); cfg.Save(); cfg.SaveOnConfigSet = true; } private static void ClearOrphanedEntries(ConfigFile cfg) { PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries"); Dictionary dictionary = (Dictionary)propertyInfo.GetValue(cfg); dictionary.Clear(); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "ReindogFan1372.ReindogDLL"; public const string PLUGIN_NAME = "ReindogDLL"; public const string PLUGIN_VERSION = "2.3.9"; } } namespace ReindogDLL.Patches { public class CheeseItem : GrabbableObject { public GameObject mousePrefab; private int mouseSpawnChance = 15; private float mouseSpawnDelayMin = 5f; private float mouseSpawnDelayMax = 10f; private float mouseSpawnDelay = 100f; private bool isOnCooldown = false; private int maxNumOfMice = 20; private int numOfMiceSpawned = 0; [HideInInspector] public float spawnDistFromCheese = 15f; private void Awake() { mouseSpawnChance = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSpawnChance.Value; mouseSpawnDelayMin = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSpawnDelayMin.Value; mouseSpawnDelayMax = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSpawnDelayMax.Value; maxNumOfMice = ReindogDLL.ReindogAndFriendsModConfig.cheeseMaxNumOfMiceGroups.Value; } public override void LateUpdate() { ((GrabbableObject)this).LateUpdate(); if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || !StartOfRound.Instance.shipHasLanded || !StartOfRound.Instance.currentLevel.planetHasTime || isOnCooldown) { return; } if (ReindogDLL.ReindogAndFriendsModConfig.cheeseOnlySpawnMiceWhilstHeld.Value) { if (base.isHeld || base.isPocketed) { CheckToSpawnMouseServerRpc(); } } else { CheckToSpawnMouseServerRpc(); } } [ServerRpc(RequireOwnership = false)] private void CheckToSpawnMouseServerRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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 != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(777328361u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 777328361u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isOnCooldown = true; mouseSpawnDelay = Random.Range(mouseSpawnDelayMin, mouseSpawnDelayMax); ((MonoBehaviour)this).Invoke("ResetMouseSpawnCooldown", mouseSpawnDelay); if (Random.Range(0, 100) <= mouseSpawnChance && numOfMiceSpawned < maxNumOfMice) { NavMeshHit val3 = default(NavMeshHit); Vector3 val4 = ((!NavMesh.SamplePosition(((Component)this).transform.position + Random.insideUnitSphere * spawnDistFromCheese, ref val3, spawnDistFromCheese / 2f, mousePrefab.GetComponent().areaMask)) ? base.targetFloorPosition : ((NavMeshHit)(ref val3)).position); GameObject val5 = Object.Instantiate(mousePrefab, val4, Quaternion.identity); val5.GetComponent().Spawn(false); val5.GetComponent().SetMouseAgentTarget(((Component)this).transform); numOfMiceSpawned++; } } } private void ResetMouseSpawnCooldown() { isOnCooldown = false; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(777328361u, new RpcReceiveHandler(__rpc_handler_777328361), "CheckToSpawnMouseServerRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_777328361(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; ((CheeseItem)(object)target).CheckToSpawnMouseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CheeseItem"; } } internal class CheeseLovingMouse : NetworkBehaviour { private enum CheeseState { Chasing, Idle } public AudioClip[] squeakNoises; public AudioSource audioSource; private RaycastHit doorHit; private NavMeshHit navmeshHit; private NavMeshAgent agent; private bool navMeshAvailable; private Animator[] mouseAnimators; private Transform targetCheese; private Vector3 targetPos = Vector3.zero; private float minSqueakDelay = 3f; private float maxSqueakDelay = 9f; private float squeakDelay = 1f; private bool onSqueakCooldown = false; private bool checkToDestroyCalled = false; private CheeseState currentCheeseState = CheeseState.Idle; private CheeseState lastCheeseState = CheeseState.Idle; [SerializeField] private LayerMask interactablesLayer; private CheeseItem _cheeseScript; private float distFromCheeseWhilstHeld = 2f; private float distFromCheeseWhilstGrounded = 1f; private float aiUpdateInterval = 0.08f; private float aiUpdateTimer = 0f; private Color32[] mouseColors = (Color32[])(object)new Color32[5] { new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue), new Color32((byte)87, (byte)78, (byte)72, byte.MaxValue), new Color32((byte)128, (byte)77, (byte)44, byte.MaxValue), new Color32((byte)212, (byte)193, (byte)181, byte.MaxValue), new Color32((byte)212, (byte)212, (byte)212, byte.MaxValue) }; private Random noiseRandomSeed; [SerializeField] private float noiseRange = 35f; private float minLoudness = 0.6f; private float maxLoudness = 1f; private void Awake() { agent = ((Component)this).GetComponent(); noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); distFromCheeseWhilstHeld = Random.Range(0.75f, 1.5f); distFromCheeseWhilstGrounded = Random.Range(0.5f, 1f); audioSource.volume = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakVolume.Value; if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { agent.speed = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseAgentSpeed.Value; agent.speed = Random.Range(agent.speed - 0.75f, agent.speed + 0.75f); minSqueakDelay = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakDelayMin.Value; minSqueakDelay = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakDelayMax.Value; } } public override void OnNetworkSpawn() { //IL_006a: 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_0097: 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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) ((NetworkBehaviour)this).OnNetworkSpawn(); if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { return; } int num = Random.Range(1, ((Component)this).transform.childCount + 1); int childCount = ((Component)this).transform.childCount; for (int i = 1; i <= childCount; i++) { if (i <= num) { Transform child = ((Component)this).transform.GetChild(i - 1); child.localPosition += new Vector3(Random.Range(-0.18f, 0.18f), 0f, Random.Range(-0.18f, 0.18f)); SyncMousePositionClientRpc(i - 1, ((Component)this).transform.GetChild(i - 1).localPosition); } else { ((Component)((Component)this).transform.GetChild(i - 1)).gameObject.SetActive(false); SyncMouseActiveStateClientRpc(i - 1); } } mouseAnimators = ((Component)this).GetComponentsInChildren(false); SyncMouseAnimatorsClientRpc(); for (int j = 0; j < mouseAnimators.Length; j++) { mouseAnimators[j].speed = Random.Range(0.62f, 1.38f); float num2 = 1f + (1f - mouseAnimators[j].speed); Transform transform = ((Component)mouseAnimators[j]).transform; transform.localScale *= num2; Color32 val = mouseColors[Random.Range(0, mouseColors.Length)]; ((Renderer)((Component)((Component)mouseAnimators[j]).transform.GetChild(0)).GetComponent()).material.color = Color32.op_Implicit(val); SyncMouseAnimatorValuesClientRpc(j, mouseAnimators[j].speed, num2, val); } } private void Update() { //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { return; } if ((Object)(object)targetCheese == (Object)null && !checkToDestroyCalled) { ((Component)((Component)this).transform.GetChild(0)).gameObject.SetActive(false); ((MonoBehaviour)this).Invoke("CheckToDestroy", 2f); checkToDestroyCalled = true; } if ((Object)(object)targetCheese == (Object)null || checkToDestroyCalled) { return; } if (!StartOfRound.Instance.shipHasLanded || !StartOfRound.Instance.currentLevel.planetHasTime) { if ((Object)(object)((Component)this).transform.parent != (Object)null) { return; } ((Component)this).transform.parent = StartOfRound.Instance.elevatorTransform; SyncParentToShipClientRpc(); if (currentCheeseState != CheeseState.Idle) { currentCheeseState = CheeseState.Idle; Animator[] array = mouseAnimators; foreach (Animator val in array) { val.SetBool("isIdle", true); val.SetBool("isChasing", false); } ((Behaviour)agent).enabled = false; SwitchToIdleClientRpc(); } return; } if ((Object)(object)((Component)this).transform.parent != (Object)null) { ((Component)this).transform.parent = null; SyncParentToNoneClientRpc(); } if (aiUpdateTimer < aiUpdateInterval) { aiUpdateTimer += Time.deltaTime; return; } aiUpdateTimer -= aiUpdateInterval; NavMeshHit val2 = default(NavMeshHit); navMeshAvailable = NavMesh.SamplePosition(((Component)this).transform.position, ref val2, 40f, agent.areaMask); if (!navMeshAvailable) { if (currentCheeseState != CheeseState.Idle) { currentCheeseState = CheeseState.Idle; Animator[] array2 = mouseAnimators; foreach (Animator val3 in array2) { val3.SetBool("isIdle", true); val3.SetBool("isChasing", false); } ((Behaviour)agent).enabled = false; SwitchToIdleClientRpc(); } return; } float num = ((((GrabbableObject)_cheeseScript).isHeld || ((GrabbableObject)_cheeseScript).isPocketed) ? distFromCheeseWhilstHeld : distFromCheeseWhilstGrounded); NavMesh.SamplePosition(targetCheese.position + num * Random.insideUnitSphere, ref navmeshHit, 25f, agent.areaMask); targetPos = ((NavMeshHit)(ref navmeshHit)).position; if (Vector3.Distance(((Component)this).transform.position, targetPos) < num) { currentCheeseState = CheeseState.Idle; } else if (Vector3.Distance(((Component)this).transform.position, targetPos) > 6f) { currentCheeseState = CheeseState.Chasing; } if (lastCheeseState != currentCheeseState) { switch (currentCheeseState) { case CheeseState.Idle: { Animator[] array4 = mouseAnimators; foreach (Animator val5 in array4) { val5.SetBool("isIdle", true); val5.SetBool("isChasing", false); } ((Behaviour)agent).enabled = false; SwitchToIdleClientRpc(); break; } case CheeseState.Chasing: { Animator[] array3 = mouseAnimators; foreach (Animator val4 in array3) { val4.SetBool("isChasing", true); val4.SetBool("isIdle", false); } EnableAgent(); if (agent.isOnNavMesh || agent.isOnOffMeshLink) { agent.SetDestination(targetPos); } SwitchToChasingClientRpc(targetPos); break; } } } if (currentCheeseState == CheeseState.Chasing) { if (agent.isOnNavMesh || agent.isOnOffMeshLink) { agent.SetDestination(targetPos); SyncAgentDestinationClientRpc(targetPos); } if (Vector3.Distance(((Component)this).transform.position, targetPos) > 45f && NavMesh.SamplePosition(targetPos + Random.insideUnitSphere * 3f, ref navmeshHit, 40f, agent.areaMask)) { agent.Warp(((NavMeshHit)(ref navmeshHit)).position); } TryAndOpenDoor(); if (!onSqueakCooldown) { int num2 = Random.Range(0, squeakNoises.Length); audioSource.PlayOneShot(squeakNoises[num2]); SqueakClientRpc(num2); SyncDetectNoiseClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)_cheeseScript), ((GrabbableObject)_cheeseScript).isInElevator && currentCheeseState == CheeseState.Idle); squeakDelay = Random.Range(minSqueakDelay, maxSqueakDelay); onSqueakCooldown = true; ((MonoBehaviour)this).Invoke("ResetSqueakCooldown", squeakDelay); } } if (ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakWhilstIdle.Value && currentCheeseState == CheeseState.Idle && !onSqueakCooldown) { int num3 = Random.Range(0, squeakNoises.Length); audioSource.PlayOneShot(squeakNoises[num3]); SqueakClientRpc(num3); SyncDetectNoiseClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)_cheeseScript), ((GrabbableObject)_cheeseScript).isInElevator && currentCheeseState == CheeseState.Idle); squeakDelay = Random.Range(minSqueakDelay, maxSqueakDelay); onSqueakCooldown = true; ((MonoBehaviour)this).Invoke("ResetSqueakCooldown", squeakDelay); } lastCheeseState = currentCheeseState; } public void SetMouseAgentTarget(Transform _cheese) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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) targetCheese = _cheese; _cheeseScript = ((Component)targetCheese).GetComponent(); EnableAgent(); if (NavMesh.SamplePosition(targetCheese.position + Random.insideUnitSphere * _cheeseScript.spawnDistFromCheese, ref navmeshHit, 45f, agent.areaMask)) { agent.Warp(((NavMeshHit)(ref navmeshHit)).position); } if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { int num = Random.Range(0, squeakNoises.Length); audioSource.PlayOneShot(squeakNoises[num]); SqueakClientRpc(num); SyncDetectNoiseClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)_cheeseScript), ((GrabbableObject)_cheeseScript).isInElevator && currentCheeseState == CheeseState.Idle); } } [ClientRpc] private void SwitchToIdleClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2926805633u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2926805633u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { Animator[] array = mouseAnimators; foreach (Animator val3 in array) { val3.SetBool("isIdle", true); val3.SetBool("isChasing", false); } ((Behaviour)agent).enabled = false; } } [ClientRpc] private void SwitchToChasingClientRpc(Vector3 newDestination) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4183928397u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newDestination); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4183928397u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { Animator[] array = mouseAnimators; foreach (Animator val3 in array) { val3.SetBool("isChasing", true); val3.SetBool("isIdle", false); } EnableAgent(); if (agent.isOnNavMesh || agent.isOnOffMeshLink) { agent.SetDestination(newDestination); } } } [ClientRpc] private void SyncAgentDestinationClientRpc(Vector3 newDestination) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3664322583u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newDestination); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3664322583u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (agent.isOnNavMesh || agent.isOnOffMeshLink) { agent.SetDestination(newDestination); } } } [ClientRpc] private void SqueakClientRpc(int noiseIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(54237842u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, noiseIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 54237842u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { audioSource.PlayOneShot(squeakNoises[noiseIndex]); } } } private void ResetSqueakCooldown() { onSqueakCooldown = false; } private void TryAndOpenDoor() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (Physics.SphereCast(((Component)this).transform.position + new Vector3(0f, 0.5f, 0f), 0.55f, ((Component)this).transform.forward, ref doorHit, 2.9f, LayerMask.op_Implicit(interactablesLayer)) && Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref doorHit)).transform).gameObject.GetComponent())) { DoorLock component = ((Component)((RaycastHit)(ref doorHit)).transform).GetComponent(); if (!component.isLocked && !component.isDoorOpened) { ((Component)((RaycastHit)(ref doorHit)).transform).GetComponent().TriggerAnimationNonPlayer(false, true, false); component.OpenDoorAsEnemyServerRpc(); } } } private void CheckToDestroy() { if ((Object)(object)targetCheese == (Object)null) { CheckToDestroyClientRpc(); return; } checkToDestroyCalled = false; ((Component)((Component)this).transform.GetChild(0)).gameObject.SetActive(true); } [ClientRpc] private void CheckToDestroyClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3626012183u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3626012183u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { if (((NetworkBehaviour)this).NetworkObject.IsSpawned) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } } [ClientRpc] private void SyncDetectNoiseClientRpc(NetworkBehaviourReference hostCheeseScript, bool inElevatorAndIdle) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3327852196u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref hostCheeseScript, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref inElevatorAndIdle, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3327852196u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CheeseItem cheeseItem = (CheeseItem)(object)NetworkBehaviourReference.op_Implicit(hostCheeseScript); float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, inElevatorAndIdle && StartOfRound.Instance.hangarDoorsClosed, 0); if ((Object)(object)((GrabbableObject)cheeseItem).playerHeldBy != (Object)null && minLoudness >= 0.5f && (Object)(object)((GrabbableObject)cheeseItem).playerHeldBy != (Object)null) { ((GrabbableObject)cheeseItem).playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } private void EnableAgent() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)agent).enabled = true; if (!agent.isOnNavMesh && !agent.isOnOffMeshLink && NavMesh.SamplePosition(((Component)this).transform.position, ref navmeshHit, 25f, agent.areaMask)) { agent.Warp(((NavMeshHit)(ref navmeshHit)).position); } } [ClientRpc] private void SyncParentToShipClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2650479596u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2650479596u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { ((Component)this).transform.parent = StartOfRound.Instance.elevatorTransform; } } } [ClientRpc] private void SyncParentToNoneClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3096940835u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3096940835u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { ((Component)this).transform.parent = null; } } } [ClientRpc] private void SyncMouseAnimatorValuesClientRpc(int iterator, float animSpeed, float scaler, Color32 newColor) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_008a: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2554707448u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, iterator); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref animSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref scaler, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newColor); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2554707448u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { mouseAnimators[iterator].speed = animSpeed; Transform transform = ((Component)mouseAnimators[iterator]).transform; transform.localScale *= scaler; ((Renderer)((Component)((Component)mouseAnimators[iterator]).transform.GetChild(0)).GetComponent()).material.color = Color32.op_Implicit(newColor); } } } [ClientRpc] private void SyncMousePositionClientRpc(int iterator, Vector3 newLocalPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(895754542u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, iterator); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newLocalPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 895754542u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { ((Component)this).transform.GetChild(iterator).localPosition = newLocalPos; } } } [ClientRpc] private void SyncMouseActiveStateClientRpc(int iterator) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3035745289u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, iterator); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3035745289u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { ((Component)((Component)this).transform.GetChild(iterator)).gameObject.SetActive(false); } } } [ClientRpc] private void SyncMouseAnimatorsClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1781297802u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1781297802u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { mouseAnimators = ((Component)this).GetComponentsInChildren(false); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2926805633u, new RpcReceiveHandler(__rpc_handler_2926805633), "SwitchToIdleClientRpc"); ((NetworkBehaviour)this).__registerRpc(4183928397u, new RpcReceiveHandler(__rpc_handler_4183928397), "SwitchToChasingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3664322583u, new RpcReceiveHandler(__rpc_handler_3664322583), "SyncAgentDestinationClientRpc"); ((NetworkBehaviour)this).__registerRpc(54237842u, new RpcReceiveHandler(__rpc_handler_54237842), "SqueakClientRpc"); ((NetworkBehaviour)this).__registerRpc(3626012183u, new RpcReceiveHandler(__rpc_handler_3626012183), "CheckToDestroyClientRpc"); ((NetworkBehaviour)this).__registerRpc(3327852196u, new RpcReceiveHandler(__rpc_handler_3327852196), "SyncDetectNoiseClientRpc"); ((NetworkBehaviour)this).__registerRpc(2650479596u, new RpcReceiveHandler(__rpc_handler_2650479596), "SyncParentToShipClientRpc"); ((NetworkBehaviour)this).__registerRpc(3096940835u, new RpcReceiveHandler(__rpc_handler_3096940835), "SyncParentToNoneClientRpc"); ((NetworkBehaviour)this).__registerRpc(2554707448u, new RpcReceiveHandler(__rpc_handler_2554707448), "SyncMouseAnimatorValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(895754542u, new RpcReceiveHandler(__rpc_handler_895754542), "SyncMousePositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(3035745289u, new RpcReceiveHandler(__rpc_handler_3035745289), "SyncMouseActiveStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(1781297802u, new RpcReceiveHandler(__rpc_handler_1781297802), "SyncMouseAnimatorsClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2926805633(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; ((CheeseLovingMouse)(object)target).SwitchToIdleClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4183928397(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newDestination = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newDestination); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SwitchToChasingClientRpc(newDestination); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3664322583(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newDestination = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newDestination); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SyncAgentDestinationClientRpc(newDestination); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_54237842(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 noiseIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref noiseIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SqueakClientRpc(noiseIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3626012183(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; ((CheeseLovingMouse)(object)target).CheckToDestroyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3327852196(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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference hostCheeseScript = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hostCheeseScript, default(ForNetworkSerializable)); bool inElevatorAndIdle = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inElevatorAndIdle, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SyncDetectNoiseClientRpc(hostCheeseScript, inElevatorAndIdle); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2650479596(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; ((CheeseLovingMouse)(object)target).SyncParentToShipClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3096940835(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; ((CheeseLovingMouse)(object)target).SyncParentToNoneClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2554707448(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int iterator = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref iterator); float animSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref animSpeed, default(ForPrimitives)); float scaler = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref scaler, default(ForPrimitives)); Color32 newColor = default(Color32); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newColor); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SyncMouseAnimatorValuesClientRpc(iterator, animSpeed, scaler, newColor); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_895754542(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int iterator = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref iterator); Vector3 newLocalPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newLocalPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SyncMousePositionClientRpc(iterator, newLocalPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3035745289(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 iterator = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref iterator); target.__rpc_exec_stage = (__RpcExecStage)1; ((CheeseLovingMouse)(object)target).SyncMouseActiveStateClientRpc(iterator); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1781297802(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; ((CheeseLovingMouse)(object)target).SyncMouseAnimatorsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CheeseLovingMouse"; } } [HarmonyPatch(typeof(GrabbableObject))] public class ConfigSetter { public static Dictionary NameToWeightItemsDict = new Dictionary(); [HarmonyPatch("Start")] [HarmonyPrefix] private static bool SetConfigs2(GrabbableObject __instance) { if (ReindogDLL.ReindogAndFriendsModConfig.randomiseSize.Value) { RandomiseSize(__instance); } return true; } [HarmonyPatch("Start")] [HarmonyPostfix] private static void SetConfigs(GrabbableObject __instance) { ConfigSetterUtilities.SetAudioSourceVolumes(__instance); } private static void RandomiseSize(GrabbableObject objectToSet) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)objectToSet).IsServer || ((NetworkBehaviour)objectToSet).IsHost) { float num = Random.Range(ReindogDLL.ReindogAndFriendsModConfig.minRandomisedSize.Value, ReindogDLL.ReindogAndFriendsModConfig.maxRandomisedSize.Value); if (!NameToWeightItemsDict.ContainsKey(objectToSet.itemProperties.itemName)) { NameToWeightItemsDict.Add(objectToSet.itemProperties.itemName, objectToSet.itemProperties.weight); } Transform transform = ((Component)objectToSet).transform; transform.localScale *= num; objectToSet.SetScrapValue((int)((float)objectToSet.scrapValue * num * 0.75f)); objectToSet.itemProperties.weight = (NameToWeightItemsDict[objectToSet.itemProperties.itemName] - 1f) * num * 0.75f + 1f; RpcCaller.SyncSizeClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)objectToSet), num, NameToWeightItemsDict[objectToSet.itemProperties.itemName]); } } } [StaticNetcode] internal static class RpcCaller { [ClientRpc] public static void SyncSizeClientRpc(NetworkBehaviourReference objectToSet, float modifierValue, float weight) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_002b: 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) GrabbableObject val = (GrabbableObject)NetworkBehaviourReference.op_Implicit(objectToSet); if (!((NetworkBehaviour)val).IsServer && !((NetworkBehaviour)val).IsHost) { Transform transform = ((Component)val).transform; transform.localScale *= modifierValue; val.SetScrapValue((int)((float)val.scrapValue * modifierValue * 0.75f)); val.itemProperties.weight = (weight - 1f) * modifierValue * 0.75f + 1f; } } } internal static class ConfigSetterUtilities { internal static void SetAudioSourceVolumes(GrabbableObject objectToSet) { float genericVolumeConfig = ReindogDLL.GetGenericVolumeConfig(objectToSet.itemProperties.itemName); if (genericVolumeConfig != -1f) { ((Component)objectToSet).GetComponent().volume = genericVolumeConfig; Transform val = ((Component)objectToSet).transform.Find("FarAudio"); AudioSource val2 = default(AudioSource); if (!((Object)(object)val == (Object)null) && ((Component)val).TryGetComponent(ref val2)) { val2.volume = genericVolumeConfig; } } } } [HarmonyPatch(typeof(PlayerControllerB))] public class PlayerItemAudioFixer { private static float itemAudioDefaultVolume = 0.63f; [HarmonyPatch("Awake")] [HarmonyPostfix] private static void SetDefaultVolume(PlayerControllerB __instance) { itemAudioDefaultVolume = __instance.itemAudio.volume; } [HarmonyPatch("BeginGrabObject")] [HarmonyPostfix] private static void GrabObjectPostfix(PlayerControllerB __instance) { if ((Object)(object)__instance.currentlyHeldObjectServer == (Object)null) { __instance.itemAudio.volume = itemAudioDefaultVolume; return; } float genericVolumeConfig = ReindogDLL.GetGenericVolumeConfig(__instance.currentlyHeldObjectServer.itemProperties.itemName); if (genericVolumeConfig == -1f) { __instance.itemAudio.volume = itemAudioDefaultVolume; } else { __instance.itemAudio.volume = itemAudioDefaultVolume * genericVolumeConfig; } } [HarmonyPatch("GrabObjectClientRpc")] [HarmonyPrefix] private static bool GrabObjectClientRpcPrefix(bool grabValidated, ref NetworkObjectReference grabbedObject, PlayerControllerB __instance) { NetworkObject val = default(NetworkObject); if (!((NetworkObjectReference)(ref grabbedObject)).TryGet(ref val, (NetworkManager)null)) { __instance.itemAudio.volume = itemAudioDefaultVolume; return true; } float genericVolumeConfig = ReindogDLL.GetGenericVolumeConfig(((Component)val).gameObject.GetComponentInChildren().itemProperties.itemName); if (genericVolumeConfig == -1f) { __instance.itemAudio.volume = itemAudioDefaultVolume; return true; } __instance.itemAudio.volume = itemAudioDefaultVolume * genericVolumeConfig; return true; } } public class ExplosiveItem : GrabbableObject { private enum BombState { Inate, PreparingToExplode, Sizzling, Exploding } private float timer = 0f; [SerializeField] private AudioSource bombAudioSource; [SerializeField] private AudioClip explosionClip; [SerializeField] private AudioClip sizzleClip; private BombState bombState; private float timeBetweenActivationChecks; private float bombActivationCheckTimer = 0f; private float playerHoldingObjectHealthLastFrame = 100f; private Random noiseRandomSeed; [SerializeField] private float noiseRange = 80f; private float minLoudness = 0.95f; private float maxLoudness = 1f; private void Awake() { bombState = BombState.Inate; timeBetweenActivationChecks = Random.Range(0f, ReindogDLL.ReindogAndFriendsModConfig.timeBetweenBombActivationChecksMax.Value); } public override void Start() { ((GrabbableObject)this).Start(); noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); } public override void Update() { Explosive(); ((GrabbableObject)this).Update(); } private void Explosive() { if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || !StartOfRound.Instance.shipHasLanded) { return; } if ((base.isHeld || base.isPocketed) && bombState == BombState.Inate) { bombActivationCheckTimer += Time.deltaTime; if (bombActivationCheckTimer >= timeBetweenActivationChecks) { bombActivationCheckTimer = 0f; timeBetweenActivationChecks = Random.Range(0f, ReindogDLL.ReindogAndFriendsModConfig.timeBetweenBombActivationChecksMax.Value); if (Random.Range(0, 101) <= ReindogDLL.ReindogAndFriendsModConfig.miniNukeExplodeChance.Value) { bombState = BombState.PreparingToExplode; } } if ((float)base.playerHeldBy.health < playerHoldingObjectHealthLastFrame) { bombState = BombState.PreparingToExplode; } playerHoldingObjectHealthLastFrame = base.playerHeldBy.health; } if (bombState == BombState.PreparingToExplode) { timer += Time.deltaTime; if (timer > ReindogDLL.ReindogAndFriendsModConfig.nukeDetonationTime.Value - sizzleClip.length) { bombState = BombState.Sizzling; PlaySizzleSoundClientRpc(); } } if (bombState == BombState.Sizzling) { timer += Time.deltaTime; if (timer > ReindogDLL.ReindogAndFriendsModConfig.nukeDetonationTime.Value) { bombActivationCheckTimer = 0f; timer = 0f; bombState = BombState.Inate; ExplodeBombClientRpc(); } } } [ClientRpc] private void PlaySizzleSoundClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(148881451u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 148881451u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; bombAudioSource.PlayOneShot(sizzleClip, ReindogDLL.ReindogAndFriendsModConfig.miniNukeBeepingVolume.Value); float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } [ClientRpc] private void ExplodeBombClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(715212118u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 715212118u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; bombAudioSource.PlayOneShot(explosionClip, ReindogDLL.ReindogAndFriendsModConfig.miniNukeExplosionVolume.Value); float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up, true, 10f, 12.5f, 50, 0f, (GameObject)null, false); Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(5.5f, 0f, 0f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false); Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(-5.5f, 0f, 0f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false); Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(0f, 0f, 5.5f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false); Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(0f, 0f, -5.5f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false); ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(148881451u, new RpcReceiveHandler(__rpc_handler_148881451), "PlaySizzleSoundClientRpc"); ((NetworkBehaviour)this).__registerRpc(715212118u, new RpcReceiveHandler(__rpc_handler_715212118), "ExplodeBombClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_148881451(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; ((ExplosiveItem)(object)target).PlaySizzleSoundClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_715212118(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; ((ExplosiveItem)(object)target).ExplodeBombClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ExplosiveItem"; } } public class Frieza : GrabbableObject { [CompilerGenerated] private sealed class d__27 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Frieza <>4__this; private Color 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.playerWhoTriggeredFrieza = ((GrabbableObject)<>4__this).playerHeldBy; <>2__current = (object)new WaitForSeconds(<>4__this.brolyLook.length - 0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.imageOnCanvas.sprite = <>4__this.sprites[Random.Range(0, <>4__this.sprites.Length)]; <>4__this.uiCanvas.SetActive(true); 5__1 = ((Graphic)<>4__this.imageOnCanvas).color; 5__1.a = 0f; 5__2 = 0.15f; 5__3 = 0f; <>4__this.ActivateFriezaAudioVineBoomServerRpc(); <>4__this.playerWhoTriggeredFrieza.JumpToFearLevel(0.9f, true); goto IL_01a2; case 2: <>1__state = -1; goto IL_01a2; case 3: <>1__state = -1; break; case 4: { <>1__state = -1; break; } IL_01a2: if (5__1.a < 0.95f) { 5__3 += Time.deltaTime; 5__1.a = Mathf.Lerp(5__1.a, 1f, 5__3 / 5__2); ((Graphic)<>4__this.imageOnCanvas).color = 5__1; <>2__current = (object)new WaitForSeconds(Time.deltaTime); <>1__state = 2; return true; } 5__3 = 0f; 5__1.a = 1f; ((Graphic)<>4__this.imageOnCanvas).color = 5__1; <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 3; return true; } if ((double)5__1.a > 0.05) { 5__3 += Time.deltaTime; 5__1.a = Mathf.Lerp(5__1.a, 0f, 5__3 / 5__2); ((Graphic)<>4__this.imageOnCanvas).color = 5__1; <>2__current = (object)new WaitForSeconds(Time.deltaTime); <>1__state = 4; return true; } 5__1.a = 0f; ((Graphic)<>4__this.imageOnCanvas).color = 5__1; <>4__this.uiCanvas.SetActive(false); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [SerializeField] private AudioSource audio; [SerializeField] private AudioClip brolyLook; [SerializeField] private AudioClip vineBoom; [SerializeField] private uint chance = 2u; [SerializeField] private float timeBetweenActivationChecksMax = 1f; private float timeBetweenActivationChecks; private float checkTimer = 0f; [SerializeField] private Sprite[] sprites; [SerializeField] private GameObject uiCanvasPrefab; private GameObject uiCanvas; private Image imageOnCanvas; private bool isOnCooldown = false; private float cooldownTime = 5f; private PlayerControllerB playerWhoTriggeredFrieza; private Random noiseRandomSeed; [SerializeField] private float noiseRange = 70f; private float minLoudness = 0.99f; private float maxLoudness = 1f; private void Awake() { timeBetweenActivationChecks = Random.Range(0f, timeBetweenActivationChecksMax); } public override void Start() { ((GrabbableObject)this).Start(); noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); uiCanvas = Object.Instantiate(uiCanvasPrefab); uiCanvas.SetActive(false); imageOnCanvas = uiCanvas.GetComponentInChildren(); } public override void Update() { DoFriezaChecks(); ((GrabbableObject)this).Update(); } private void DoFriezaChecks() { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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) if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || (!base.isHeld && !base.isPocketed) || isOnCooldown) { return; } checkTimer += Time.deltaTime; if (checkTimer >= timeBetweenActivationChecks) { checkTimer = 0f; timeBetweenActivationChecks = Random.Range(0f, timeBetweenActivationChecksMax); if (Random.Range(0, 101) <= chance) { isOnCooldown = true; ((MonoBehaviour)this).Invoke("ResetCooldown", cooldownTime); ActivateFriezaAudioBrolyLookClientRpc(); ClientRpcParams val = default(ClientRpcParams); val.Send = new ClientRpcSendParams { TargetClientIds = new ulong[1] { base.playerHeldBy.actualClientId } }; ClientRpcParams clientRpcParams = val; DisplayImageClientRpc(clientRpcParams); } } } [ClientRpc] private void ActivateFriezaAudioBrolyLookClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3762915186u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3762915186u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; audio.PlayOneShot(brolyLook); float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } [ServerRpc(RequireOwnership = false)] private void ActivateFriezaAudioVineBoomServerRpc() { //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) //IL_00c1: 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(2223191387u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2223191387u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ActivateFriezaAudioVineBoomClientRpc(); } } } [ClientRpc] private void ActivateFriezaAudioVineBoomClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(500400452u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 500400452u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; audio.PlayOneShot(vineBoom); float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } [ClientRpc] private void DisplayImageClientRpc(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_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) //IL_00c1: 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.IsServer || networkManager.IsHost)) { FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1545275795u, clientRpcParams, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1545275795u, clientRpcParams, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(FriezaActivated()); } } } [IteratorStateMachine(typeof(d__27))] private IEnumerator FriezaActivated() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this }; } private void ResetCooldown() { isOnCooldown = false; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3762915186u, new RpcReceiveHandler(__rpc_handler_3762915186), "ActivateFriezaAudioBrolyLookClientRpc"); ((NetworkBehaviour)this).__registerRpc(2223191387u, new RpcReceiveHandler(__rpc_handler_2223191387), "ActivateFriezaAudioVineBoomServerRpc"); ((NetworkBehaviour)this).__registerRpc(500400452u, new RpcReceiveHandler(__rpc_handler_500400452), "ActivateFriezaAudioVineBoomClientRpc"); ((NetworkBehaviour)this).__registerRpc(1545275795u, new RpcReceiveHandler(__rpc_handler_1545275795), "DisplayImageClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3762915186(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; ((Frieza)(object)target).ActivateFriezaAudioBrolyLookClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2223191387(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; ((Frieza)(object)target).ActivateFriezaAudioVineBoomServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_500400452(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; ((Frieza)(object)target).ActivateFriezaAudioVineBoomClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1545275795(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ClientRpcParams client = rpcParams.Client; target.__rpc_exec_stage = (__RpcExecStage)1; ((Frieza)(object)target).DisplayImageClientRpc(client); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Frieza"; } } internal class GoldenReindog : GrabbableObject { [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public PlayerControllerB playerWhoPickedUp; public GoldenReindog <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; if (<>4__this.templeScript.PreTeleportPositions.ContainsKey(playerWhoPickedUp)) { playerWhoPickedUp.TeleportPlayer(<>4__this.templeScript.PreTeleportPositions[playerWhoPickedUp], false, 0f, false, true); <>4__this.TeleportTriggeredServerRpc(); <>4__this.templeScript.PreTeleportPositions.Remove(playerWhoPickedUp); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public GameObject reindogTemple; private ReindogTemple templeScript; private bool teleportTriggered = false; private UnlockableSuit reindogSuit; private Material reindogMat; public override void OnNetworkSpawn() { //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) ((NetworkBehaviour)this).OnNetworkSpawn(); if (!((NetworkBehaviour)this).IsServer) { return; } if (ReindogDLL.MoreSuitsCompat.Enabled) { if ((Object)(object)reindogSuit != (Object)null) { return; } foreach (UnlockableItem unlockable in StartOfRound.Instance.unlockablesList.unlockables) { if (unlockable.unlockableName == "Reindog") { reindogMat = unlockable.suitMaterial; } } UnlockableSuit[] array = Object.FindObjectsOfType(); UnlockableSuit[] array2 = array; foreach (UnlockableSuit val in array2) { if ((Object)(object)reindogMat == (Object)(object)val.suitMaterial) { reindogSuit = val; SyncSuitServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)reindogSuit)); } } } if (StartOfRound.Instance.shipHasLanded && StartOfRound.Instance.currentLevel.planetHasTime) { ReindogTemple reindogTemple = Object.FindFirstObjectByType(); templeScript = reindogTemple; SyncTempleServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)templeScript)); } } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); if ((Object)(object)reindogSuit != (Object)null) { reindogSuit.SwitchSuitToThis(base.playerHeldBy); } if (!((Object)(object)templeScript == (Object)null) && !teleportTriggered && StartOfRound.Instance.shipHasLanded && StartOfRound.Instance.currentLevel.planetHasTime) { ((MonoBehaviour)this).StartCoroutine(DelayedTeleport(2f, base.playerHeldBy)); } } [IteratorStateMachine(typeof(d__7))] private IEnumerator DelayedTeleport(float delay, PlayerControllerB playerWhoPickedUp) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this, delay = delay, playerWhoPickedUp = playerWhoPickedUp }; } [ServerRpc] private void SyncSuitServerRpc(NetworkBehaviourReference suit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3401479001u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref suit, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3401479001u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UnlockableSuit val3 = (UnlockableSuit)NetworkBehaviourReference.op_Implicit(suit); SyncSuitClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } [ClientRpc] private void SyncSuitClientRpc(NetworkBehaviourReference suit) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1864873656u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref suit, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1864873656u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { UnlockableSuit val3 = (UnlockableSuit)NetworkBehaviourReference.op_Implicit(suit); reindogSuit = val3; } } } [ServerRpc] private void SyncTempleServerRpc(NetworkBehaviourReference script) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: 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_0136: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2427372890u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref script, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2427372890u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReindogTemple reindogTemple = (ReindogTemple)(object)NetworkBehaviourReference.op_Implicit(script); SyncTempleClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)reindogTemple)); } } [ClientRpc] private void SyncTempleClientRpc(NetworkBehaviourReference script) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1508152553u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref script, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1508152553u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReindogTemple reindogTemple = (ReindogTemple)(object)NetworkBehaviourReference.op_Implicit(script); templeScript = reindogTemple; } } } [ServerRpc] private void TeleportTriggeredServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4083767340u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4083767340u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportTriggeredClientRpc(); } } [ClientRpc] private void TeleportTriggeredClientRpc() { //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) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2312950511u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2312950511u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; teleportTriggered = true; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3401479001u, new RpcReceiveHandler(__rpc_handler_3401479001), "SyncSuitServerRpc"); ((NetworkBehaviour)this).__registerRpc(1864873656u, new RpcReceiveHandler(__rpc_handler_1864873656), "SyncSuitClientRpc"); ((NetworkBehaviour)this).__registerRpc(2427372890u, new RpcReceiveHandler(__rpc_handler_2427372890), "SyncTempleServerRpc"); ((NetworkBehaviour)this).__registerRpc(1508152553u, new RpcReceiveHandler(__rpc_handler_1508152553), "SyncTempleClientRpc"); ((NetworkBehaviour)this).__registerRpc(4083767340u, new RpcReceiveHandler(__rpc_handler_4083767340), "TeleportTriggeredServerRpc"); ((NetworkBehaviour)this).__registerRpc(2312950511u, new RpcReceiveHandler(__rpc_handler_2312950511), "TeleportTriggeredClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3401479001(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { NetworkBehaviourReference suit = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref suit, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenReindog)(object)target).SyncSuitServerRpc(suit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1864873656(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_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) { NetworkBehaviourReference suit = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref suit, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenReindog)(object)target).SyncSuitClientRpc(suit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2427372890(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { NetworkBehaviourReference script = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref script, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenReindog)(object)target).SyncTempleServerRpc(script); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1508152553(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_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) { NetworkBehaviourReference script = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref script, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenReindog)(object)target).SyncTempleClientRpc(script); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4083767340(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((GoldenReindog)(object)target).TeleportTriggeredServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2312950511(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; ((GoldenReindog)(object)target).TeleportTriggeredClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GoldenReindog"; } } public class HoldingPen : GrabbableObject { private InteractTrigger triggerScript; private void Awake() { triggerScript = ((Component)this).GetComponentInChildren(); InteractTrigger obj = triggerScript; obj.hoverTip = obj.hoverTip + ": [" + InputActionRebindingExtensions.GetBindingDisplayString(IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false), (DisplayStringOptions)0, (string)null).Split(' ')[0] + "]"; } public void AddCurrentlyHeldItemToPenOnDeposit(PlayerControllerB playerWhoTriggered) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) AddToHoldingPenServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)playerWhoTriggered)); } [ServerRpc(RequireOwnership = false)] private void AddToHoldingPenServerRpc(NetworkBehaviourReference networkRef) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00ee: Expected O, but got Unknown //IL_013c: 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 != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2249303774u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref networkRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2249303774u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = (PlayerControllerB)NetworkBehaviourReference.op_Implicit(networkRef); RoamingObject roamingObject = default(RoamingObject); if (val3.isHoldingObject && !val3.isGrabbingObjectAnimation && (Object)(object)val3.currentlyHeldObjectServer != (Object)null && !base.isHeld && !base.isPocketed && ((Component)val3.currentlyHeldObjectServer).TryGetComponent(ref roamingObject)) { PermeateHoldingPenStatusClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)roamingObject)); roamingObject.EnableDisableAIClientRpc(enableState: false); roamingObject.timer = 0f; } } } [ClientRpc] public void PermeateHoldingPenStatusClientRpc(NetworkBehaviourReference obj) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(934601757u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref obj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 934601757u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoamingObject roamingObject = (RoamingObject)(object)NetworkBehaviourReference.op_Implicit(obj); roamingObject.isInHoldingPen = true; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2249303774u, new RpcReceiveHandler(__rpc_handler_2249303774), "AddToHoldingPenServerRpc"); ((NetworkBehaviour)this).__registerRpc(934601757u, new RpcReceiveHandler(__rpc_handler_934601757), "PermeateHoldingPenStatusClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2249303774(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_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) { NetworkBehaviourReference networkRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref networkRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoldingPen)(object)target).AddToHoldingPenServerRpc(networkRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_934601757(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_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) { NetworkBehaviourReference obj = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref obj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HoldingPen)(object)target).PermeateHoldingPenStatusClientRpc(obj); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "HoldingPen"; } } public class LargeFan : GrabbableObject { [CompilerGenerated] private sealed class d__32 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public LargeFan <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.fanBlowing = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public LargeFan <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.fanBlowing = true; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LargeFan <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(<>4__this.blowingAnim.length); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.ToggleFanClientRpc(fanState: false); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private float blowForceMin = 2.5f; private float blowForceMax = 15f; private int activationChance = 12; private float activationChanceInterval = 5f; private float activationChanceIntervalMax = 5f; private float activationChanceTimer = 0f; private bool fanActivated = false; [SerializeField] private Transform forcePoint; [SerializeField] private Transform blades; private float maxBlowForceDist = 20f; private float forceApplyInterval = 0.2f; private float forceApplyTimer = 0f; [SerializeField] private AnimationClip blowingAnim; [SerializeField] private Animator fanAnimator; [SerializeField] private AudioSource fanAudioSource; private float blowRadius = 4f; private float rotationSpeed = 0f; private float lastBladesRotAngleX = 0f; private int staffMask = 11012424; private LayerMask hittableLayers; private Random noiseRandomSeed; private float detectNoiseInterval = 1f; private float detectNoiseTimer = 0f; private bool fanBlowing = false; private void Awake() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) Quaternion rotation = blades.rotation; lastBladesRotAngleX = ((Quaternion)(ref rotation)).eulerAngles.x; activationChanceInterval = Random.Range(0f, activationChanceIntervalMax); fanAudioSource.volume = ReindogDLL.ReindogAndFriendsModConfig.fanVolume.Value; blowForceMin = ReindogDLL.ReindogAndFriendsModConfig.fanBlowForceMin.Value; blowForceMax = ReindogDLL.ReindogAndFriendsModConfig.fanBlowForceMax.Value; maxBlowForceDist = ReindogDLL.ReindogAndFriendsModConfig.fanBlowDist.Value; activationChance = ReindogDLL.ReindogAndFriendsModConfig.fanActivationChance.Value; activationChanceIntervalMax = ReindogDLL.ReindogAndFriendsModConfig.fanActivationMaxInterval.Value; noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); } public override void Update() { DoFanChecks(); ((GrabbableObject)this).Update(); } public void ApplyFanForce() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) RaycastHit[] array = Physics.SphereCastAll(forcePoint.position, blowRadius, forcePoint.forward, maxBlowForceDist + 3f, staffMask, (QueryTriggerInteraction)2); RaycastHit[] array2 = array; PlayerControllerB val2 = default(PlayerControllerB); Quaternion rotation; for (int i = 0; i < array2.Length; i++) { RaycastHit val = array2[i]; if (((Component)((RaycastHit)(ref val)).transform).TryGetComponent(ref val2)) { if (!val2.HasLineOfSightToPosition(((Component)this).transform.position, 50f, (int)maxBlowForceDist + 3, -1f, -1) && (Object)(object)base.playerHeldBy != (Object)(object)val2) { return; } float distance = ((RaycastHit)(ref val)).distance; if (distance > maxBlowForceDist) { return; } rotation = blades.rotation; rotationSpeed = Mathf.Clamp(Mathf.Abs(((Quaternion)(ref rotation)).eulerAngles.x - lastBladesRotAngleX), 0f, 90f); rotationSpeed = (90f - rotationSpeed) / 90f; float num = (blowForceMax - blowForceMin) * ((maxBlowForceDist - distance) / maxBlowForceDist); float blowForce = (blowForceMin + num) * rotationSpeed * Time.deltaTime; ApplyFanForceClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val2), blowForce); } } rotation = blades.rotation; lastBladesRotAngleX = ((Quaternion)(ref rotation)).eulerAngles.x; } [ClientRpc] private void ApplyFanForceClientRpc(NetworkBehaviourReference hitController, float blowForce) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_0109: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1819779707u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref hitController, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref blowForce, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1819779707u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = (PlayerControllerB)NetworkBehaviourReference.op_Implicit(hitController); Vector3 forward = forcePoint.forward; forward.y = 0f; val3.externalForceAutoFade += forward * blowForce; } } } [IteratorStateMachine(typeof(d__28))] private IEnumerator DisableFan() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } [ClientRpc] private void ToggleFanClientRpc(bool fanState) { //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) //IL_00dc: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3457784654u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref fanState, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3457784654u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; fanAnimator.SetBool("isActive", fanState); fanActivated = fanState; if (!fanState) { fanAudioSource.Stop(); fanBlowing = false; } else { fanAudioSource.Play(); } } } private void DoFanChecks() { if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { return; } if (!StartOfRound.Instance.shipHasLanded) { if (fanActivated) { ToggleFanClientRpc(fanState: false); } return; } if (fanAudioSource.isPlaying) { detectNoiseTimer += Time.deltaTime; if (detectNoiseTimer >= detectNoiseInterval) { detectNoiseTimer = 0f; SyncDetectNoiseClientRpc(); } } if (!fanActivated) { activationChanceTimer += Time.deltaTime; if (activationChanceTimer >= activationChanceInterval) { activationChanceInterval = Random.Range(0f, activationChanceIntervalMax); activationChanceTimer = 0f; if (Random.Range(0, 101) <= activationChance) { ToggleFanClientRpc(fanState: true); ((MonoBehaviour)this).StartCoroutine(DisableFan()); ((MonoBehaviour)this).StartCoroutine(DelayBlowStart(1.5f)); ((MonoBehaviour)this).StartCoroutine(DelayBlowEnd(blowingAnim.length - 4f)); } } } if (fanBlowing) { ApplyFanForce(); } } [IteratorStateMachine(typeof(d__31))] private IEnumerator DelayBlowStart(float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this, delay = delay }; } [IteratorStateMachine(typeof(d__32))] private IEnumerator DelayBlowEnd(float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { <>4__this = this, delay = delay }; } [ClientRpc] private void SyncDetectNoiseClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1280311848u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1280311848u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; float num = (float)noiseRandomSeed.Next(90, 100) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 40f, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1819779707u, new RpcReceiveHandler(__rpc_handler_1819779707), "ApplyFanForceClientRpc"); ((NetworkBehaviour)this).__registerRpc(3457784654u, new RpcReceiveHandler(__rpc_handler_3457784654), "ToggleFanClientRpc"); ((NetworkBehaviour)this).__registerRpc(1280311848u, new RpcReceiveHandler(__rpc_handler_1280311848), "SyncDetectNoiseClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1819779707(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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference hitController = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hitController, default(ForNetworkSerializable)); float blowForce = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref blowForce, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LargeFan)(object)target).ApplyFanForceClientRpc(hitController, blowForce); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3457784654(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) { bool fanState = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fanState, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((LargeFan)(object)target).ToggleFanClientRpc(fanState); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1280311848(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; ((LargeFan)(object)target).SyncDetectNoiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LargeFan"; } } internal class LongNoisemaker : NoisemakerProp { [SerializeField] private float detectNoiseInterval = 1.5f; private float detectNoiseTimer = 0f; public override void Update() { if (((GrabbableObject)this).currentUseCooldown > 0f) { detectNoiseTimer += Time.deltaTime; if (detectNoiseTimer >= detectNoiseInterval) { detectNoiseTimer = 0f; ActivateAudibleSound((float)base.noisemakerRandom.Next((int)(base.minLoudness * 100f), (int)(base.maxLoudness * 100f)) / 100f); } } ((GrabbableObject)this).Update(); } private void ActivateAudibleSound(float loudness) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, base.noiseRange, loudness, 0, ((GrabbableObject)this).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (base.minLoudness >= 0.6f && (Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null) { ((GrabbableObject)this).playerHeldBy.timeSinceMakingLoudNoise = 0f; } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NoisemakerProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LongNoisemaker"; } } internal class Mario : EnemyAI { private enum AIState { SearchingForPlayer, ChasingPlayer, AttackingPlayer } [CompilerGenerated] private sealed class d__41 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableObject gObject; public Mario <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; case 1: <>1__state = -1; gObject.reachedFloorTarget = false; gObject.hasHitGround = false; gObject.fallTime = 0f; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__42 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Mario <>4__this; private int 5__1; private int 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__42(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = <>4__this.minNumOfMushroomsToSpawn; if (<>4__this.enemyRandomSeed.Next(0, 101) > 55 && <>4__this.minNumOfMushroomsToSpawn + 1 <= <>4__this.maxNumofMushroomsToSpawn) { 5__1 = <>4__this.enemyRandomSeed.Next(<>4__this.minNumOfMushroomsToSpawn + 1, <>4__this.maxNumofMushroomsToSpawn + 1); } 5__2 = 0; break; case 2: <>1__state = -1; 5__2++; break; } if (5__2 < 5__1) { <>4__this.SpawnMushroomServerRpc(); <>2__current = (object)new WaitForSeconds(0.45f); <>1__state = 2; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NetworkObjectReference netObjectRef; public int mushroomValue; public Vector3 startFallingPos; public Mario <>4__this; private NetworkObject 5__1; private float 5__2; private GrabbableObject 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0108: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = null; 5__2 = Time.realtimeSinceStartup; goto IL_0064; case 1: <>1__state = -1; goto IL_0064; case 2: { <>1__state = -1; 5__3 = ((Component)5__1).GetComponent(); 5__3.SetScrapValue(mushroomValue); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)5__3.scrapValue; 5__3.startFallingPosition = startFallingPos; 5__3.fallTime = 0f; 5__3.hasHitGround = false; 5__3.reachedFloorTarget = false; return false; } IL_0064: if (Time.realtimeSinceStartup - 5__2 < 8f && !((NetworkObjectReference)(ref netObjectRef)).TryGet(ref 5__1, (NetworkManager)null)) { <>2__current = (object)new WaitForSeconds(0.03f); <>1__state = 1; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Transform attackCollisionPoint; public Transform turnCompass; private float searchRange = 22f; private float attackWithinRange = 2f; private float timeSinceHittingLocalPlayer = 0f; private float punchForce = 7.5f; private int punchDamage = 40; private int collisionDamage = 5; private float punchCollisionSphereRadius = 2.1f; [SerializeField] private AudioClip punchClip; [SerializeField] private AudioClip gameOverClip; [SerializeField] private AudioClip beenHitClip; [SerializeField] private AudioClip[] foostepClips; [SerializeField] private AudioSource chaseAudioSource; [SerializeField] private GameObject mushroomPrefab; private float searchSpeed = 2.2f; private float chaseSpeed = 3.1f; private int minNumOfMushroomsToSpawn = 1; private int maxNumofMushroomsToSpawn = 2; private Random enemyRandomSeed; private int maxHp = 10; private void Awake() { base.enemyHP = ReindogDLL.ReindogAndFriendsModConfig.marioHealth.Value; punchDamage = ReindogDLL.ReindogAndFriendsModConfig.marioDamagePerHit.Value; chaseAudioSource.volume = ReindogDLL.ReindogAndFriendsModConfig.marioChaseMusicVolume.Value; searchSpeed = ReindogDLL.ReindogAndFriendsModConfig.marioSearchSpeed.Value; chaseSpeed = ReindogDLL.ReindogAndFriendsModConfig.marioChaseSpeed.Value; base.creatureSFX.maxDistance = ReindogDLL.ReindogAndFriendsModConfig.marioMaxHearableDistSfx.Value; chaseAudioSource.maxDistance = ReindogDLL.ReindogAndFriendsModConfig.marioMaxHearableDistChaseMusic.Value; enemyRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); minNumOfMushroomsToSpawn = ReindogDLL.ReindogAndFriendsModConfig.minNumOfMushroomsToSpawn.Value; maxNumofMushroomsToSpawn = ReindogDLL.ReindogAndFriendsModConfig.maxNumOfMushroomsToSpawn.Value; maxHp = base.enemyHP; } public override void Start() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); base.creatureAnimator.SetTrigger("startWalk"); base.currentBehaviourStateIndex = 0; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((Component)((Component)this).transform.Find("MapDot")).gameObject.SetActive(true); } public override void Update() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } timeSinceHittingLocalPlayer += Time.deltaTime; int currentBehaviourStateIndex = base.currentBehaviourStateIndex; if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 80f, 25, 5f, -1)) { if (base.currentBehaviourStateIndex == 1) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 1f); } else { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 0.5f); } } if ((Object)(object)base.targetPlayer != (Object)null && (currentBehaviourStateIndex == 1 || currentBehaviourStateIndex == 2)) { turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime); } if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } } public override void DoAIInterval() { //IL_00eb: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.livingPlayers == 0) { return; } switch (base.currentBehaviourStateIndex) { case 0: base.agent.speed = searchSpeed; base.agent.acceleration = 10f; base.openDoorSpeedMultiplier = 1.5f; if (FoundClosestPlayerInRange(searchRange, searchRange / 3f) && !base.isEnemyDead) { ((EnemyAI)this).StopSearch(base.currentSearch, true); ((EnemyAI)this).SwitchToBehaviourClientRpc(1); ToggleChaseAudioClientRpc(state: true); } break; case 1: base.agent.speed = chaseSpeed + (chaseSpeed - 1f) * Mathf.Clamp01(1f - Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) / searchRange) + (float)(1 - base.enemyHP / maxHp) * 1f; base.agent.acceleration = 15f; base.openDoorSpeedMultiplier = 0.9f; if ((double)Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > (double)searchRange + 7.5 && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null) && !base.isEnemyDead) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); ToggleChaseAudioClientRpc(state: false); } else { ChasingPlayer(); } break; case 2: base.agent.speed = 1.5f; base.agent.acceleration = 40f; break; } } private bool FoundClosestPlayerInRange(float range, float senseRange) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).TargetClosestPlayer(1.5f, true, 70f, false, false, true); if ((Object)(object)base.targetPlayer == (Object)null) { ((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true); range = senseRange; } return (Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range; } private void ChasingPlayer() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)base.targetPlayer == (Object)null) && ((NetworkBehaviour)this).IsOwner) { if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < attackWithinRange && !base.isEnemyDead) { ((EnemyAI)this).SwitchToBehaviourClientRpc(2); ((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer).transform.position, false); } ((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer).transform.position, false); } } public void OnAttackFinish() { if (((NetworkBehaviour)this).IsOwner && !base.isEnemyDead) { OnAttackFinishServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void OnAttackFinishServerRpc() { //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) //IL_00c1: 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(1360977440u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1360977440u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnAttackFinishClientRpc(); } } } [ClientRpc] public void OnAttackFinishClientRpc() { //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) //IL_00c1: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1728153208u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1728153208u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.ResetTrigger("takeHit"); base.creatureAnimator.ResetTrigger("attack"); if ((Object)(object)base.targetPlayer == (Object)null) { ((EnemyAI)this).SwitchToBehaviourClientRpc(0); } else { ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } } } public override void OnCollideWithPlayer(Collider other) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (!(timeSinceHittingLocalPlayer < 1.5f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingLocalPlayer = 0f; val.DamagePlayer(collisionDamage, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } } public void PunchAttack() { if (!((Object)(object)base.targetPlayer == (Object)null) && ((NetworkBehaviour)this).IsOwner && !base.isEnemyDead) { PunchClientRpc(); } } [ClientRpc] public void PunchClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1466281911u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1466281911u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeSinceHittingLocalPlayer = 0f; int num = 8; Collider[] array = Physics.OverlapSphere(attackCollisionPoint.position, punchCollisionSphereRadius, num); if (array.Length == 0) { return; } Collider[] array2 = array; foreach (Collider val3 in array2) { PlayerControllerB val4 = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(val3, false, false); if ((Object)(object)val4 != (Object)null) { base.creatureSFX.PlayOneShot(punchClip, 1f); timeSinceHittingLocalPlayer = 0f; if (val4.health - punchDamage <= 0) { base.creatureVoice.PlayOneShot(gameOverClip, 1f); } int num2 = punchDamage; Vector3 val5 = default(Vector3); val4.DamagePlayer(num2, true, true, (CauseOfDeath)0, 0, false, val5); Vector3 externalForceAutoFade = val4.externalForceAutoFade; val5 = ((Component)val4).transform.position - ((Component)this).transform.position; val4.externalForceAutoFade = externalForceAutoFade + ((Vector3)(ref val5)).normalized * punchForce; } } } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.isEnemyDead) { return; } base.targetPlayer = playerWhoHit; base.agent.speed = 0.8f; base.enemyHP -= force; if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((MonoBehaviour)this).StopCoroutine(base.searchCoroutine); chaseAudioSource.Stop(); ((EnemyAI)this).KillEnemyOnOwnerClient(false); return; } if (!base.inSpecialAnimation) { base.creatureAnimator.SetTrigger("takeHit"); } base.creatureSFX.PlayOneShot(beenHitClip, 1f); } public override void KillEnemy(bool destroy = false) { if (!base.enemyType.canDie) { return; } if (destroy) { if (((NetworkBehaviour)this).IsServer && base.thisNetworkObject.IsSpawned) { base.thisNetworkObject.Despawn(true); } return; } ScanNodeProperties componentInChildren = ((Component)this).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && Object.op_Implicit((Object)(object)((Component)componentInChildren).gameObject.GetComponent())) { ((Component)componentInChildren).gameObject.GetComponent().enabled = false; } base.isEnemyDead = true; if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.PlayOneShot(base.dieSFX); } if ((Object)(object)base.creatureAnimator != (Object)null) { base.creatureAnimator.SetBool("Stunned", false); base.creatureAnimator.SetBool("stunned", false); base.creatureAnimator.SetBool("stun", false); base.creatureAnimator.SetTrigger("KillEnemy"); base.creatureAnimator.SetBool("Dead", true); } ((EnemyAI)this).CancelSpecialAnimationWithPlayer(); ((EnemyAI)this).SubtractFromPowerLevel(); ((Behaviour)base.agent).enabled = false; if (((NetworkBehaviour)this).IsOwner) { ((MonoBehaviour)this).StartCoroutine(SpawnMushroomDelay()); } } public void PlayFootstep() { base.creatureSFX.PlayOneShot(foostepClips[Random.Range(0, foostepClips.Length)], Random.Range(0.8f, 1f)); } [ServerRpc(RequireOwnership = false)] public void SpawnMushroomServerRpc() { //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) //IL_00c1: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00ee: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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 != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(859579732u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 859579732u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Vector3 val3 = ((Component)this).transform.position + Vector3.up * 0.55f; GameObject val4 = Object.Instantiate(mushroomPrefab, val3, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); GrabbableObject component = val4.GetComponent(); component.startFallingPosition = val3; ((MonoBehaviour)this).StartCoroutine(SetObjectToHitGroundSFX(component)); component.targetFloorPosition = component.GetItemFloorPosition(((Component)this).transform.position); Random random = new Random((int)Time.deltaTime); int num = (int)((float)random.Next(component.itemProperties.minValue, component.itemProperties.maxValue) * RoundManager.Instance.scrapValueMultiplier); component.SetScrapValue(num); ((NetworkBehaviour)component).NetworkObject.Spawn(false); if ((Object)(object)val4 != (Object)null) { SpawnMushroomClientRpc(NetworkObjectReference.op_Implicit(val4.GetComponent()), num, val3); } } } [ClientRpc] public void SpawnMushroomClientRpc(NetworkObjectReference netObjectRef, int mushroomValue, Vector3 startFallingPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3989832349u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObjectRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, mushroomValue); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startFallingPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3989832349u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(WaitForMushroomToSpawnOnClient(netObjectRef, mushroomValue, startFallingPos)); } } } [IteratorStateMachine(typeof(d__39))] private IEnumerator WaitForMushroomToSpawnOnClient(NetworkObjectReference netObjectRef, int mushroomValue, Vector3 startFallingPos) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this, netObjectRef = netObjectRef, mushroomValue = mushroomValue, startFallingPos = startFallingPos }; } [ClientRpc] public void ToggleChaseAudioClientRpc(bool state) { //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) //IL_00dc: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2189581026u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2189581026u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)chaseAudioSource == (Object)null)) { if (state && !chaseAudioSource.isPlaying) { chaseAudioSource.Play(); } else if (!state && chaseAudioSource.isPlaying) { chaseAudioSource.Stop(); } } } [IteratorStateMachine(typeof(d__41))] private IEnumerator SetObjectToHitGroundSFX(GrabbableObject gObject) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__41(0) { <>4__this = this, gObject = gObject }; } [IteratorStateMachine(typeof(d__42))] public IEnumerator SpawnMushroomDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__42(0) { <>4__this = this }; } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1360977440u, new RpcReceiveHandler(__rpc_handler_1360977440), "OnAttackFinishServerRpc"); ((NetworkBehaviour)this).__registerRpc(1728153208u, new RpcReceiveHandler(__rpc_handler_1728153208), "OnAttackFinishClientRpc"); ((NetworkBehaviour)this).__registerRpc(1466281911u, new RpcReceiveHandler(__rpc_handler_1466281911), "PunchClientRpc"); ((NetworkBehaviour)this).__registerRpc(859579732u, new RpcReceiveHandler(__rpc_handler_859579732), "SpawnMushroomServerRpc"); ((NetworkBehaviour)this).__registerRpc(3989832349u, new RpcReceiveHandler(__rpc_handler_3989832349), "SpawnMushroomClientRpc"); ((NetworkBehaviour)this).__registerRpc(2189581026u, new RpcReceiveHandler(__rpc_handler_2189581026), "ToggleChaseAudioClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1360977440(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; ((Mario)(object)target).OnAttackFinishServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1728153208(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; ((Mario)(object)target).OnAttackFinishClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1466281911(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; ((Mario)(object)target).PunchClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_859579732(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; ((Mario)(object)target).SpawnMushroomServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3989832349(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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObjectRef, default(ForNetworkSerializable)); int mushroomValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref mushroomValue); Vector3 startFallingPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startFallingPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Mario)(object)target).SpawnMushroomClientRpc(netObjectRef, mushroomValue, startFallingPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2189581026(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) { bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Mario)(object)target).ToggleChaseAudioClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Mario"; } } [HarmonyPatch(typeof(StartOfRound))] public class MaximumFosgreathModeShip { [HarmonyPatch("Awake")] [HarmonyPostfix] private static void FosgreathifyShip() { FosgreathMode.InitialiseFosgreathModePostFix(); } } [HarmonyPatch(typeof(RoundManager))] public class MaximumFosgreathModeMoon { [HarmonyPatch("FinishGeneratingNewLevelClientRpc")] [HarmonyPostfix] private static void FosgreathifyShip() { FosgreathMode.InitialiseFosgreathModePostFix(); } } [HarmonyPatch(typeof(AudioSource))] public class MaximumFosgreathModeAudio { [HarmonyPatch("PlayOneShot", new Type[] { typeof(AudioClip), typeof(float) })] [HarmonyPrefix] public static void PlayOneShotPrefix(ref AudioClip clip) { if (ReindogDLL.ReindogAndFriendsModConfig.maximumFosgreathModeEnabled.Value) { clip = ReindogDLL.fosgreathClip; } } } public static class FosgreathMode { public static void InitialiseFosgreathModePostFix() { if (!ReindogDLL.ReindogAndFriendsModConfig.maximumFosgreathModeEnabled.Value || (Object)(object)ReindogDLL.fosgreathTexture == (Object)null) { return; } MeshRenderer[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); MeshRenderer[] array2 = array; foreach (MeshRenderer val in array2) { string name = ((Object)((Component)((Component)val).transform.root).gameObject).name; if (name == "Environment" || Object.op_Implicit((Object)(object)((Component)val).transform.root.Find("LevelGeneration"))) { Material[] materials = ((Renderer)val).materials; for (int j = 0; j < materials.Length; j++) { materials[j].mainTexture = (Texture)(object)ReindogDLL.fosgreathTexture; } ((Renderer)val).materials = materials; } } SkinnedMeshRenderer[] array3 = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); SkinnedMeshRenderer[] array4 = array3; foreach (SkinnedMeshRenderer val2 in array4) { string name2 = ((Object)((Component)((Component)val2).transform.root).gameObject).name; if (name2 == "Environment" || Object.op_Implicit((Object)(object)((Component)val2).transform.root.Find("LevelGeneration"))) { Material[] materials2 = ((Renderer)val2).materials; for (int l = 0; l < materials2.Length; l++) { materials2[l].mainTexture = (Texture)(object)ReindogDLL.fosgreathTexture; } ((Renderer)val2).materials = materials2; } } } } public class MonkeyCube : GrabbableObject { [SerializeField] private float rotationSpeed = 0.33f; [SerializeField] private AudioSource audioSource; private uint audioTriggerChance = 4u; private float timeBetweenActivationChecksMax = 7.5f; private float timeBetweenActivationChecks = 7.5f; private float activationCheckTimer = 0f; private bool onCooldown = false; private float cooldownPeriod = 5f; [SerializeField] private AudioClip monkeyClip; private Random noiseRandomSeed; [SerializeField] private float noiseRange = 25f; private float minLoudness = 0.6f; private float maxLoudness = 1f; private void Awake() { timeBetweenActivationChecks = Random.Range(1f, timeBetweenActivationChecksMax); } public override void Start() { ((GrabbableObject)this).Start(); noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); } public override void Update() { MonkeyCode(); ((GrabbableObject)this).Update(); } private void ResetCooldown() { onCooldown = false; } private void MonkeyCode() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Rotate(Vector3.up * Time.deltaTime * rotationSpeed); if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || onCooldown) { return; } activationCheckTimer += Time.deltaTime; if (activationCheckTimer >= timeBetweenActivationChecks) { timeBetweenActivationChecks = Random.Range(1f, timeBetweenActivationChecksMax); activationCheckTimer = 0f; if (Random.Range(0, 101) <= audioTriggerChance) { onCooldown = true; ((MonoBehaviour)this).Invoke("ResetCooldown", cooldownPeriod); PlayMonkeyAudioClientRpc(); } } } [ClientRpc] private void PlayMonkeyAudioClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3320041682u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3320041682u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; audioSource.PlayOneShot(monkeyClip); float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3320041682u, new RpcReceiveHandler(__rpc_handler_3320041682), "PlayMonkeyAudioClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3320041682(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; ((MonkeyCube)(object)target).PlayMonkeyAudioClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "MonkeyCube"; } } internal class Reindog : GrabbableObject { [CompilerGenerated] private sealed class d__9 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public PlayerControllerB playerWhoPickedUp; public Reindog <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; playerWhoPickedUp.TeleportPlayer(((Component)<>4__this.templeScript).transform.Find("GoldenTempleContainer").Find("TeleportSpot").position, false, 0f, false, true); ((Component)playerWhoPickedUp).transform.forward = ((Component)<>4__this.templeScript).transform.forward; <>4__this.TeleportTriggeredServerRpc(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NetworkObjectReference netObjectRef; public Reindog <>4__this; private NetworkObject 5__1; private float 5__2; private ReindogTemple 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = null; 5__2 = Time.realtimeSinceStartup; goto IL_0064; case 1: <>1__state = -1; goto IL_0064; case 2: { <>1__state = -1; 5__3 = ((Component)5__1).GetComponent(); <>4__this.templeScript = 5__3; return false; } IL_0064: if (Time.realtimeSinceStartup - 5__2 < 8f && !((NetworkObjectReference)(ref netObjectRef)).TryGet(ref 5__1, (NetworkManager)null)) { <>2__current = (object)new WaitForSeconds(0.03f); <>1__state = 1; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay1; public float delay2; public Reindog <>4__this; private ReindogTemple 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (!StartOfRound.Instance.shipHasLanded || !StartOfRound.Instance.currentLevel.planetHasTime) { <>2__current = (object)new WaitForSeconds(Random.Range(delay1, delay2)); <>1__state = 1; return true; } 5__1 = Object.FindFirstObjectByType(); if ((Object)(object)5__1 == (Object)null) { <>4__this.templeScript = Object.Instantiate(<>4__this.reindogTemple, new Vector3(0f, 2500f, 0f), Quaternion.identity).GetComponent(); ((Component)<>4__this.templeScript).GetComponent().Spawn(false); <>4__this.SpawnReindogTempleClientRpc(NetworkObjectReference.op_Implicit(((Component)<>4__this.templeScript).gameObject)); } else { <>4__this.templeScript = 5__1; <>4__this.SyncTempleServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)<>4__this.templeScript)); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public GameObject reindogTemple; private ReindogTemple templeScript; private bool teleportTriggered = false; private bool itemPickedUp = false; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(WaitToSpawnTemple(0.05f, 0.1f)); } } [IteratorStateMachine(typeof(d__5))] private IEnumerator WaitToSpawnTemple(float delay1, float delay2) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { <>4__this = this, delay1 = delay1, delay2 = delay2 }; } [ClientRpc] public void SpawnReindogTempleClientRpc(NetworkObjectReference netObjectRef) { //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) //IL_00dc: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3691108217u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObjectRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3691108217u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(WaitForReindogTempleToSpawnOnClient(netObjectRef)); } } } [IteratorStateMachine(typeof(d__7))] private IEnumerator WaitForReindogTempleToSpawnOnClient(NetworkObjectReference netObjectRef) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this, netObjectRef = netObjectRef }; } public override void GrabItem() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).GrabItem(); if (teleportTriggered || itemPickedUp || !StartOfRound.Instance.shipHasLanded || !StartOfRound.Instance.currentLevel.planetHasTime || (Object)(object)templeScript == (Object)null) { return; } if (((NetworkBehaviour)this).IsServer) { ItemPickedUpServerRpc(); } if (Random.Range(0, 100) < ReindogDLL.ReindogAndFriendsModConfig.reindogTriggerChance.Value) { if (!templeScript.PreTeleportPositions.ContainsKey(base.playerHeldBy)) { templeScript.PreTeleportPositions.Add(base.playerHeldBy, ((Component)base.playerHeldBy).transform.position + Vector3.up * 0.85f); } ((MonoBehaviour)this).StartCoroutine(DelayedTeleport(2f, base.playerHeldBy)); } } [IteratorStateMachine(typeof(d__9))] private IEnumerator DelayedTeleport(float delay, PlayerControllerB playerWhoPickedUp) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { <>4__this = this, delay = delay, playerWhoPickedUp = playerWhoPickedUp }; } [ServerRpc] private void TeleportTriggeredServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3405223387u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3405223387u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportTriggeredClientRpc(); } } [ClientRpc] private void TeleportTriggeredClientRpc() { //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) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1579089662u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1579089662u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; teleportTriggered = true; } } } [ServerRpc] private void ItemPickedUpServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3080122712u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3080122712u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportTriggeredClientRpc(); } } [ClientRpc] private void ItemPickedUpClientRpc() { //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) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3890152352u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3890152352u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; itemPickedUp = true; } } } [ServerRpc] private void SyncTempleServerRpc(NetworkBehaviourReference script) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: 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_0136: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(39159412u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref script, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 39159412u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReindogTemple reindogTemple = (ReindogTemple)(object)NetworkBehaviourReference.op_Implicit(script); SyncTempleClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)reindogTemple)); } } [ClientRpc] private void SyncTempleClientRpc(NetworkBehaviourReference script) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2235411525u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref script, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2235411525u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReindogTemple reindogTemple = (ReindogTemple)(object)NetworkBehaviourReference.op_Implicit(script); templeScript = reindogTemple; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3691108217u, new RpcReceiveHandler(__rpc_handler_3691108217), "SpawnReindogTempleClientRpc"); ((NetworkBehaviour)this).__registerRpc(3405223387u, new RpcReceiveHandler(__rpc_handler_3405223387), "TeleportTriggeredServerRpc"); ((NetworkBehaviour)this).__registerRpc(1579089662u, new RpcReceiveHandler(__rpc_handler_1579089662), "TeleportTriggeredClientRpc"); ((NetworkBehaviour)this).__registerRpc(3080122712u, new RpcReceiveHandler(__rpc_handler_3080122712), "ItemPickedUpServerRpc"); ((NetworkBehaviour)this).__registerRpc(3890152352u, new RpcReceiveHandler(__rpc_handler_3890152352), "ItemPickedUpClientRpc"); ((NetworkBehaviour)this).__registerRpc(39159412u, new RpcReceiveHandler(__rpc_handler_39159412), "SyncTempleServerRpc"); ((NetworkBehaviour)this).__registerRpc(2235411525u, new RpcReceiveHandler(__rpc_handler_2235411525), "SyncTempleClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3691108217(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_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) { NetworkObjectReference netObjectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObjectRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Reindog)(object)target).SpawnReindogTempleClientRpc(netObjectRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3405223387(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((Reindog)(object)target).TeleportTriggeredServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1579089662(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; ((Reindog)(object)target).TeleportTriggeredClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3080122712(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((Reindog)(object)target).ItemPickedUpServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3890152352(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; ((Reindog)(object)target).ItemPickedUpClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_39159412(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { NetworkBehaviourReference script = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref script, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Reindog)(object)target).SyncTempleServerRpc(script); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2235411525(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_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) { NetworkBehaviourReference script = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref script, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Reindog)(object)target).SyncTempleClientRpc(script); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "Reindog"; } } public class ReindogTemple : NetworkBehaviour { [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public Vector3 pos; public ReindogTemple <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; Landmine.SpawnExplosion(pos + Vector3.up, true, 5.7f, 6f, 50, 0f, (GameObject)null, false); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__9 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableObject objToDestroy; public float timeDelay; public float timeDelay2; public ReindogTemple <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(timeDelay); <>1__state = 1; return true; case 1: <>1__state = -1; if (!objToDestroy.isHeld && ((NetworkBehaviour)<>4__this).IsServer) { if (((NetworkBehaviour)objToDestroy).NetworkObject.IsSpawned) { ((NetworkBehaviour)objToDestroy).NetworkObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)objToDestroy).gameObject); } } <>2__current = (object)new WaitForSeconds(timeDelay2); <>1__state = 2; return true; case 2: <>1__state = -1; if (((NetworkBehaviour)<>4__this).IsServer) { <>4__this.SpawnGoldenReindogServerRpc(); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableObject gObject; public ReindogTemple <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; case 1: <>1__state = -1; gObject.reachedFloorTarget = false; gObject.hasHitGround = false; gObject.fallTime = 0f; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NetworkObjectReference netObjectRef; public int goldenReindogValue; public Vector3 startFallingPos; public ReindogTemple <>4__this; private NetworkObject 5__1; private float 5__2; private GrabbableObject 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0108: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = null; 5__2 = Time.realtimeSinceStartup; goto IL_0064; case 1: <>1__state = -1; goto IL_0064; case 2: { <>1__state = -1; 5__3 = ((Component)5__1).GetComponent(); 5__3.SetScrapValue(goldenReindogValue); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)5__3.scrapValue; 5__3.startFallingPosition = startFallingPos; 5__3.fallTime = 0f; 5__3.hasHitGround = false; 5__3.reachedFloorTarget = false; return false; } IL_0064: if (Time.realtimeSinceStartup - 5__2 < 8f && !((NetworkObjectReference)(ref netObjectRef)).TryGet(ref 5__1, (NetworkManager)null)) { <>2__current = (object)new WaitForSeconds(0.03f); <>1__state = 1; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private InteractTrigger triggerScript; public GameObject goldenReindog; public Dictionary PreTeleportPositions = new Dictionary(); private void Awake() { triggerScript = ((Component)this).GetComponentInChildren(); InteractTrigger obj = triggerScript; obj.hoverTip = obj.hoverTip + ": [" + InputActionRebindingExtensions.GetBindingDisplayString(IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false), (DisplayStringOptions)0, (string)null).Split(' ')[0] + "]"; ((Component)this).GetComponentInChildren().volume = ReindogDLL.ReindogAndFriendsModConfig.reindogAmbientAudioVol.Value; } public void AddCurrentlyHeldItemToAltarOnDeposit(PlayerControllerB playerWhoTriggered) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) AddToAltarServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)playerWhoTriggered)); } [ServerRpc(RequireOwnership = false)] private void AddToAltarServerRpc(NetworkBehaviourReference networkRef) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00ee: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1862463575u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref networkRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1862463575u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = (PlayerControllerB)NetworkBehaviourReference.op_Implicit(networkRef); if (val3.isHoldingObject && !val3.isGrabbingObjectAnimation && (Object)(object)val3.currentlyHeldObjectServer != (Object)null) { Reindog reindog = default(Reindog); if (((Component)val3.currentlyHeldObjectServer).TryGetComponent(ref reindog)) { StartSpawnGoldenReindogClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)reindog)); } else { TriggerExplosionClientRpc(((Component)val3).transform.position); } } } [ClientRpc] private void TriggerExplosionClientRpc(Vector3 pos) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3722298478u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3722298478u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((MonoBehaviour)this).StartCoroutine(DelayedKill(1.5f, pos)); } } } [IteratorStateMachine(typeof(d__7))] private IEnumerator DelayedKill(float delay, Vector3 pos) { //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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this, delay = delay, pos = pos }; } [ClientRpc] private void StartSpawnGoldenReindogClientRpc(NetworkBehaviourReference networkRef) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1635148758u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref networkRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1635148758u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Reindog objToDestroy = (Reindog)(object)NetworkBehaviourReference.op_Implicit(networkRef); ((MonoBehaviour)this).StartCoroutine(DestroyOnDelay((GrabbableObject)(object)objToDestroy, 2f, 2f)); } } } [IteratorStateMachine(typeof(d__9))] private IEnumerator DestroyOnDelay(GrabbableObject objToDestroy, float timeDelay, float timeDelay2) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { <>4__this = this, objToDestroy = objToDestroy, timeDelay = timeDelay, timeDelay2 = timeDelay2 }; } [ServerRpc(RequireOwnership = false)] public void SpawnGoldenReindogServerRpc() { //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) //IL_00c1: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_0116: 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) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2723253569u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2723253569u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Vector3 val3 = ((Component)((Component)((Component)this).transform).GetComponentInChildren()).transform.position + Vector3.up * 0.55f; GameObject val4 = Object.Instantiate(goldenReindog, val3, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); GrabbableObject component = val4.GetComponent(); component.startFallingPosition = val3; ((MonoBehaviour)this).StartCoroutine(SetObjectToHitGroundSFX(component)); component.targetFloorPosition = component.GetItemFloorPosition(((Component)this).transform.position); Random random = new Random((int)Time.deltaTime); int num = (int)((float)random.Next(component.itemProperties.minValue, component.itemProperties.maxValue) * RoundManager.Instance.scrapValueMultiplier); component.SetScrapValue(num); ((NetworkBehaviour)component).NetworkObject.Spawn(false); if ((Object)(object)val4 != (Object)null) { SpawnGoldenReindogClientRpc(NetworkObjectReference.op_Implicit(val4.GetComponent()), num, val3); } } } [ClientRpc] public void SpawnGoldenReindogClientRpc(NetworkObjectReference netObjectRef, int goldenReindogValue, Vector3 startFallingPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2552622298u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObjectRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, goldenReindogValue); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startFallingPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2552622298u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(WaitForGoldenReindogToSpawnOnClient(netObjectRef, goldenReindogValue, startFallingPos)); } } } [IteratorStateMachine(typeof(d__12))] private IEnumerator WaitForGoldenReindogToSpawnOnClient(NetworkObjectReference netObjectRef, int goldenReindogValue, Vector3 startFallingPos) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { <>4__this = this, netObjectRef = netObjectRef, goldenReindogValue = goldenReindogValue, startFallingPos = startFallingPos }; } [IteratorStateMachine(typeof(d__13))] private IEnumerator SetObjectToHitGroundSFX(GrabbableObject gObject) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, gObject = gObject }; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1862463575u, new RpcReceiveHandler(__rpc_handler_1862463575), "AddToAltarServerRpc"); ((NetworkBehaviour)this).__registerRpc(3722298478u, new RpcReceiveHandler(__rpc_handler_3722298478), "TriggerExplosionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1635148758u, new RpcReceiveHandler(__rpc_handler_1635148758), "StartSpawnGoldenReindogClientRpc"); ((NetworkBehaviour)this).__registerRpc(2723253569u, new RpcReceiveHandler(__rpc_handler_2723253569), "SpawnGoldenReindogServerRpc"); ((NetworkBehaviour)this).__registerRpc(2552622298u, new RpcReceiveHandler(__rpc_handler_2552622298), "SpawnGoldenReindogClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1862463575(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_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) { NetworkBehaviourReference networkRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref networkRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReindogTemple)(object)target).AddToAltarServerRpc(networkRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3722298478(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReindogTemple)(object)target).TriggerExplosionClientRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1635148758(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_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) { NetworkBehaviourReference networkRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref networkRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReindogTemple)(object)target).StartSpawnGoldenReindogClientRpc(networkRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2723253569(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; ((ReindogTemple)(object)target).SpawnGoldenReindogServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2552622298(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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObjectRef, default(ForNetworkSerializable)); int goldenReindogValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref goldenReindogValue); Vector3 startFallingPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startFallingPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReindogTemple)(object)target).SpawnGoldenReindogClientRpc(netObjectRef, goldenReindogValue, startFallingPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ReindogTemple"; } } internal class ReviveMushroom : RoamingObject { [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ReviveMushroom <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.CheckForBody(1.5f); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private int ragdollLayerMask = 1 << LayerMask.NameToLayer("PlayerRagdoll"); private bool reviveTriggered = false; private Vector3 revivePos; public AudioClip reviveClip; private Coroutine delayCheckRoutine; public override void DiscardItem() { base.DiscardItem(); if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { if (delayCheckRoutine != null) { ((MonoBehaviour)this).StopCoroutine(delayCheckRoutine); } delayCheckRoutine = ((MonoBehaviour)this).StartCoroutine(DelayCheck()); } } public void CheckForBody(float radius) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) if (reviveTriggered) { return; } Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, radius, ragdollLayerMask, (QueryTriggerInteraction)2); if (array.Length == 0) { return; } Collider[] array2 = array; DeadBodyInfo val2 = default(DeadBodyInfo); foreach (Collider val in array2) { if (((Component)val).TryGetComponent(ref val2) && !((Object)(object)val2.playerScript == (Object)null) && !val2.grabBodyObject.isHeld && !val2.grabBodyObject.isPocketed) { reviveTriggered = true; revivePos = ((Component)val2).gameObject.transform.position; RevivePlayerServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)StartOfRound.Instance.allPlayerScripts[GetPlayerIndex(val2.playerScript.playerUsername)])); break; } } } [IteratorStateMachine(typeof(d__7))] private IEnumerator DelayCheck() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this }; } public override void Update() { base.Update(); if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { return; } if (canRoam && aiEnabled && Time.frameCount % 3 == 0 && !((GrabbableObject)this).isHeld) { CheckForBody(1f); } if (roamChanceOnDrop <= 0 && Time.frameCount % 3 == 0 && !((GrabbableObject)this).isHeld) { CheckForBody(1f); } if (reviveTriggered && !((GrabbableObject)this).isHeld && ((NetworkBehaviour)this).IsServer) { if (((NetworkBehaviour)this).NetworkObject.IsSpawned) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private int GetPlayerIndex(string playerUsername) { for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { Debug.Log((object)("Player: " + (object)StartOfRound.Instance.allPlayerScripts[i])); if ((Object)(object)StartOfRound.Instance.allPlayerScripts[i] != (Object)null && StartOfRound.Instance.allPlayerScripts[i].playerUsername == playerUsername) { return i; } } return -1; } [ServerRpc(RequireOwnership = false)] public void RevivePlayerServerRpc(NetworkBehaviourReference netObj) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: 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(396000851u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 396000851u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RevivePlayerClientRpc(netObj); } } } [ClientRpc] public void RevivePlayerClientRpc(NetworkBehaviourReference netObj) { //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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00ee: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0580: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(656316985u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 656316985u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = (PlayerControllerB)NetworkBehaviourReference.op_Implicit(netObj); StartOfRound.Instance.allPlayersDead = false; val3.ResetPlayerBloodObjects(val3.isPlayerDead); if (!val3.isPlayerDead && !val3.isPlayerControlled) { return; } val3.isClimbingLadder = false; val3.clampLooking = false; val3.inVehicleAnimation = false; val3.disableMoveInput = false; val3.ResetZAndXRotation(); ((Collider)val3.thisController).enabled = true; val3.health = 100; val3.hasBeenCriticallyInjured = false; val3.disableLookInput = false; val3.disableInteract = false; if (val3.isPlayerDead) { val3.isPlayerDead = false; val3.isPlayerControlled = true; val3.isInElevator = true; val3.isInHangarShipRoom = true; val3.isInsideFactory = false; val3.parentedToElevatorLastFrame = false; val3.overrideGameOverSpectatePivot = null; StartOfRound.Instance.SetPlayerObjectExtrapolate(false); val3.TeleportPlayer(revivePos, false, 0f, false, true); AudioSource.PlayClipAtPoint(reviveClip, ((Component)val3).transform.position, 0.85f); val3.setPositionOfDeadPlayer = false; val3.DisablePlayerModel(((Component)val3).gameObject, true, true); ((Behaviour)val3.helmetLight).enabled = false; val3.Crouch(false); val3.criticallyInjured = false; if ((Object)(object)val3.playerBodyAnimator != (Object)null) { val3.playerBodyAnimator.SetBool("Limp", false); } val3.bleedingHeavily = false; val3.activatingItem = false; val3.twoHanded = false; val3.inShockingMinigame = false; val3.inSpecialInteractAnimation = false; val3.freeRotationInInteractAnimation = false; val3.disableSyncInAnimation = false; val3.inAnimationWithEnemy = null; val3.holdingWalkieTalkie = false; val3.speakingToWalkieTalkie = false; val3.isSinking = false; val3.isUnderwater = false; val3.sinkingValue = 0f; val3.statusEffectAudio.Stop(); val3.DisableJetpackControlsLocally(); val3.health = 100; val3.mapRadarDotAnimator.SetBool("dead", false); val3.externalForceAutoFade = Vector3.zero; if (((NetworkBehaviour)val3).IsOwner) { HUDManager.Instance.gasHelmetAnimator.SetBool("gasEmitting", false); val3.hasBegunSpectating = false; HUDManager.Instance.RemoveSpectateUI(); HUDManager.Instance.gameOverAnimator.SetTrigger("revive"); val3.hinderedMultiplier = 1f; val3.isMovementHindered = 0; val3.sourcesCausingSinking = 0; val3.reverbPreset = StartOfRound.Instance.shipReverb; } } int playerIndex = GetPlayerIndex(val3.playerUsername); SoundManager.Instance.earsRingingTimer = 0f; val3.voiceMuffledByEnemy = false; SoundManager.Instance.playerVoicePitchTargets[playerIndex] = 1f; SoundManager.Instance.SetPlayerPitch(1f, playerIndex); if ((Object)(object)val3.currentVoiceChatIngameSettings == (Object)null) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if ((Object)(object)val3.currentVoiceChatIngameSettings != (Object)null) { if ((Object)(object)val3.currentVoiceChatIngameSettings.voiceAudio == (Object)null) { val3.currentVoiceChatIngameSettings.InitializeComponents(); } if ((Object)(object)val3.currentVoiceChatIngameSettings.voiceAudio == (Object)null) { return; } ((Component)val3.currentVoiceChatIngameSettings.voiceAudio).GetComponent().overridingLowPass = false; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.bleedingHeavily = false; localPlayerController.criticallyInjured = false; localPlayerController.playerBodyAnimator.SetBool("Limp", false); localPlayerController.health = 100; HUDManager.Instance.UpdateHealthUI(100, false); localPlayerController.spectatedPlayerScript = null; ((Behaviour)HUDManager.Instance.audioListenerLowPass).enabled = false; StartOfRound.Instance.SetSpectateCameraToGameOverMode(false, localPlayerController); RagdollGrabbableObject[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { if (array[i].ragdoll.playerScript.playerUsername != val3.playerUsername) { continue; } if (!((GrabbableObject)array[i]).isHeld) { if (((NetworkBehaviour)this).IsServer) { if (((NetworkBehaviour)array[i]).NetworkObject.IsSpawned) { ((NetworkBehaviour)array[i]).NetworkObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)array[i]).gameObject); } } } else if (((GrabbableObject)array[i]).isHeld && (Object)(object)((GrabbableObject)array[i]).playerHeldBy != (Object)null) { ((GrabbableObject)array[i]).playerHeldBy.DropAllHeldItems(true, false, false, false, default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3)); } } DeadBodyInfo[] array2 = Object.FindObjectsOfType(); for (int j = 0; j < array2.Length; j++) { if (!(array2[j].playerScript.playerUsername != val3.playerUsername)) { Object.Destroy((Object)(object)((Component)array2[j]).gameObject); } } StartOfRound instance = StartOfRound.Instance; instance.livingPlayers++; StartOfRound.Instance.allPlayersDead = false; StartOfRound.Instance.UpdatePlayerVoiceEffects(); if (!((GrabbableObject)this).isHeld && ((NetworkBehaviour)this).IsServer) { if (((NetworkBehaviour)this).NetworkObject.IsSpawned) { ((NetworkBehaviour)this).NetworkObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } HUDManager.Instance.HideHUD(false); } protected override void __initializeVariables() { base.__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(396000851u, new RpcReceiveHandler(__rpc_handler_396000851), "RevivePlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(656316985u, new RpcReceiveHandler(__rpc_handler_656316985), "RevivePlayerClientRpc"); base.__initializeRpcs(); } private static void __rpc_handler_396000851(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_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) { NetworkBehaviourReference netObj = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReviveMushroom)(object)target).RevivePlayerServerRpc(netObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_656316985(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_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) { NetworkBehaviourReference netObj = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ReviveMushroom)(object)target).RevivePlayerClientRpc(netObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ReviveMushroom"; } } public class RoamingObject : GrabbableObject { private enum RoamType { Random, PlayerChaseOnDrop, PlayerRunawayOnDrop } [SerializeField] private AudioSource roamAudio; public NavMeshAgent agent; public float distFromItemToDestination = 60f; public float timeBetweenChangingPosition = 20f; [HideInInspector] public float timer; private bool navMeshAvailable = false; [SerializeField] private Animator animator; [SerializeField] private LayerMask InteractablesLayer; [SerializeField] protected int roamChanceOnDrop = 100; [SerializeField] private RoamType roamAI = RoamType.Random; private PlayerControllerB playerWhoDroppedItem; [SerializeField] private float distBeforeStartChasing = 10f; [SerializeField] private float distBeforeStartRunning = 10f; [SerializeField] private bool ifRandomRoamOnStart = false; [SerializeField] private bool onlyMoveWhenOutOfSight = false; protected bool aiEnabled = false; private Vector3 agentDestination; private bool itemInSight = false; private bool shouldRoam = false; private Vector3 lastWalkablePos = new Vector3(5f, 5f, 5f); protected bool canRoam = false; [SerializeField] private bool constantAIUntilNextDrop = true; [SerializeField] private bool stopAudioOnAiDisable = true; [SerializeField] private bool isExplosive = false; [SerializeField] private uint chanceToExplode = 5u; [SerializeField] private float timeBetweenExplosionChecks = 0.5f; private float explosionTimer; [SerializeField] private List roamClips; [SerializeField] private bool shouldAudioBeRandom = false; private RaycastHit doorHit; private NavMeshHit navmeshHit; private float detectNoiseInterval = 1f; private float detectNoiseTimer = 0f; private RoamingObject thisRoamingObjectScript; [HideInInspector] public bool isInHoldingPen = false; private float checkForNewPathInterval = 0.25f; private float checkForNewPath = 0f; private float stuckInterval = 1f; private float stuckTimer = 0f; private Vector3 lastStuckPositionCheck; private Random noiseRandomSeed; [SerializeField] private float noiseRange = 35f; private float minLoudness = 0.6f; private float maxLoudness = 1f; private Image progressFillImage; private GameObject progressBar; [HideInInspector] public static GameObject quicktimeCanvas; [SerializeField] private GameObject quicktimeCanvasPrefab; private float qteDropRate = 0.55f; private float qteIncreaseRate = 0.1f; private int quicktimeEventChance = 50; private float quicktimeEventTriggerIntervalMax = 20f; private float quickTimeEventTriggerInterval = 20f; private float quicktimeEventTriggerIntervalMin = 5f; private float quickTimeEventTriggerTimer = 0f; private float playerMoveSpeed; private bool hasQuicktimeEvents = true; private bool quickTimeEventActivated = false; private float startingScale; private TextMeshProUGUI qteText; [SerializeField] private AudioClip qtePressClip; private float qtePressVolume = 1f; private AudioSource mainAudio; private static bool qteOnCooldown; private float qteCooldownPeriod = 5f; private void Awake() { mainAudio = ((Component)this).GetComponent(); base.itemProperties.syncDiscardFunction = true; base.itemProperties.syncGrabFunction = true; thisRoamingObjectScript = ((Component)this).GetComponent(); noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85); roamAudio.volume = ReindogDLL.GetRoamingVolumeConfig(base.itemProperties.itemName); agent.speed = ReindogDLL.GetSpeedConfig(base.itemProperties.itemName); roamChanceOnDrop = ReindogDLL.GetRoamChanceConfig(base.itemProperties.itemName); roamAudio.maxDistance = ReindogDLL.GetMaxHearableDistanceConfig(base.itemProperties.itemName); hasQuicktimeEvents = ReindogDLL.ReindogAndFriendsModConfig.quicktimeEventsToggle.Value; qteDropRate = ReindogDLL.ReindogAndFriendsModConfig.quicktimeEventsDropRate.Value; qteIncreaseRate = ReindogDLL.ReindogAndFriendsModConfig.quicktimeEventsIncreaseRate.Value; quicktimeEventChance = ReindogDLL.ReindogAndFriendsModConfig.quicktimeEventChance.Value; quicktimeEventTriggerIntervalMax = ReindogDLL.ReindogAndFriendsModConfig.quicktimeEventIntervalMax.Value; quicktimeEventTriggerIntervalMin = ReindogDLL.ReindogAndFriendsModConfig.quicktimeEventIntervalMin.Value; if ((Object)(object)quicktimeCanvasPrefab == (Object)null) { hasQuicktimeEvents = false; } checkForNewPathInterval = Mathf.Clamp(0.35f + (1f - agent.speed / 17f), 0.35f, 1f); } public override void OnNetworkSpawn() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) agentDestination = ((Component)this).transform.position; ((NetworkBehaviour)this).OnNetworkSpawn(); agent = ((Component)this).GetComponent(); if (roamAI == RoamType.Random) { roamAudio.loop = true; } if (roamAI == RoamType.Random && ifRandomRoamOnStart) { ShouldRoam(); } if (hasQuicktimeEvents && (Object)(object)quicktimeCanvasPrefab != (Object)null) { if (Object.op_Implicit((Object)(object)quicktimeCanvasPrefab)) { } if ((Object)(object)quicktimeCanvas == (Object)null) { quicktimeCanvas = Object.Instantiate(quicktimeCanvasPrefab); } quicktimeCanvas.SetActive(false); progressBar = ((Component)quicktimeCanvas.transform.GetChild(0)).gameObject; startingScale = progressBar.transform.localScale.x; progressFillImage = ((Component)progressBar.transform.GetChild(0)).GetComponent(); qteText = ((Component)progressBar.transform.GetChild(1)).GetComponent(); ((TMP_Text)qteText).text = InputActionRebindingExtensions.GetBindingDisplayString(IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false), (DisplayStringOptions)0, (string)null).Split(' ')[0]; } } [ServerRpc(RequireOwnership = false)] private void SetRoamAudioServerRpc() { //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) //IL_00c1: 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 != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3770592881u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3770592881u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; int num = 0; if (shouldAudioBeRandom) { num = Random.Range(0, roamClips.Count); } else { num = ReindogDLL.GetMusicMode(((GrabbableObject)thisRoamingObjectScript).itemProperties.itemName); if (num >= roamClips.Count || num == -1) { num = 0; } } SetRoamAudioClientRpc(num); } [ClientRpc] private void SetRoamAudioClientRpc(int clipNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2154307061u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clipNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2154307061u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; roamAudio.clip = roamClips[clipNum]; roamAudio.Play(); } } } [ClientRpc] private void ChangeDestinationClientRpc(Vector3 newPos) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1087937370u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1087937370u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; agent.SetDestination(newPos); } } } public override void Update() { //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_079e: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_0741: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_0946: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) if (base.currentUseCooldown >= 0f) { base.currentUseCooldown -= Time.deltaTime; } if (((NetworkBehaviour)this).IsOwner) { if (!base.wasOwnerLastFrame) { base.wasOwnerLastFrame = true; } } else if (base.wasOwnerLastFrame) { base.wasOwnerLastFrame = false; } if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { if (isExplosive && (Object)(object)base.playerHeldBy != (Object)null && StartOfRound.Instance.shipHasLanded) { if (explosionTimer < timeBetweenExplosionChecks) { explosionTimer += Time.deltaTime; } else { explosionTimer = 0f; if (Random.Range(0, 101) < chanceToExplode && base.playerHeldBy.playerUsername == ReindogDLL.ReindogAndFriendsModConfig.dekuExplodeTargetPlayerName.Value) { TriggerExplosionClientRpc(); } } } if (roamAudio.isPlaying) { detectNoiseTimer += Time.deltaTime; if (detectNoiseTimer >= detectNoiseInterval) { detectNoiseTimer = 0f; SyncDetectNoiseClientRpc(); } } } if ((base.isHeld || base.isPocketed) && ((NetworkBehaviour)this).IsOwner && hasQuicktimeEvents && StartOfRound.Instance.shipHasLanded && !qteOnCooldown && (Object)(object)base.playerHeldBy != (Object)null && Object.op_Implicit((Object)(object)quicktimeCanvas) && !base.playerHeldBy.IsInspectingItem && !base.playerHeldBy.inSpecialInteractAnimation && !base.playerHeldBy.isClimbingLadder) { if (!quicktimeCanvas.activeSelf) { quickTimeEventTriggerTimer += Time.deltaTime; if (quickTimeEventTriggerTimer >= quickTimeEventTriggerInterval) { quickTimeEventTriggerTimer = 0f; quickTimeEventTriggerInterval = Random.Range(quicktimeEventTriggerIntervalMin, Mathf.Clamp(quicktimeEventTriggerIntervalMax, quicktimeEventTriggerIntervalMin + 1f, 1000f)); if (Random.Range(0, 101) <= quicktimeEventChance) { InitialiseQuickTimeEvent(); } } } else { QuicktimeEvent(); } } if (onlyMoveWhenOutOfSight && (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)) { if (roamAI == RoamType.Random && (Object)(object)StartOfRound.Instance != (Object)null) { bool flag = false; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position, 50f, 25, -1f, -1)) { flag = true; } } itemInSight = flag; } else if ((Object)(object)playerWhoDroppedItem != (Object)null && (Object)(object)StartOfRound.Instance != (Object)null) { itemInSight = playerWhoDroppedItem.HasLineOfSightToPosition(((Component)this).transform.position, 50f, 25, -1f, -1); } } if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { NavMeshHit val = default(NavMeshHit); navMeshAvailable = NavMesh.SamplePosition(((Component)this).transform.position, ref val, 15f, agent.areaMask); if (base.isHeld || base.isHeldByEnemy || base.isPocketed || base.fallTime < 1f || !((Object)(object)base.parentObject == (Object)null) || !navMeshAvailable || !StartOfRound.Instance.shipHasLanded || isInHoldingPen || roamChanceOnDrop <= 0) { canRoam = false; } else if (shouldRoam) { if ((onlyMoveWhenOutOfSight && !itemInSight) || !onlyMoveWhenOutOfSight) { canRoam = true; } else { canRoam = false; } } else { canRoam = false; } } if (!canRoam && (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) && aiEnabled) { EnableDisableAIClientRpc(enableState: false); timer = 0f; } if (base.isHeld || !((Object)(object)base.parentObject == (Object)null)) { return; } if (base.fallTime < 1f) { base.reachedFloorTarget = false; ((GrabbableObject)this).FallWithCurve(); if (((Component)this).transform.localPosition.y - base.targetFloorPosition.y < 0.1f && !base.hasHitGround) { ((GrabbableObject)this).PlayDropSFX(); ((GrabbableObject)this).OnHitGround(); } return; } if (!base.reachedFloorTarget) { base.reachedFloorTarget = true; if (base.floorYRot == -1) { ((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z); } else { ((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, (float)(base.floorYRot + base.itemProperties.floorYOffset) + 90f, base.itemProperties.restingRotation.z); } if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { ShouldRoam(); } ((Component)this).transform.localPosition = base.targetFloorPosition; lastWalkablePos = base.targetFloorPosition; lastStuckPositionCheck = base.targetFloorPosition; } if (!canRoam) { ((Component)this).transform.localPosition = lastWalkablePos; return; } if (!aiEnabled && (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost)) { if (roamAI != 0) { if ((Object)(object)playerWhoDroppedItem != (Object)null) { if (Vector3.Distance(((Component)this).transform.position, ((Component)playerWhoDroppedItem).transform.position) > distBeforeStartChasing && roamAI == RoamType.PlayerChaseOnDrop && !aiEnabled) { EnableDisableAIClientRpc(enableState: true); } else if (Vector3.Distance(((Component)this).transform.position, ((Component)playerWhoDroppedItem).transform.position) < distBeforeStartRunning && roamAI == RoamType.PlayerRunawayOnDrop && !aiEnabled) { EnableDisableAIClientRpc(enableState: true); } } } else { EnableDisableAIClientRpc(enableState: true); } } lastWalkablePos = ((Component)this).transform.localPosition; if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { return; } timer += Time.deltaTime; if (aiEnabled) { if (roamAI == RoamType.Random) { checkForNewPath += Time.deltaTime; stuckTimer += Time.deltaTime; if (stuckTimer >= stuckInterval) { CheckIfStuck(); } if (timer >= timeBetweenChangingPosition || Vector3.Distance(((Component)this).transform.position, agentDestination) <= 5f || ((int)agent.pathStatus != 0 && checkForNewPath > checkForNewPathInterval)) { ChangeNavMeshTargetPos(); } } if ((Object)(object)playerWhoDroppedItem != (Object)null) { if (roamAI == RoamType.PlayerChaseOnDrop) { if (Vector3.Distance(((Component)this).transform.position, ((Component)playerWhoDroppedItem).transform.position) < distFromItemToDestination || (onlyMoveWhenOutOfSight && itemInSight)) { if (!constantAIUntilNextDrop) { shouldRoam = false; } EnableDisableAIClientRpc(enableState: false); } else { ChangeNavMeshTargetPos(); } } if (roamAI == RoamType.PlayerRunawayOnDrop) { if (Vector3.Distance(((Component)this).transform.position, ((Component)playerWhoDroppedItem).transform.position) > distFromItemToDestination || (onlyMoveWhenOutOfSight && itemInSight)) { if (!constantAIUntilNextDrop) { shouldRoam = false; } EnableDisableAIClientRpc(enableState: false); } else { ChangeNavMeshTargetPos(); } } } } TryAndOpenDoor(); } private void TryAndOpenDoor() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (Physics.SphereCast(((Component)this).transform.position + new Vector3(0f, 0.5f, 0f), 0.55f, ((Component)this).transform.forward, ref doorHit, 2.9f, LayerMask.op_Implicit(InteractablesLayer)) && Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref doorHit)).transform).gameObject.GetComponent())) { DoorLock component = ((Component)((RaycastHit)(ref doorHit)).transform).GetComponent(); if (!component.isLocked && !component.isDoorOpened) { ((Component)((RaycastHit)(ref doorHit)).transform).GetComponent().TriggerAnimationNonPlayer(false, true, false); component.OpenDoorAsEnemyServerRpc(); } } } private void CheckIfStuck() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(((Component)this).transform.position, lastStuckPositionCheck) < 0.3f && NavMesh.SamplePosition(((Component)this).transform.position, ref navmeshHit, 10f, agent.areaMask)) { agent.Warp(((NavMeshHit)(ref navmeshHit)).position); } lastStuckPositionCheck = ((Component)this).transform.position; stuckTimer = 0f; } private void ChangeNavMeshTargetPos() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_00fc: 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) //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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) if (!agent.isOnNavMesh && !agent.isOnOffMeshLink && NavMesh.SamplePosition(((Component)this).transform.position, ref navmeshHit, 10f, agent.areaMask)) { agent.Warp(((NavMeshHit)(ref navmeshHit)).position); } if ((((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) && aiEnabled) { timer = 0f; Vector3 val = ((Component)this).transform.position; if (roamAI == RoamType.Random) { val = Random.insideUnitSphere * distFromItemToDestination; val += ((Component)this).transform.position; } else if (roamAI == RoamType.PlayerChaseOnDrop) { val = Random.insideUnitSphere * distFromItemToDestination; val += ((Component)playerWhoDroppedItem).transform.position; } else if (roamAI == RoamType.PlayerRunawayOnDrop) { val = ((Component)this).transform.position - ((Component)playerWhoDroppedItem).transform.position; ((Vector3)(ref val)).Normalize(); val *= distFromItemToDestination; val += ((Component)this).transform.position; } NavMesh.SamplePosition(val, ref navmeshHit, distFromItemToDestination, agent.areaMask); agentDestination = ((NavMeshHit)(ref navmeshHit)).position; ChangeDestinationClientRpc(agentDestination); checkForNewPath = 0f; } } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); if (isInHoldingPen) { isInHoldingPen = false; } if ((Object)(object)animator != (Object)null) { animator.SetBool("isHeld", true); } quickTimeEventTriggerInterval = Random.Range(quicktimeEventTriggerIntervalMin, Mathf.Clamp(quicktimeEventTriggerIntervalMax, quicktimeEventTriggerIntervalMin + 1f, 1000f)); } public void ShouldRoam() { if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) { return; } shouldRoam = false; if (roamChanceOnDrop >= 100) { shouldRoam = true; return; } if (roamChanceOnDrop <= 0) { shouldRoam = false; return; } int num = Random.Range(0, 101); if (num <= roamChanceOnDrop) { shouldRoam = true; } else { shouldRoam = false; } } public override void DiscardItem() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.ClearControlTips(); if ((Object)(object)base.playerHeldBy != (Object)null) { ItemDroppedByServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)base.playerHeldBy)); base.playerHeldBy.IsInspectingItem = false; base.playerHeldBy.activatingItem = false; } if (hasQuicktimeEvents && quickTimeEventActivated) { EndQuickTimeEvent(success: true); } } base.playerHeldBy = null; if ((Object)(object)animator != (Object)null) { animator.SetBool("isHeld", false); if (isInHoldingPen) { animator.SetBool("isIdle", true); } } } [ServerRpc(RequireOwnership = false)] private void ItemDroppedByServerRpc(NetworkBehaviourReference playerRef) { //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) //IL_00dc: 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 != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1776825030u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1776825030u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = default(PlayerControllerB); if (((NetworkBehaviourReference)(ref playerRef)).TryGet(ref val3, (NetworkManager)null)) { playerWhoDroppedItem = val3; } } } [ClientRpc] public void EnableDisableAIClientRpc(bool enableState) { //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) //IL_00dc: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(608262125u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enableState, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 608262125u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (enableState) { ((Behaviour)agent).enabled = true; aiEnabled = true; agent.isStopped = false; if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { SetRoamAudioServerRpc(); } if ((Object)(object)animator != (Object)null) { animator.SetBool("isIdle", false); animator.SetBool("isHeld", false); } ChangeNavMeshTargetPos(); return; } aiEnabled = false; if (((Behaviour)agent).enabled) { agent.isStopped = true; } if (stopAudioOnAiDisable) { roamAudio.Stop(); } if ((Object)(object)animator != (Object)null) { if ((base.isHeld || base.isPocketed) && !isInHoldingPen) { animator.SetBool("isHeld", true); } else { animator.SetBool("isIdle", true); animator.SetBool("isHeld", false); } } timer = 0f; ((Behaviour)agent).enabled = false; } [ClientRpc] private void TriggerExplosionClientRpc() { //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) //IL_00c1: 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_00d2: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2714986619u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2714986619u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up, true, 5.7f, 6f, 50, 0f, (GameObject)null, false); } } } [ClientRpc] private void SyncDetectNoiseClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3323843522u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3323843522u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.timeSinceMakingLoudNoise = 0f; } } } private void InitialiseQuickTimeEvent() { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) if (quicktimeCanvas.activeSelf || (Object)(object)base.playerHeldBy == (Object)null || qteOnCooldown) { return; } ((TMP_Text)qteText).text = InputActionRebindingExtensions.GetBindingDisplayString(IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false), (DisplayStringOptions)0, (string)null).Split(' ')[0]; int num = base.playerHeldBy.currentItemSlot; for (int i = 0; i < base.playerHeldBy.ItemSlots.Length; i++) { if ((Object)(object)base.playerHeldBy.ItemSlots[i] == (Object)(object)this) { num = i; } } base.playerHeldBy.SwitchToItemSlot(num, (GrabbableObject)null); SwitchToSpecificItemSlotServerRpc(num); if ((Object)(object)base.playerHeldBy.currentlyHeldObjectServer != (Object)null) { ((Component)base.playerHeldBy.currentlyHeldObjectServer).gameObject.GetComponent().PlayOneShot(base.playerHeldBy.currentlyHeldObjectServer.itemProperties.grabSFX, 0.6f); } quickTimeEventActivated = true; playerMoveSpeed = base.playerHeldBy.movementSpeed; base.playerHeldBy.movementSpeed = 0f; progressFillImage.fillAmount = 0.75f; progressBar.transform.localScale = Vector3.one * startingScale + Vector3.one * progressFillImage.fillAmount * 0.5f; quicktimeCanvas.SetActive(true); } [ServerRpc(RequireOwnership = false)] private void SwitchToSpecificItemSlotServerRpc(int slotNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2063456801u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, slotNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2063456801u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SwitchToSpecificItemSlotClientRpc(slotNum); } } } [ClientRpc] private void SwitchToSpecificItemSlotClientRpc(int slotNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2936509568u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, slotNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2936509568u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { base.playerHeldBy.SwitchToItemSlot(slotNum, (GrabbableObject)null); } } } private void EndQuickTimeEvent(bool success) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) quicktimeCanvas.SetActive(false); base.playerHeldBy.timeSinceSwitchingSlots = 0f; base.playerHeldBy.movementSpeed = playerMoveSpeed; progressFillImage.fillAmount = 0.65f; progressBar.transform.localScale = Vector3.one * startingScale + Vector3.one * progressFillImage.fillAmount * 0.5f; quickTimeEventActivated = false; qteOnCooldown = true; ((MonoBehaviour)this).Invoke("ResetQteCooldown", qteCooldownPeriod); if (!success) { ((MonoBehaviour)base.playerHeldBy).StartCoroutine(base.playerHeldBy.waitToEndOfFrameToDiscard()); } } private void QuicktimeEvent() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || !quickTimeEventActivated) { return; } if (!StartOfRound.Instance.shipHasLanded) { EndQuickTimeEvent(success: true); return; } Image obj = progressFillImage; obj.fillAmount -= qteDropRate * Time.deltaTime; base.playerHeldBy.timeSinceSwitchingSlots = 0f; if (IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false).WasReleasedThisFrame()) { Image obj2 = progressFillImage; obj2.fillAmount += qteIncreaseRate; mainAudio.PlayOneShot(qtePressClip, qtePressVolume); } Mathf.Clamp(progressFillImage.fillAmount, 0f, 1f); progressBar.transform.localScale = Vector3.one * startingScale + Vector3.one * progressFillImage.fillAmount * 0.5f; if (progressFillImage.fillAmount <= 0f) { EndQuickTimeEvent(success: false); } else if (progressFillImage.fillAmount >= 1f) { EndQuickTimeEvent(success: true); } } public bool GetQuickTimeStatus() { if (!hasQuicktimeEvents) { return false; } if (Object.op_Implicit((Object)(object)quicktimeCanvas)) { return quicktimeCanvas.activeSelf; } return false; } public void ResetQteCooldown() { qteOnCooldown = false; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3770592881u, new RpcReceiveHandler(__rpc_handler_3770592881), "SetRoamAudioServerRpc"); ((NetworkBehaviour)this).__registerRpc(2154307061u, new RpcReceiveHandler(__rpc_handler_2154307061), "SetRoamAudioClientRpc"); ((NetworkBehaviour)this).__registerRpc(1087937370u, new RpcReceiveHandler(__rpc_handler_1087937370), "ChangeDestinationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1776825030u, new RpcReceiveHandler(__rpc_handler_1776825030), "ItemDroppedByServerRpc"); ((NetworkBehaviour)this).__registerRpc(608262125u, new RpcReceiveHandler(__rpc_handler_608262125), "EnableDisableAIClientRpc"); ((NetworkBehaviour)this).__registerRpc(2714986619u, new RpcReceiveHandler(__rpc_handler_2714986619), "TriggerExplosionClientRpc"); ((NetworkBehaviour)this).__registerRpc(3323843522u, new RpcReceiveHandler(__rpc_handler_3323843522), "SyncDetectNoiseClientRpc"); ((NetworkBehaviour)this).__registerRpc(2063456801u, new RpcReceiveHandler(__rpc_handler_2063456801), "SwitchToSpecificItemSlotServerRpc"); ((NetworkBehaviour)this).__registerRpc(2936509568u, new RpcReceiveHandler(__rpc_handler_2936509568), "SwitchToSpecificItemSlotClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3770592881(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; ((RoamingObject)(object)target).SetRoamAudioServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2154307061(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 roamAudioClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref roamAudioClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoamingObject)(object)target).SetRoamAudioClientRpc(roamAudioClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1087937370(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoamingObject)(object)target).ChangeDestinationClientRpc(newPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1776825030(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_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) { NetworkBehaviourReference playerRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoamingObject)(object)target).ItemDroppedByServerRpc(playerRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_608262125(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) { bool enableState = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enableState, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoamingObject)(object)target).EnableDisableAIClientRpc(enableState); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2714986619(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; ((RoamingObject)(object)target).TriggerExplosionClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3323843522(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; ((RoamingObject)(object)target).SyncDetectNoiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2063456801(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 slotNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref slotNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoamingObject)(object)target).SwitchToSpecificItemSlotServerRpc(slotNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2936509568(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 slotNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref slotNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((RoamingObject)(object)target).SwitchToSpecificItemSlotClientRpc(slotNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "RoamingObject"; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace ReindogFan1372.ReindogDLL.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }