Decompiled source of UsualScrap v1.7.0
UsualScrap.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; using UsualScrap.Behaviors; using UsualScrap.Behaviors.Effects; using UsualScrap.Behaviors.OvertimeEffects; using UsualScrap.NetcodePatcher; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UsualScrap")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Adds 15+ unique equipment and scrap items that try to keep the vanilla tone")] [assembly: AssemblyFileVersion("1.7.0.0")] [assembly: AssemblyInformationalVersion("1.7.0")] [assembly: AssemblyProduct("UsualScrap")] [assembly: AssemblyTitle("UsualScrap")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.7.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UsualScrap { [BepInPlugin("Emil.UsualScrap", "UsualScrap", "1.7.0")] public class Plugin : BaseUnityPlugin { public const string PLUGIN_GUID = "Emil.UsualScrap"; public const string PLUGIN_NAME = "UsualScrap"; public const string PLUGIN_VERSION = "1.7.0"; public static Plugin instance; internal static UsualScrapConfigs BoundConfig { get; private set; } public void Registerstoreitem(Item name, string description, int price) { TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>(); val.clearPreviousText = true; val.displayText = description + "\n\n"; Items.RegisterShopItem(name, (TerminalNode)null, (TerminalNode)null, val, price); } public void ScriptSetUp(GrabbableObject script, bool grabbable, bool grabbableToEnemies, bool isInFactory, Item itemProperties) { script.grabbable = grabbable; script.grabbableToEnemies = grabbableToEnemies; script.isInFactory = isInFactory; script.itemProperties = itemProperties; } public void Awake() { //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_08d0: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_0976: Unknown result type (might be due to invalid IL or missing references) 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); } } } instance = this; AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "usualscrapassetbundle")); Item val2 = val.LoadAsset<Item>("Assets/Items/UnstableFuelCylinderAssets/UnstableFuelCylinder_Item.asset"); Item val3 = val.LoadAsset<Item>("Assets/Items/HandlampAssets/Handlamp_Item.asset"); Item val4 = val.LoadAsset<Item>("Assets/Items/BandagesAssets/Bandages_Item.asset"); Item val5 = val.LoadAsset<Item>("Assets/Items/MedicalKitAssets/MedicalKit_Item.asset"); Item val6 = val.LoadAsset<Item>("Assets/Items/DefibrillatorAssets/Defibrillator_Item.asset"); Item val7 = val.LoadAsset<Item>("Assets/Items/ToolboxAssets/Toolbox_Item.asset"); Item val8 = val.LoadAsset<Item>("Assets/Items/WalkingCaneAssets/WalkingCane_Item.asset"); Item val9 = val.LoadAsset<Item>("Assets/Items/RadioactiveCellAssets/RadioactiveCell_Item.asset"); Item val10 = val.LoadAsset<Item>("Assets/Items/ScissorsAssets/Scissors_Item.asset"); Item val11 = val.LoadAsset<Item>("Assets/Items/RoseAssets/Rose_Item.asset"); Item val12 = val.LoadAsset<Item>("Assets/Items/GoldenTicketAssets/GoldenTicket_Item.asset"); Item val13 = val.LoadAsset<Item>("Assets/Items/TicketAssets/Ticket_Item.asset"); Item val14 = val.LoadAsset<Item>("Assets/Items/PocketWatchAssets/PocketWatch_Item.asset"); Item val15 = val.LoadAsset<Item>("Assets/Items/PadlockAssets/Padlock_Item.asset"); Item val16 = val.LoadAsset<Item>("Assets/Items/CrowbarAssets/Crowbar_Item.asset"); Item val17 = val.LoadAsset<Item>("Assets/Items/CandyDispenserAssets/CandyDispenser_Item.asset"); Item val18 = val.LoadAsset<Item>("Assets/Items/CandyAssets/Lollipop_Item.asset"); Item val19 = val.LoadAsset<Item>("Assets/Items/CandyAssets/Peppermint_Item.asset"); Item val20 = val.LoadAsset<Item>("Assets/Items/CandyAssets/Caramel_Item.asset"); Item val21 = val.LoadAsset<Item>("Assets/Items/EmergencyInjectorAssets/EmergencyInjector_Item.asset"); Item val22 = val.LoadAsset<Item>("Assets/Items/ShiftControllerAssets/ShiftController_Item.asset"); Item val23 = val.LoadAsset<Item>("Assets/Items/GloomyCapsuleAssets/GloomyCapsule_Item.asset"); Item val24 = val.LoadAsset<Item>("Assets/Items/FrigidCapsuleAssets/FrigidCapsule_Item.asset"); Item val25 = val.LoadAsset<Item>("Assets/Items/SanguineCapsuleAssets/SanguineCapsule_Item.asset"); List<Item> list = new List<Item> { val2, val3, val4, val5, val6, val21, val22, val7, val9, val23, val24, val25, val15, val16, val8, val10, val11, val12, val13, val14, val17, val20, val18, val20 }; foreach (Item item in list) { if ((Object)(object)item != (Object)null) { NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab); Utilities.FixMixerGroups(item.spawnPrefab); } } HandlampScript script = val3.spawnPrefab.AddComponent<HandlampScript>(); ScriptSetUp((GrabbableObject)(object)script, grabbable: true, grabbableToEnemies: true, isInFactory: false, val3); ToolboxScript toolboxScript = val7.spawnPrefab.AddComponent<ToolboxScript>(); ScriptSetUp((GrabbableObject)(object)toolboxScript, grabbable: true, grabbableToEnemies: true, isInFactory: false, val7); ((GrabbableObject)toolboxScript).useCooldown = 0.1f; PadlockScript script2 = val15.spawnPrefab.AddComponent<PadlockScript>(); ScriptSetUp((GrabbableObject)(object)script2, grabbable: true, grabbableToEnemies: true, isInFactory: true, val15); CrowbarScript script3 = val16.spawnPrefab.AddComponent<CrowbarScript>(); ScriptSetUp((GrabbableObject)(object)script3, grabbable: true, grabbableToEnemies: true, isInFactory: true, val16); Items.RegisterItem(val16); UnstableFuelCylinderScript script4 = val2.spawnPrefab.AddComponent<UnstableFuelCylinderScript>(); ScriptSetUp((GrabbableObject)(object)script4, grabbable: true, grabbableToEnemies: true, isInFactory: true, val2); RadioactiveCellScript script5 = val9.spawnPrefab.AddComponent<RadioactiveCellScript>(); ScriptSetUp((GrabbableObject)(object)script5, grabbable: true, grabbableToEnemies: true, isInFactory: true, val9); GloomyCapsuleScript script6 = val23.spawnPrefab.AddComponent<GloomyCapsuleScript>(); ScriptSetUp((GrabbableObject)(object)script6, grabbable: true, grabbableToEnemies: true, isInFactory: true, val23); FrigidCapsuleScript script7 = val24.spawnPrefab.AddComponent<FrigidCapsuleScript>(); ScriptSetUp((GrabbableObject)(object)script7, grabbable: true, grabbableToEnemies: true, isInFactory: true, val24); SanguineCapsuleScript script8 = val25.spawnPrefab.AddComponent<SanguineCapsuleScript>(); ScriptSetUp((GrabbableObject)(object)script8, grabbable: true, grabbableToEnemies: true, isInFactory: true, val25); BandagesScript bandagesScript = val4.spawnPrefab.AddComponent<BandagesScript>(); ScriptSetUp((GrabbableObject)(object)bandagesScript, grabbable: true, grabbableToEnemies: true, isInFactory: false, val4); ((GrabbableObject)bandagesScript).useCooldown = 0.5f; MedicalKitScript script9 = val5.spawnPrefab.AddComponent<MedicalKitScript>(); ScriptSetUp((GrabbableObject)(object)script9, grabbable: true, grabbableToEnemies: true, isInFactory: false, val5); DefibrillatorScript script10 = val6.spawnPrefab.AddComponent<DefibrillatorScript>(); ScriptSetUp((GrabbableObject)(object)script10, grabbable: true, grabbableToEnemies: true, isInFactory: false, val6); EmergencyInjectorScript script11 = val21.spawnPrefab.AddComponent<EmergencyInjectorScript>(); ScriptSetUp((GrabbableObject)(object)script11, grabbable: true, grabbableToEnemies: true, isInFactory: false, val21); ShiftControllerScript script12 = val22.spawnPrefab.AddComponent<ShiftControllerScript>(); ScriptSetUp((GrabbableObject)(object)script12, grabbable: true, grabbableToEnemies: true, isInFactory: false, val22); CaneScript script13 = val8.spawnPrefab.AddComponent<CaneScript>(); ScriptSetUp((GrabbableObject)(object)script13, grabbable: true, grabbableToEnemies: true, isInFactory: true, val8); ScissorsScript script14 = val10.spawnPrefab.AddComponent<ScissorsScript>(); ScriptSetUp((GrabbableObject)(object)script14, grabbable: true, grabbableToEnemies: true, isInFactory: true, val10); RoseScript script15 = val11.spawnPrefab.AddComponent<RoseScript>(); ScriptSetUp((GrabbableObject)(object)script15, grabbable: true, grabbableToEnemies: true, isInFactory: true, val11); GoldenTicketScript script16 = val12.spawnPrefab.AddComponent<GoldenTicketScript>(); ScriptSetUp((GrabbableObject)(object)script16, grabbable: true, grabbableToEnemies: true, isInFactory: true, val12); TicketScript script17 = val13.spawnPrefab.AddComponent<TicketScript>(); ScriptSetUp((GrabbableObject)(object)script17, grabbable: true, grabbableToEnemies: true, isInFactory: true, val13); CandyDispenserScript script18 = val17.spawnPrefab.AddComponent<CandyDispenserScript>(); ScriptSetUp((GrabbableObject)(object)script18, grabbable: true, grabbableToEnemies: true, isInFactory: true, val17); CandyScript script19 = val18.spawnPrefab.AddComponent<CandyScript>(); ScriptSetUp((GrabbableObject)(object)script19, grabbable: true, grabbableToEnemies: true, isInFactory: true, val18); CandyScript script20 = val20.spawnPrefab.AddComponent<CandyScript>(); ScriptSetUp((GrabbableObject)(object)script20, grabbable: true, grabbableToEnemies: true, isInFactory: true, val20); CandyScript script21 = val19.spawnPrefab.AddComponent<CandyScript>(); ScriptSetUp((GrabbableObject)(object)script21, grabbable: true, grabbableToEnemies: true, isInFactory: true, val19); PocketWatchPlaceholder script22 = val14.spawnPrefab.AddComponent<PocketWatchPlaceholder>(); ScriptSetUp((GrabbableObject)(object)script22, grabbable: true, grabbableToEnemies: true, isInFactory: true, val14); LevelTypes val26 = (LevelTypes)14208; BoundConfig = new UsualScrapConfigs(((BaseUnityPlugin)this).Config); Items.RegisterItem(val14); if (BoundConfig.UnstableFuelCylinderLoaded.Value) { if (BoundConfig.UnstableFuelCylinderSpawnsAsScrap.Value) { Items.RegisterScrap(val2, BoundConfig.UnstableFuelCylinderSpawnWeight.Value, (LevelTypes)(-1)); } else { Items.RegisterItem(val2); } } if (BoundConfig.RadioactiveCellLoaded.Value) { if (BoundConfig.RadioactiveCellSpawnsAsScrap.Value) { Items.RegisterScrap(val9, BoundConfig.RadioactiveCellSpawnWeight.Value, (LevelTypes)(-1)); } else { Items.RegisterItem(val9); } } if (BoundConfig.CrowbarLoaded.Value) { if (BoundConfig.CrowbarSpawnsAsScrap.Value) { Items.RegisterScrap(val16, BoundConfig.CrowbarSpawnWeight.Value, (LevelTypes)(-1)); } else { Items.RegisterItem(val16); } } if (BoundConfig.PadlockLoaded.Value) { if (BoundConfig.PadlockSpawnsAsScrap.Value) { Items.RegisterScrap(val15, BoundConfig.PadlockSpawnWeight.Value, (LevelTypes)(-1)); } if (BoundConfig.PadlockIsStoreItem.Value) { Registerstoreitem(val15, "This Padlock can be used to lock doors on your enemies..or coworkers.", BoundConfig.PadlockStorePrice.Value); } if (!BoundConfig.PadlockSpawnsAsScrap.Value && !BoundConfig.PadlockIsStoreItem.Value) { Items.RegisterItem(val15); } } if (BoundConfig.WalkingCaneLoaded.Value) { if (BoundConfig.WalkingCaneSpawnsAsScrap.Value) { Items.RegisterScrap(val8, BoundConfig.WalkingCaneSpawnWeight.Value, val26); } else { Items.RegisterItem(val8); } } if (BoundConfig.ScissorsLoaded.Value) { if (BoundConfig.ScissorsSpawnsAsScrap.Value) { Items.RegisterScrap(val10, BoundConfig.ScissorsSpawnWeight.Value, val26); } else { Items.RegisterItem(val10); } } if (BoundConfig.RoseLoaded.Value) { if (BoundConfig.RoseSpawnsAsScrap.Value) { Items.RegisterScrap(val11, BoundConfig.RoseSpawnWeight.Value, val26); } else { Items.RegisterItem(val11); } } if (BoundConfig.TicketLoaded.Value) { if (BoundConfig.TicketSpawnsAsScrap.Value) { Items.RegisterScrap(val13, BoundConfig.TicketSpawnWeight.Value, val26); } else { Items.RegisterItem(val13); } } if (BoundConfig.GoldenTicketLoaded.Value) { if (BoundConfig.GoldenTicketSpawnsAsScrap.Value) { Items.RegisterScrap(val12, BoundConfig.GoldenTicketSpawnWeight.Value, val26); } else { Items.RegisterItem(val12); } } if (BoundConfig.CandyDispenserLoaded.Value) { if (BoundConfig.CandyDispenserSpawnsAsScrap.Value) { Items.RegisterScrap(val17, BoundConfig.CandyDispenserSpawnWeight.Value, val26); Items.RegisterItem(val20); Items.RegisterItem(val18); Items.RegisterItem(val19); } else { Items.RegisterItem(val17); Items.RegisterItem(val20); Items.RegisterItem(val18); Items.RegisterItem(val19); } } if (BoundConfig.GloomyCapsuleLoaded.Value) { if (BoundConfig.GloomyCapsuleSpawnsAsScrap.Value) { Items.RegisterScrap(val23, BoundConfig.GloomyCapsuleSpawnWeight.Value, (LevelTypes)(-1)); } else { Items.RegisterItem(val23); } } if (BoundConfig.FrigidCapsuleLoaded.Value) { if (BoundConfig.FrigidCapsuleSpawnsAsScrap.Value) { Items.RegisterScrap(val24, BoundConfig.FrigidCapsuleSpawnWeight.Value, (LevelTypes)(-1)); } else { Items.RegisterItem(val24); } } if (BoundConfig.HandlampLoaded.Value) { if (BoundConfig.HandlampIsStoreItem.Value) { Registerstoreitem(val3, "The Handlamp is perfect for illuminating your surroundings..and possibly blinding you.", BoundConfig.HandlampStorePrice.Value); } else { Items.RegisterItem(val3); } } if (BoundConfig.BandagesLoaded.Value) { if (BoundConfig.BandagesIsStoreItem.Value) { Registerstoreitem(val4, "The Bandages will get you up and going in no time at all!", BoundConfig.BandagesStorePrice.Value); } else { Items.RegisterItem(val4); } } if (BoundConfig.MedicalKitLoaded.Value) { if (BoundConfig.MedicalKitIsStoreItem.Value) { Registerstoreitem(val5, "The Medical Kit can heal anything if given time!", BoundConfig.MedicalKitStorePrice.Value); } else { Items.RegisterItem(val5); } } if (BoundConfig.ShiftControllerLoaded.Value) { if (BoundConfig.ShiftControllerIsStoreItem.Value) { Registerstoreitem(val22, "The Shift Controller is a portable teleporter that allows you to set the teleport position.", BoundConfig.ShiftControllerStorePrice.Value); } else { Items.RegisterItem(val22); } } if (BoundConfig.EmergencyInjectorLoaded.Value) { if (BoundConfig.EmergencyInjectorIsStoreItem.Value) { Registerstoreitem(val21, "The Emergency Injector boosts your movement capabilities for a while and gives a small amount of health, don't take too much!", BoundConfig.EmergencyInjectorStorePrice.Value); } else { Items.RegisterItem(val21); } } if (BoundConfig.DefibrillatorLoaded.Value) { if (BoundConfig.DefibrillatorIsStoreItem.Value) { Registerstoreitem(val6, "The Defibrillator can revive those employees lost to stupidity.", BoundConfig.DefibrillatorStorePrice.Value); } else { Items.RegisterItem(val6); } } if (BoundConfig.ToolboxLoaded.Value) { if (BoundConfig.ToolboxIsStoreItem.Value) { Registerstoreitem(val7, "The Toolbox can deconstruct some traps for a fine reward.", BoundConfig.ToolboxStorePrice.Value); } else { Items.RegisterItem(val7); } } Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "Emil.UsualScrap"); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Emil.UsualScrap is loaded!"); } } internal class UsualScrapConfigs { public readonly ConfigEntry<bool> UnstableFuelCylinderLoaded; public readonly ConfigEntry<bool> UnstableFuelCylinderSpawnsAsScrap; public readonly ConfigEntry<int> UnstableFuelCylinderSpawnWeight; public readonly ConfigEntry<bool> RadioactiveCellLoaded; public readonly ConfigEntry<bool> RadioactiveCellSpawnsAsScrap; public readonly ConfigEntry<int> RadioactiveCellSpawnWeight; public readonly ConfigEntry<bool> CrowbarLoaded; public readonly ConfigEntry<bool> CrowbarSpawnsAsScrap; public readonly ConfigEntry<int> CrowbarSpawnWeight; public readonly ConfigEntry<bool> PadlockLoaded; public readonly ConfigEntry<bool> PadlockSpawnsAsScrap; public readonly ConfigEntry<int> PadlockSpawnWeight; public readonly ConfigEntry<bool> PadlockIsStoreItem; public readonly ConfigEntry<int> PadlockStorePrice; public readonly ConfigEntry<bool> WalkingCaneLoaded; public readonly ConfigEntry<bool> WalkingCaneSpawnsAsScrap; public readonly ConfigEntry<int> WalkingCaneSpawnWeight; public readonly ConfigEntry<bool> ScissorsLoaded; public readonly ConfigEntry<bool> ScissorsSpawnsAsScrap; public readonly ConfigEntry<int> ScissorsSpawnWeight; public readonly ConfigEntry<bool> RoseLoaded; public readonly ConfigEntry<bool> RoseSpawnsAsScrap; public readonly ConfigEntry<int> RoseSpawnWeight; public readonly ConfigEntry<bool> TicketLoaded; public readonly ConfigEntry<bool> TicketSpawnsAsScrap; public readonly ConfigEntry<int> TicketSpawnWeight; public readonly ConfigEntry<bool> GoldenTicketLoaded; public readonly ConfigEntry<bool> GoldenTicketSpawnsAsScrap; public readonly ConfigEntry<int> GoldenTicketSpawnWeight; public readonly ConfigEntry<bool> CandyDispenserLoaded; public readonly ConfigEntry<bool> CandyDispenserSpawnsAsScrap; public readonly ConfigEntry<int> CandyDispenserSpawnWeight; public readonly ConfigEntry<bool> GloomyCapsuleLoaded; public readonly ConfigEntry<bool> GloomyCapsuleSpawnsAsScrap; public readonly ConfigEntry<int> GloomyCapsuleSpawnWeight; public readonly ConfigEntry<bool> FrigidCapsuleLoaded; public readonly ConfigEntry<bool> FrigidCapsuleSpawnsAsScrap; public readonly ConfigEntry<int> FrigidCapsuleSpawnWeight; public readonly ConfigEntry<bool> HandlampLoaded; public readonly ConfigEntry<bool> HandlampIsStoreItem; public readonly ConfigEntry<int> HandlampStorePrice; public readonly ConfigEntry<bool> BandagesLoaded; public readonly ConfigEntry<bool> BandagesIsStoreItem; public readonly ConfigEntry<int> BandagesStorePrice; public readonly ConfigEntry<bool> MedicalKitLoaded; public readonly ConfigEntry<bool> MedicalKitIsStoreItem; public readonly ConfigEntry<int> MedicalKitStorePrice; public readonly ConfigEntry<bool> DefibrillatorLoaded; public readonly ConfigEntry<bool> DefibrillatorIsStoreItem; public readonly ConfigEntry<int> DefibrillatorStorePrice; public readonly ConfigEntry<bool> ShiftControllerLoaded; public readonly ConfigEntry<bool> ShiftControllerIsStoreItem; public readonly ConfigEntry<int> ShiftControllerStorePrice; public readonly ConfigEntry<bool> EmergencyInjectorLoaded; public readonly ConfigEntry<bool> EmergencyInjectorIsStoreItem; public readonly ConfigEntry<int> EmergencyInjectorStorePrice; public readonly ConfigEntry<bool> ToolboxLoaded; public readonly ConfigEntry<bool> ToolboxIsStoreItem; public readonly ConfigEntry<int> ToolboxStorePrice; public readonly ConfigEntry<int> ShiftControllerGreatRange; public readonly ConfigEntry<int> ShiftControllerPoorRange; public UsualScrapConfigs(ConfigFile cfg) { cfg.SaveOnConfigSet = false; UnstableFuelCylinderLoaded = cfg.Bind<bool>("Scrap Item - Unstable Fuel Cylinder", "Unstable Fuel Cylinder is Loaded", true, "Whether or not the Unstable Fuel Cylinder is loaded."); UnstableFuelCylinderSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Unstable Fuel Cylinder", "Unstable Fuel Cylinder is a scrap item", true, "Whether or not the Unstable Fuel Cylinder spawns as scrap."); UnstableFuelCylinderSpawnWeight = cfg.Bind<int>("Scrap Item - Unstable Fuel Cylinder", "Unstable Fuel Cylinder spawn weight", 30, "How often the Unstable Fuel Cylinder spawns as scrap."); RadioactiveCellLoaded = cfg.Bind<bool>("Scrap Item - Radioactive Cell", "Radioactive Cell is Loaded", true, "Whether or not the Radioactive Cell is loaded."); RadioactiveCellSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Radioactive Cell", "Radioactive Cell is a scrap item", true, "Whether or not the Radioactive Cell spawns as scrap."); RadioactiveCellSpawnWeight = cfg.Bind<int>("Scrap Item - Radioactive Cell", "Radioactive Cell spawn weight", 15, "How often the Radioactive Cell spawns as scrap."); CrowbarLoaded = cfg.Bind<bool>("Scrap Item - Crowbar", "Crowbar is loaded", true, "Whether or not the Crowbar is loaded."); CrowbarSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Crowbar", "Crowbar is a scrap item", true, "Whether or not the Crowbar spawns as scrap."); CrowbarSpawnWeight = cfg.Bind<int>("Scrap Item - Crowbar", "Crowbar spawn weight", 35, "How often the Crowbar spawns as scrap."); PadlockLoaded = cfg.Bind<bool>("Scrap Item - Padlock", "Padlock is loaded", true, "Whether or not the Padlock is loaded."); PadlockSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Padlock", "Padlock is a scrap item", true, "Whether or not the Padlock spawns as scrap."); PadlockSpawnWeight = cfg.Bind<int>("Scrap Item - Padlock", "Padlock spawn weight", 35, "How often the Padlock spawns as scrap."); PadlockIsStoreItem = cfg.Bind<bool>("Scrap Item - Padlock", "Padlock is a store item", false, "Whether or not the Padlock is a store item."); PadlockStorePrice = cfg.Bind<int>("Scrap Item - Padlock", "Padlock store price", 15, "The store price of the Padlock."); WalkingCaneLoaded = cfg.Bind<bool>("Scrap Item - Walking Cane", "Walking Cane is loaded", true, "Whether or not the Walking Cane is loaded."); WalkingCaneSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Walking Cane", "Walking Cane is a scrap item", true, "Whether or not the Walking Cane spawns as scrap."); WalkingCaneSpawnWeight = cfg.Bind<int>("Scrap Item - Walking Cane", "Walking Cane spawn weight", 30, "How often the Walking Cane spawns as scrap."); ScissorsLoaded = cfg.Bind<bool>("Scrap Item - Scissors", "Scissors are loaded", true, "Whether or not the Scissors are loaded."); ScissorsSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Scissors", "Scissors are a scrap item", true, "Whether or not the Scissors spawn as scrap."); ScissorsSpawnWeight = cfg.Bind<int>("Scrap Item - Scissors", "Scissors spawn weight", 30, "How often the Scissors spawn as scrap."); RoseLoaded = cfg.Bind<bool>("Scrap Item - Rose", "Rose is loaded", true, "Whether or not the Rose is loaded."); RoseSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Rose", "Rose is scrap item", true, "Whether or not the Rose spawns as scrap."); RoseSpawnWeight = cfg.Bind<int>("Scrap Item - Rose", "Rose spawn weight", 40, "How often the Rose spawns as scrap."); TicketLoaded = cfg.Bind<bool>("Scrap Item - Ticket", "Ticket is loaded", true, "Whether or not the Ticket is loaded."); TicketSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Ticket", "Ticket is a scrap item", true, "Whether or not the Ticket spawns as scrap."); TicketSpawnWeight = cfg.Bind<int>("Scrap Item - Ticket", "Ticket spawn weight", 40, "How often the Ticket spawns as scrap."); GoldenTicketLoaded = cfg.Bind<bool>("Scrap Item - Golden Ticket", "Golden Ticket is loaded", true, "Whether or not the Golden Ticket is loaded."); GoldenTicketSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Golden Ticket", "Golden Ticket is a scrap item", true, "Whether or not the Golden Ticket spawns as scrap."); GoldenTicketSpawnWeight = cfg.Bind<int>("Scrap Item - Golden Ticket", "Golden Ticket spawn weight", 5, "How often the Golden Ticket spawns as scrap."); CandyDispenserLoaded = cfg.Bind<bool>("Scrap Item - Candy Dispenser", "Candy Dispenser is loaded", true, "Whether or not the Candy Dispenser and its drops are loaded."); CandyDispenserSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Candy Dispenser", "Candy Dispenser is a scrap Item", true, "Whether or not the Candy Dispenser spawns as scrap."); CandyDispenserSpawnWeight = cfg.Bind<int>("Scrap Item - Candy Dispenser", "Candy Dispenser spawn weight", 30, "How often the Candy Dispenser spawns as scrap."); GloomyCapsuleLoaded = cfg.Bind<bool>("Scrap Item - Gloomy Capsule", "Gloomy Capsule is loaded", true, "Whether or not the Gloomy Capsule is loaded."); GloomyCapsuleSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Gloomy Capsule", "Gloomy Capsule is a scrap item", true, "Whether or not the Gloomy Capsule spawns as scrap."); GloomyCapsuleSpawnWeight = cfg.Bind<int>("Scrap Item - Gloomy Capsule", "Gloomy Capsule spawn weight", 30, "How often the Gloomy Capsule spawns as scrap."); FrigidCapsuleLoaded = cfg.Bind<bool>("Scrap Item - Frigid Capsule", "Frigid Capsule is loaded", true, "Whether or not the Frigid Capsule is loaded."); FrigidCapsuleSpawnsAsScrap = cfg.Bind<bool>("Scrap Item - Frigid Capsule", "Frigid Capsule is a scrap item", true, "Whether or not the Frigid Capsule spawns as scrap."); FrigidCapsuleSpawnWeight = cfg.Bind<int>("Scrap Item - Frigid Capsule", "Frigid Capsule spawn weight", 30, "How often the Frigid Capsule spawns as scrap."); HandlampLoaded = cfg.Bind<bool>("Store Item - Handlamp", "Handlamp is loaded", true, "Whether or not the Handlamp is loaded."); HandlampIsStoreItem = cfg.Bind<bool>("Store Item - Handlamp", "Handlamp is a store item", true, "Whether or not the Handlamp is a store item."); HandlampStorePrice = cfg.Bind<int>("Store Item - Handlamp", "Handlamp store price", 25, "The store price of the Handlamp."); BandagesLoaded = cfg.Bind<bool>("Store Item - Bandages", "Bandages are loaded", true, "Whether or not the Bandages are loaded."); BandagesIsStoreItem = cfg.Bind<bool>("Store Item - Bandages", "Bandages are a store item", true, "Whether or not the Bandages are a store item."); BandagesStorePrice = cfg.Bind<int>("Store Item - Bandages", "Bandages store price", 20, "The store price of the Bandages."); MedicalKitLoaded = cfg.Bind<bool>("Store Item - Medical Kit", "Medical Kit is loaded", true, "Whether or not the Medical Kit is loaded."); MedicalKitIsStoreItem = cfg.Bind<bool>("Store Item - Medical Kit", "Medical Kit is a store item", true, "Whether or not the Medical Kit is a store item."); MedicalKitStorePrice = cfg.Bind<int>("Store Item - Medical Kit", "Medical Kit store price", 90, "The store price of the Medical Kit."); DefibrillatorLoaded = cfg.Bind<bool>("Store Item - Defibrillator", "Defibrillator is loaded", true, "Whether or not the Defibrillator is loaded."); DefibrillatorIsStoreItem = cfg.Bind<bool>("Store Item - Defibrillator", "Defibrillator is a store item", true, "Whether or not the Defibrillator is a store item."); DefibrillatorStorePrice = cfg.Bind<int>("Store Item - Defibrillator", "Defibrillator store price", 375, "The store price of the Defibrillator."); ShiftControllerLoaded = cfg.Bind<bool>("Store Item - Shift Controller", "Shift Controller is loaded", true, "Whether or not the Shift Controller is loaded."); ShiftControllerIsStoreItem = cfg.Bind<bool>("Store Item - Shift Controller", "Shift Controller is a store item", true, "Whether or not the Shift Controller is a store item."); ShiftControllerStorePrice = cfg.Bind<int>("Store Item - Shift Controller", "Shift Controller store price", 225, "The store price of the Shift Controller."); ShiftControllerGreatRange = cfg.Bind<int>("Store Item - Shift Controller", "Shift Controllers great/first connection range", 50, "The max range of the Shift Controller's great/first connection range. (The great/first connection range starts at 0 and stops at this value, The average/middle connection range starts at this value)"); ShiftControllerPoorRange = cfg.Bind<int>("Store Item - Shift Controller", "Shift Controllers poor/last connection range", 175, "The range where the Shift Controller enters it's poor/last connection range. (The average/middle connection range stops at this value, The poor/last connection range starts at this value)"); EmergencyInjectorLoaded = cfg.Bind<bool>("Store Item - Emergency Injector", "Emergency Injector is loaded", true, "Whether or not the Emergency Injector is loaded."); EmergencyInjectorIsStoreItem = cfg.Bind<bool>("Store Item - Emergency Injector", "Emergency Injector is a store item", true, "Whether or not the Emergency Injector is a store item."); EmergencyInjectorStorePrice = cfg.Bind<int>("Store Item - Emergency Injector", "Emergency Injector store price", 60, "The store price of the Emergency Injector."); ToolboxLoaded = cfg.Bind<bool>("Store Item - Toolbox", "Toolbox is loaded", true, "Whether or not the Toolbox is loaded."); ToolboxIsStoreItem = cfg.Bind<bool>("Store Item - Toolbox", "Toolbox is a store item", true, "Whether or not the Toolbox is a store item."); ToolboxStorePrice = cfg.Bind<int>("Store Item - Toolbox", "Toolbox store price", 115, "The store price of the Toolbox."); ClearOrphanedEntries(cfg); cfg.Save(); cfg.SaveOnConfigSet = true; } private static void ClearOrphanedEntries(ConfigFile cfg) { PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries"); Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)propertyInfo.GetValue(cfg); dictionary.Clear(); } } } namespace UsualScrap.Behaviors { internal class BandagesScript : GrabbableObject { private int uses = 3; private ParticleSystem particle; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && base.playerHeldBy.health < 100) { HealServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void HealServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(87823207u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 87823207u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { HealClientRpc(); } } } [ClientRpc] public void HealClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2085797069u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2085797069u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Heal(); } } } public void Heal() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) particle = ((Component)this).GetComponentInChildren<ParticleSystem>(); ParticleSystem val = Object.Instantiate<ParticleSystem>(particle, ((Component)this).transform.position, Quaternion.identity); val.Play(); if (uses > 1 && base.playerHeldBy.health < 80) { base.playerHeldBy.health = base.playerHeldBy.health + 20; uses--; } else if (uses > 1 && base.playerHeldBy.health >= 80 && base.playerHeldBy.health < 100) { base.playerHeldBy.health = base.playerHeldBy.health + (100 - base.playerHeldBy.health); uses--; } else if (uses <= 1 && base.playerHeldBy.health < 80) { base.playerHeldBy.health = base.playerHeldBy.health + 20; if (base.isHeld) { base.playerHeldBy.DespawnHeldObject(); } } else if (uses <= 1 && base.playerHeldBy.health >= 80 && base.playerHeldBy.health < 100) { base.playerHeldBy.health = base.playerHeldBy.health + (100 - base.playerHeldBy.health); if (base.isHeld) { base.playerHeldBy.DespawnHeldObject(); } } if (base.playerHeldBy.health > 20) { if (base.playerHeldBy.criticallyInjured || base.playerHeldBy.bleedingHeavily) { base.playerHeldBy.criticallyInjured = false; base.playerHeldBy.bleedingHeavily = false; } if ((Object)(object)base.playerHeldBy.playerBodyAnimator != (Object)null) { base.playerHeldBy.playerBodyAnimator.SetBool("Limp", false); } HUDManager.Instance.UpdateHealthUI(base.playerHeldBy.health, false); } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_BandagesScript() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(87823207u, new RpcReceiveHandler(__rpc_handler_87823207)); NetworkManager.__rpc_func_table.Add(2085797069u, new RpcReceiveHandler(__rpc_handler_2085797069)); } private static void __rpc_handler_87823207(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; ((BandagesScript)(object)target).HealServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2085797069(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((BandagesScript)(object)target).HealClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BandagesScript"; } } internal class CandyDispenserScript : GrabbableObject { private RaycastHit[] objectsHitByDispenser; private List<RaycastHit> objectsHitByDispenserList = new List<RaycastHit>(); private bool isHoldingButton; private bool reelingUp; private Coroutine reelingUpCoroutine; private PlayerControllerB previousPlayerHeldBy; private static Item _lollipopItem; private static Item _caramelItem; private static Item _peppermintItem; private GameObject dispenserBase; private MeshRenderer dispenserMesh; private int dispenserMask = 1084754248; private int dispenserHitForce = 2; private AudioSource dispenserAudio; private AudioClip swing; private AudioClip Dispense; private AudioClip[] hitSFX; private Color setColor; public void Awake() { dispenserAudio = ((Component)((Component)this).transform.Find("CandyDispenserSounds")).gameObject.GetComponent<AudioSource>(); AudioSource[] components = ((Component)((Component)this).transform.Find("CandyDispenserSounds")).gameObject.GetComponents<AudioSource>(); swing = components[1].clip; Dispense = components[2].clip; hitSFX = (AudioClip[])(object)new AudioClip[1] { dispenserAudio.clip }; } public override void Start() { ((GrabbableObject)this).Start(); SetColorServerRPC(); } [ServerRpc(RequireOwnership = false)] public void SetColorServerRPC() { //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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3606619266u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3606619266u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { float num = new Random().Next(2, 11); float num2 = new Random().Next(2, 11); float num3 = new Random().Next(2, 11); float num4 = 0.9f / num; float num5 = 0.9f / num2; float num6 = 0.9f / num3; setColor = new Color(num4, num5, num6, 1f); SetColorClientRPC(setColor); } } } [ClientRpc] public void SetColorClientRPC(Color color) { //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_0114: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(809217553u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref color); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 809217553u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { dispenserBase = ((Component)((Component)((Component)this).transform.Find("CandyDispenserModel")).gameObject.transform.Find("DispenserBase")).gameObject; dispenserMesh = dispenserBase.GetComponent<MeshRenderer>(); ((Renderer)dispenserMesh).material.color = color; } } } public override void ItemActivate(bool used, bool buttonDown = true) { if ((Object)(object)base.playerHeldBy == (Object)null) { return; } isHoldingButton = buttonDown; if (!reelingUp && buttonDown) { reelingUp = true; previousPlayerHeldBy = base.playerHeldBy; if (reelingUpCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine); } reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpDispenser()); } } private IEnumerator reelUpDispenser() { base.playerHeldBy.activatingItem = true; base.playerHeldBy.twoHanded = true; base.playerHeldBy.playerBodyAnimator.ResetTrigger("dispenserHit"); base.playerHeldBy.playerBodyAnimator.SetBool("reelingUp", true); ReelUpSFXServerRpc(); yield return (object)new WaitForSeconds(0.35f); yield return (object)new WaitUntil((Func<bool>)(() => !isHoldingButton || !base.isHeld)); SwingDispenser(!base.isHeld); yield return (object)new WaitForSeconds(0.13f); yield return (object)new WaitForEndOfFrame(); HitDispenser(!base.isHeld); yield return (object)new WaitForSeconds(0.3f); reelingUp = false; reelingUpCoroutine = null; } [ServerRpc] public void ReelUpSFXServerRpc() { //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_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(1864758460u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1864758460u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ReelUpSFXClientRpc(); } } [ClientRpc] public void ReelUpSFXClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1880468153u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1880468153u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsOwner) { } } } public void SwingDispenser(bool cancel = false) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) previousPlayerHeldBy.playerBodyAnimator.SetBool("reelingUp", false); if (!cancel) { dispenserAudio.PlayOneShot(swing); previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false); } } public void HitDispenser(bool cancel = false) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: 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) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)previousPlayerHeldBy == (Object)null) { return; } previousPlayerHeldBy.activatingItem = false; bool flag = false; int num = -1; if (!cancel) { previousPlayerHeldBy.twoHanded = false; objectsHitByDispenser = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, 0.8f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, 1.5f, dispenserMask, (QueryTriggerInteraction)2); objectsHitByDispenserList = objectsHitByDispenser.OrderBy(delegate(RaycastHit x) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) RaycastHit val4 = x; return ((RaycastHit)(ref val4)).distance; }).ToList(); IHittable val2 = default(IHittable); RaycastHit val3 = default(RaycastHit); for (int i = 0; i < objectsHitByDispenserList.Count; i++) { RaycastHit val = objectsHitByDispenserList[i]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 8) { val = objectsHitByDispenserList[i]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 11) { val = objectsHitByDispenserList[i]; if (!((Component)((RaycastHit)(ref val)).transform).TryGetComponent<IHittable>(ref val2)) { continue; } val = objectsHitByDispenserList[i]; if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform) { continue; } val = objectsHitByDispenserList[i]; if (!(((RaycastHit)(ref val)).point == Vector3.zero)) { Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; val = objectsHitByDispenserList[i]; if (Physics.Linecast(position, ((RaycastHit)(ref val)).point, ref val3, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } } flag = true; Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward; val2.Hit(dispenserHitForce, forward, previousPlayerHeldBy, true, 1); continue; } } val = objectsHitByDispenserList[i]; if (((RaycastHit)(ref val)).collider.isTrigger) { continue; } flag = true; val = objectsHitByDispenserList[i]; string tag = ((Component)((RaycastHit)(ref val)).collider).gameObject.tag; for (int j = 0; j < StartOfRound.Instance.footstepSurfaces.Length; j++) { if (StartOfRound.Instance.footstepSurfaces[j].surfaceTag == tag) { num = j; dispenserAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[j].hitSurfaceSFX); break; } } } float num2 = new Random().Next(1, 25); if (num2 == 1f) { if (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipHasLanded || !TimeOfDay.Instance.currentLevel.planetHasTime) { MonoBehaviour.print((object)"Candy spawning disabled, land at a moon with a time cycle!"); return; } dispenserAudio.PlayOneShot(Dispense); SpawnScrapServerRpc(); } } if (flag) { int sound = RoundManager.PlayRandomClip(dispenserAudio, hitSFX, true, 1f, 0, 1000); Object.FindObjectOfType<RoundManager>().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0); base.playerHeldBy.playerBodyAnimator.SetTrigger("dispenserHit"); HitDispenserServerRpc(sound); } } [ServerRpc] public void HitDispenserServerRpc(int sound) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //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_00b7: 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_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(3161520678u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, sound); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3161520678u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { HitDispenserClientRpc(sound); } } [ClientRpc] public void HitDispenserClientRpc(int sound) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3067530259u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, sound); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3067530259u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { HitSurfaceWithDispenser(sound); } } } private void HitSurfaceWithDispenser(int sound) { if (!((NetworkBehaviour)this).IsOwner) { dispenserAudio.PlayOneShot(hitSFX[sound]); } WalkieTalkie.TransmitOneShotAudio(dispenserAudio, hitSFX[sound], 1f); } [ServerRpc(RequireOwnership = false)] public void SpawnScrapServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2364265404u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2364265404u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SpawnCandy(); } } } public void SpawnCandy() { //IL_003e: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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) Item val = PullLollipop(); Item val2 = PullCaramel(); Item val3 = PullPeppermint(); GameObject val4; switch (new Random().Next(1, 4)) { case 1: { val4 = Object.Instantiate<GameObject>(val.spawnPrefab, ((Component)base.playerHeldBy).transform.position + Vector3.up, Quaternion.identity); GrabbableObject component3 = val4.GetComponent<GrabbableObject>(); component3.fallTime = 0f; ((NetworkBehaviour)component3).NetworkObject.Spawn(false); component3.SetScrapValue(10); break; } case 2: { val4 = Object.Instantiate<GameObject>(val2.spawnPrefab, ((Component)base.playerHeldBy).transform.position + Vector3.up, Quaternion.identity); GrabbableObject component2 = val4.GetComponent<GrabbableObject>(); component2.fallTime = 0f; ((NetworkBehaviour)component2).NetworkObject.Spawn(false); component2.SetScrapValue(10); break; } default: { val4 = Object.Instantiate<GameObject>(val3.spawnPrefab, ((Component)base.playerHeldBy).transform.position + Vector3.up, Quaternion.identity); GrabbableObject component = val4.GetComponent<GrabbableObject>(); component.fallTime = 0f; ((NetworkBehaviour)component).NetworkObject.Spawn(false); component.SetScrapValue(10); break; } } if ((Object)(object)previousPlayerHeldBy != (Object)null && previousPlayerHeldBy.isInHangarShipRoom) { previousPlayerHeldBy.SetItemInElevator(true, true, val4.GetComponent<GrabbableObject>()); } } public static Item PullLollipop() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if ((Object)_lollipopItem == (Object)null) { _lollipopItem = StartOfRound.Instance.allItemsList.itemsList.First((Item i) => ((Object)i).name == "Lollipop_Item"); } return _lollipopItem; } public static Item PullCaramel() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if ((Object)_caramelItem == (Object)null) { _caramelItem = StartOfRound.Instance.allItemsList.itemsList.First((Item i) => ((Object)i).name == "Caramel_Item"); } return _caramelItem; } public static Item PullPeppermint() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if ((Object)_peppermintItem == (Object)null) { _peppermintItem = StartOfRound.Instance.allItemsList.itemsList.First((Item i) => ((Object)i).name == "Peppermint_Item"); } return _peppermintItem; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_CandyDispenserScript() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(3606619266u, new RpcReceiveHandler(__rpc_handler_3606619266)); NetworkManager.__rpc_func_table.Add(809217553u, new RpcReceiveHandler(__rpc_handler_809217553)); NetworkManager.__rpc_func_table.Add(1864758460u, new RpcReceiveHandler(__rpc_handler_1864758460)); NetworkManager.__rpc_func_table.Add(1880468153u, new RpcReceiveHandler(__rpc_handler_1880468153)); NetworkManager.__rpc_func_table.Add(3161520678u, new RpcReceiveHandler(__rpc_handler_3161520678)); NetworkManager.__rpc_func_table.Add(3067530259u, new RpcReceiveHandler(__rpc_handler_3067530259)); NetworkManager.__rpc_func_table.Add(2364265404u, new RpcReceiveHandler(__rpc_handler_2364265404)); } private static void __rpc_handler_3606619266(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; ((CandyDispenserScript)(object)target).SetColorServerRPC(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_809217553(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) { Color colorClientRPC = default(Color); ((FastBufferReader)(ref reader)).ReadValueSafe(ref colorClientRPC); target.__rpc_exec_stage = (__RpcExecStage)2; ((CandyDispenserScript)(object)target).SetColorClientRPC(colorClientRPC); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1864758460(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; ((CandyDispenserScript)(object)target).ReelUpSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1880468153(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((CandyDispenserScript)(object)target).ReelUpSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3161520678(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_0070: 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_009d: 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 { int sound = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sound); target.__rpc_exec_stage = (__RpcExecStage)1; ((CandyDispenserScript)(object)target).HitDispenserServerRpc(sound); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3067530259(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 sound = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sound); target.__rpc_exec_stage = (__RpcExecStage)2; ((CandyDispenserScript)(object)target).HitDispenserClientRpc(sound); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2364265404(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; ((CandyDispenserScript)(object)target).SpawnScrapServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CandyDispenserScript"; } } internal class CandyScript : GrabbableObject { public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { ((Component)base.playerHeldBy).gameObject.AddComponent<CandySpeedEffect>(); base.playerHeldBy.DespawnHeldObject(); } } [ServerRpc] public void DestroyRadarIconServerRpc() { //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_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(2453058261u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2453058261u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { DestroyRadarIconClientRpc(); } } [ClientRpc] public void DestroyRadarIconClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1150975139u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1150975139u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Object.Destroy((Object)(object)((Component)base.radarIcon).gameObject); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_CandyScript() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2453058261u, new RpcReceiveHandler(__rpc_handler_2453058261)); NetworkManager.__rpc_func_table.Add(1150975139u, new RpcReceiveHandler(__rpc_handler_1150975139)); } private static void __rpc_handler_2453058261(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; ((CandyScript)(object)target).DestroyRadarIconServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1150975139(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((CandyScript)(object)target).DestroyRadarIconClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CandyScript"; } } internal class CaneScript : GrabbableObject { private float movementbuff = 1f; public override void EquipItem() { ((GrabbableObject)this).EquipItem(); base.playerHeldBy.movementSpeed = base.playerHeldBy.movementSpeed + movementbuff; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); base.playerHeldBy.movementSpeed = base.playerHeldBy.movementSpeed - movementbuff; } public override void DiscardItem() { base.playerHeldBy.movementSpeed = base.playerHeldBy.movementSpeed - movementbuff; ((GrabbableObject)this).DiscardItem(); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected internal override string __getTypeName() { return "CaneScript"; } } internal class CrowbarScript : GrabbableObject { private RaycastHit[] objectsHitByCrowbar; private List<RaycastHit> objectsHitByCrowbarList = new List<RaycastHit>(); private bool isHoldingButton; private bool reelingUp; private Coroutine reelingUpCoroutine; private PlayerControllerB previousPlayerHeldBy; private DoorLock viewedDoorLock; private int hitsToOpen = new Random().Next(2, 3); public int crowbarMask = 1084754248; public int crowbarHitForce = 1; private AudioSource crowbarAudio; private AudioClip swing; private AudioClip[] hitSFX; public void Awake() { crowbarAudio = ((Component)((Component)this).transform.Find("CrowbarSounds")).gameObject.GetComponent<AudioSource>(); AudioSource[] components = ((Component)((Component)this).transform.Find("CrowbarSounds")).gameObject.GetComponents<AudioSource>(); swing = components[1].clip; hitSFX = (AudioClip[])(object)new AudioClip[1] { crowbarAudio.clip }; } public override void ItemActivate(bool used, bool buttonDown = true) { if ((Object)(object)base.playerHeldBy == (Object)null) { return; } isHoldingButton = buttonDown; if (!reelingUp && buttonDown) { reelingUp = true; previousPlayerHeldBy = base.playerHeldBy; if (reelingUpCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine); } reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpCrowbar()); } } private IEnumerator reelUpCrowbar() { base.playerHeldBy.activatingItem = true; base.playerHeldBy.twoHanded = true; base.playerHeldBy.playerBodyAnimator.ResetTrigger("crowbarHit"); base.playerHeldBy.playerBodyAnimator.SetBool("reelingUp", true); ReelUpSFXServerRpc(); yield return (object)new WaitForSeconds(0.35f); yield return (object)new WaitUntil((Func<bool>)(() => !isHoldingButton || !base.isHeld)); SwingCrowbar(!base.isHeld); yield return (object)new WaitForSeconds(0.13f); yield return (object)new WaitForEndOfFrame(); HitCrowbar(!base.isHeld); yield return (object)new WaitForSeconds(0.3f); reelingUp = false; reelingUpCoroutine = null; } [ServerRpc] public void ReelUpSFXServerRpc() { //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_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(3090105070u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3090105070u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ReelUpSFXClientRpc(); } } [ClientRpc] public void ReelUpSFXClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1927536923u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1927536923u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsOwner) { } } } public void SwingCrowbar(bool cancel = false) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) previousPlayerHeldBy.playerBodyAnimator.SetBool("reelingUp", false); if (!cancel) { crowbarAudio.PlayOneShot(swing); previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false); } } public void HitCrowbar(bool cancel = false) { //IL_004f: 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) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0458: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0328: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)previousPlayerHeldBy == (Object)null) { return; } previousPlayerHeldBy.activatingItem = false; bool flag = false; int num = -1; if (!cancel) { previousPlayerHeldBy.twoHanded = false; RaycastHit val = default(RaycastHit); if (Physics.Raycast(new Ray(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward), ref val, 3f, LayerMask.GetMask(new string[1] { "InteractableObject" }))) { viewedDoorLock = ((Component)((RaycastHit)(ref val)).transform).GetComponent<DoorLock>(); if ((Object)(object)viewedDoorLock != (Object)null && viewedDoorLock.isLocked && hitsToOpen > 0) { hitsToOpen--; } else if ((Object)(object)viewedDoorLock != (Object)null && viewedDoorLock.isLocked && hitsToOpen == 0) { UnlockDoorServerRpc(); OpenDoorServerRpc(); hitsToOpen = new Random().Next(2, 3); } if ((Object)(object)viewedDoorLock != (Object)null && !viewedDoorLock.isLocked) { OpenDoorServerRpc(); } } objectsHitByCrowbar = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, 0.8f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, 1.5f, crowbarMask, (QueryTriggerInteraction)2); objectsHitByCrowbarList = objectsHitByCrowbar.OrderBy(delegate(RaycastHit x) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) RaycastHit val5 = x; return ((RaycastHit)(ref val5)).distance; }).ToList(); IHittable val3 = default(IHittable); RaycastHit val4 = default(RaycastHit); for (int i = 0; i < objectsHitByCrowbarList.Count; i++) { RaycastHit val2 = objectsHitByCrowbarList[i]; if (((Component)((RaycastHit)(ref val2)).transform).gameObject.layer != 8) { val2 = objectsHitByCrowbarList[i]; if (((Component)((RaycastHit)(ref val2)).transform).gameObject.layer != 11) { val2 = objectsHitByCrowbarList[i]; if (!((Component)((RaycastHit)(ref val2)).transform).TryGetComponent<IHittable>(ref val3)) { continue; } val2 = objectsHitByCrowbarList[i]; if ((Object)(object)((RaycastHit)(ref val2)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform) { continue; } val2 = objectsHitByCrowbarList[i]; if (!(((RaycastHit)(ref val2)).point == Vector3.zero)) { Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; val2 = objectsHitByCrowbarList[i]; if (Physics.Linecast(position, ((RaycastHit)(ref val2)).point, ref val4, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } } flag = true; Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward; val3.Hit(crowbarHitForce, forward, previousPlayerHeldBy, true, 1); continue; } } val2 = objectsHitByCrowbarList[i]; if (((RaycastHit)(ref val2)).collider.isTrigger) { continue; } flag = true; val2 = objectsHitByCrowbarList[i]; string tag = ((Component)((RaycastHit)(ref val2)).collider).gameObject.tag; for (int j = 0; j < StartOfRound.Instance.footstepSurfaces.Length; j++) { if (StartOfRound.Instance.footstepSurfaces[j].surfaceTag == tag) { num = j; crowbarAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[j].hitSurfaceSFX); break; } } } } if (flag) { int sound = RoundManager.PlayRandomClip(crowbarAudio, hitSFX, true, 1f, 0, 1000); Object.FindObjectOfType<RoundManager>().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0); base.playerHeldBy.playerBodyAnimator.SetTrigger("crowbarHit"); HitCrowbarServerRpc(sound); } } [ServerRpc] public void HitCrowbarServerRpc(int sound) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //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_00b7: 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_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(2631909418u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, sound); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2631909418u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { HitCrowbarClientRpc(sound); } } [ClientRpc] public void HitCrowbarClientRpc(int sound) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(463415256u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, sound); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 463415256u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { HitSurfaceWithCrowbar(sound); } } } private void HitSurfaceWithCrowbar(int sound) { if (!((NetworkBehaviour)this).IsOwner) { crowbarAudio.PlayOneShot(hitSFX[sound]); } WalkieTalkie.TransmitOneShotAudio(crowbarAudio, hitSFX[sound], 1f); } [ServerRpc(RequireOwnership = false)] public void OpenDoorServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(121767703u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 121767703u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { OpenDoorClientRpc(); } } } [ClientRpc] public void OpenDoorClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4047106965u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4047106965u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { viewedDoorLock.OpenOrCloseDoor(base.playerHeldBy); viewedDoorLock.SetDoorAsOpen(true); } } } [ServerRpc(RequireOwnership = false)] public void UnlockDoorServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1016317823u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1016317823u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { UnlockDoorClientRpc(); } } } [ClientRpc] public void UnlockDoorClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3693078860u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3693078860u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { viewedDoorLock.UnlockDoor(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_CrowbarScript() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(3090105070u, new RpcReceiveHandler(__rpc_handler_3090105070)); NetworkManager.__rpc_func_table.Add(1927536923u, new RpcReceiveHandler(__rpc_handler_1927536923)); NetworkManager.__rpc_func_table.Add(2631909418u, new RpcReceiveHandler(__rpc_handler_2631909418)); NetworkManager.__rpc_func_table.Add(463415256u, new RpcReceiveHandler(__rpc_handler_463415256)); NetworkManager.__rpc_func_table.Add(121767703u, new RpcReceiveHandler(__rpc_handler_121767703)); NetworkManager.__rpc_func_table.Add(4047106965u, new RpcReceiveHandler(__rpc_handler_4047106965)); NetworkManager.__rpc_func_table.Add(1016317823u, new RpcReceiveHandler(__rpc_handler_1016317823)); NetworkManager.__rpc_func_table.Add(3693078860u, new RpcReceiveHandler(__rpc_handler_3693078860)); } private static void __rpc_hand