Decompiled source of CursedScraps v3.0.2
CursedScraps.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CursedScraps.Behaviours.Curses; using CursedScraps.Behaviours.Items; using CursedScraps.Managers; using CursedScraps.NetcodePatcher; using CursedScraps.Patches; using CursedScraps.Patches.ModsPatches; using CursedScraps.Registries; using GameNetcodeStuff; using HarmonyLib; using LegaFusionCore; using LegaFusionCore.Behaviours.Shaders; using LegaFusionCore.Managers.NetworkManagers; using LegaFusionCore.Registries; using LegaFusionCore.Utilities; using LethalLib.Modules; using Microsoft.CodeAnalysis; using Newtonsoft.Json.Linq; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CursedScraps")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("CursedScraps")] [assembly: AssemblyTitle("CursedScraps")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace CursedScraps { public class Constants { public const string GLOBAL = "_Global_"; public const string HUD = "_HUD_"; public const string HOLY_WATER = "Holy Water"; public const string INHIBITION = "Inhibition"; public const string CONFUSION = "Confusion"; public const string CAPTIVE = "Captive"; public const string BLURRY = "Blurry"; public const string MUTE = "Mute"; public const string DEAFNESS = "Deafness"; public const string ERRANT = "Errant"; public const string PARALYSIS = "Paralysis"; public const string SHADOW = "Shadow"; public const string DIMINUTIVE = "Diminutive"; public const string EXPLORATION = "Exploration"; public const string FRAGILE = "Fragile"; public const string ONE_FOR_ALL = "One For All"; public const string SACRIFICE = "Sacrifice"; public const string IMPOSSIBLE_ACTION = "Impossible action"; public const string IMPORTANT_INFORMATION = "Important information"; } [BepInPlugin("Lega.CursedScraps", "Cursed Scraps", "3.0.2")] public class CursedScraps : BaseUnityPlugin { internal const string modGUID = "Lega.CursedScraps"; internal const string modName = "Cursed Scraps"; internal const string modVersion = "3.0.2"; private readonly Harmony harmony = new Harmony("Lega.CursedScraps"); private static readonly AssetBundle bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "cursedscraps")); internal static ManualLogSource mls; public static ConfigFile configFile; public static GameObject managerPrefab = NetworkPrefabs.CreateNetworkPrefab("CursedScrapsNetworkManager"); public static Material cursedShader; public void Awake() { mls = Logger.CreateLogSource("CursedScraps"); configFile = ((BaseUnityPlugin)this).Config; ConfigManager.Load(); ConfigManager.RegisterCursesFromConfig(); LoadManager(); NetcodePatcher(); LoadItems(); LoadShaders(); harmony.PatchAll(typeof(IngamePlayerSettingsPatch)); harmony.PatchAll(typeof(StartOfRoundPatch)); harmony.PatchAll(typeof(RoundManagerPatch)); harmony.PatchAll(typeof(BeltBagInventoryUIPatch)); harmony.PatchAll(typeof(BeltBagItemPatch)); harmony.PatchAll(typeof(HUDManagerPatch)); harmony.PatchAll(typeof(PlayerControllerBPatch)); harmony.PatchAll(typeof(EnemyAIPatch)); PatchOtherMods(harmony); } public static void LoadManager() { Utilities.FixMixerGroups(managerPrefab); managerPrefab.AddComponent<CursedScrapsNetworkManager>(); } private static void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } public static void LoadItems() { if (ConfigManager.isHolyWater.Value) { LFCSpawnableItemRegistry.Add(typeof(HolyWater), bundle.LoadAsset<Item>("Assets/HolyWater/HolyWaterItem.asset"), ConfigManager.minHolyWater.Value, ConfigManager.maxHolyWater.Value, ConfigManager.holyWaterRarity.Value, 0); } } public static void LoadShaders() { cursedShader = bundle.LoadAsset<Material>("Assets/Shaders/CursedMaterial.mat"); } public static void PatchOtherMods(Harmony harmony) { BagConfigPatch(harmony); ToggleMutePatch(harmony); } public static void BagConfigPatch(Harmony harmony) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown Type type = Type.GetType("BagConfig.Patches.BeltBagPatch, BagConfig"); if (!(type == null)) { harmony.Patch((MethodBase)AccessTools.Method(type, "EmptyBagCoroutine", (Type[])null, (Type[])null), new HarmonyMethod(typeof(BagConfigPatch).GetMethod("EmptyBag")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } public static void ToggleMutePatch(Harmony harmony) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown Type type = Type.GetType("ToggleMute.ToggleMuteManager, ToggleMute"); if (!(type == null)) { harmony.Patch((MethodBase)AccessTools.Method(type, "OnToggleMuteKeyPressed", (Type[])null, (Type[])null), new HarmonyMethod(typeof(ToggleMutePatch).GetMethod("ToggleMute")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "CursedScraps"; public const string PLUGIN_NAME = "CursedScraps"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace CursedScraps.Registries { public class CSCurseRegistry : MonoBehaviour { public class CurseEffectType { public readonly string Name; public readonly float Multiplier; public readonly string Weight; public readonly int Duration; public CurseEffectType(string name, float multiplier, string weight, int duration) { Name = name; Multiplier = multiplier; Weight = weight; Duration = duration; } } public abstract class CurseEffect { public Action OnApply; public Action OnExpire; public Action OnUpdate; public CurseEffectType EffectType { get; } public int PlayerWhoHit { get; } public int Duration { get; } public float EndTime { get; private set; } public float RemainingTime => EndTime - Time.time; protected CurseEffect(CurseEffectType effectType, int playerWhoHit, int duration, Action onApply, Action onExpire, Action onUpdate) { EffectType = effectType; PlayerWhoHit = playerWhoHit; Duration = duration; EndTime = Time.time + (float)duration; OnApply = onApply; OnExpire = onExpire; OnUpdate = onUpdate; } public virtual void Apply(GameObject entity) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) OnApply?.Invoke(); PlayerControllerB safeComponent = LFCUtilities.GetSafeComponent<PlayerControllerB>(entity); if (LFCUtilities.ShouldNotBeLocalPlayer(safeComponent)) { if (HasCurse(entity, "Diminutive")) { CustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { entity.gameObject }, "Cursed Scraps" + ((Object)CursedScraps.cursedShader).name); } else { CustomPassManager.SetupAuraForObjects((GameObject[])(object)new GameObject[1] { entity.gameObject }, CursedScraps.cursedShader, "Cursed Scraps" + ((Object)CursedScraps.cursedShader).name, default(Color)); } } } public virtual void Update(GameObject entity) { OnUpdate?.Invoke(); } public virtual void Expire(GameObject entity) { OnExpire?.Invoke(); CustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { entity.gameObject }, "Cursed Scraps" + ((Object)CursedScraps.cursedShader).name); } public bool IsExpired() { return Time.time >= EndTime; } } public static List<CurseEffectType> curseEffectTypes = new List<CurseEffectType>(); private static readonly Dictionary<GameObject, Dictionary<CurseEffectType, CurseEffect>> activeCurses = new Dictionary<GameObject, Dictionary<CurseEffectType, CurseEffect>>(); private static CSCurseRegistry _instance; public static CSCurseRegistry Instance { get { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject("CurseEffect"); _instance = val.AddComponent<CSCurseRegistry>(); Object.DontDestroyOnLoad((Object)(object)val); } return _instance; } } public static void RegisterCurse(string name, float multiplier, string weight, int duration) { curseEffectTypes.Add(new CurseEffectType(name, multiplier, weight, duration)); } private void Update() { List<(GameObject, CurseEffectType)> list = new List<(GameObject, CurseEffectType)>(); List<GameObject> list2 = new List<GameObject>(); foreach (KeyValuePair<GameObject, Dictionary<CurseEffectType, CurseEffect>> activeCurse in activeCurses) { GameObject key = activeCurse.Key; if ((Object)(object)key == (Object)null) { list2.Add(key); continue; } Dictionary<CurseEffectType, CurseEffect> value = activeCurse.Value; foreach (KeyValuePair<CurseEffectType, CurseEffect> item in value) { CurseEffect value2 = item.Value; value2.Update(key); if (value2.Duration != -1 && value2.IsExpired()) { list.Add((key, item.Key)); } } } list2.ForEach(delegate(GameObject e) { activeCurses.Remove(e); }); list.ForEach(delegate((GameObject, CurseEffectType) e) { RemoveCurse(e.Item1, e.Item2); }); } public static void ApplyCurse(GameObject entity, string name, int playerWhoHit, int duration = -1, Action onApply = null, Action onExpire = null, Action onUpdate = null) { CurseEffect curseEffect = name switch { "Blurry" => new Blurry(playerWhoHit, duration, onApply, onExpire, onUpdate), "Captive" => new Captive(playerWhoHit, duration, onApply, onExpire, onUpdate), "Confusion" => new Confusion(playerWhoHit, duration, onApply, onExpire, onUpdate), "Deafness" => new Deafness(playerWhoHit, duration, onApply, onExpire, onUpdate), "Diminutive" => new Diminutive(playerWhoHit, duration, onApply, onExpire, onUpdate), "Errant" => new Errant(playerWhoHit, duration, onApply, onExpire, onUpdate), "Exploration" => new Exploration(playerWhoHit, duration, onApply, onExpire, onUpdate), "Fragile" => new Fragile(playerWhoHit, duration, onApply, onExpire, onUpdate), "Inhibition" => new Inhibition(playerWhoHit, duration, onApply, onExpire, onUpdate), "Mute" => new Mute(playerWhoHit, duration, onApply, onExpire, onUpdate), "One For All" => new OneForAll(playerWhoHit, duration, onApply, onExpire, onUpdate), "Paralysis" => new Paralysis(playerWhoHit, duration, onApply, onExpire, onUpdate), "Sacrifice" => new Sacrifice(playerWhoHit, duration, onApply, onExpire, onUpdate), "Shadow" => new Shadow(playerWhoHit, duration, onApply, onExpire, onUpdate), _ => null, }; if (curseEffect != null) { ApplyCurse(entity, curseEffect); } } public static void ApplyCurse(GameObject entity, CurseEffect curse) { _ = Instance; if (!activeCurses.ContainsKey(entity)) { activeCurses[entity] = new Dictionary<CurseEffectType, CurseEffect>(); } Dictionary<CurseEffectType, CurseEffect> dictionary = activeCurses[entity]; if (dictionary.TryGetValue(curse.EffectType, out var value)) { if (curse.RemainingTime > value.RemainingTime) { value.Expire(entity); dictionary[curse.EffectType] = curse; curse.Apply(entity); } } else { dictionary[curse.EffectType] = curse; curse.Apply(entity); } PlayerControllerB safeComponent = LFCUtilities.GetSafeComponent<PlayerControllerB>(entity); if (!((Object)(object)safeComponent == (Object)null)) { if (LFCUtilities.ShouldBeLocalPlayer(safeComponent) && ConfigManager.isCurseInfoOn.Value) { HUDManager.Instance.DisplayTip("Important information", "You have just been affected by the curse " + curse.EffectType.Name, false, false, "LC_Tip1"); } HUDManagerPatch.RefreshCursesText(safeComponent); } } public static void RemoveCurse(GameObject entity, string name) { CurseEffectType curseEffectType = curseEffectTypes.FirstOrDefault((CurseEffectType t) => t.Name.Equals(name)); if (curseEffectType != null) { RemoveCurse(entity, curseEffectType); } } public static void RemoveCurse(GameObject entity, CurseEffectType curseType) { if (activeCurses.TryGetValue(entity, out var value) && value.TryGetValue(curseType, out var value2)) { value2.Expire(entity); value.Remove(curseType); if (value.Count == 0) { activeCurses.Remove(entity); } HUDManagerPatch.RefreshCursesText(LFCUtilities.GetSafeComponent<PlayerControllerB>(entity)); } } public static List<CurseEffectType> GetCurses(GameObject entity) { if (activeCurses.TryGetValue(entity, out var value)) { Dictionary<CurseEffectType, CurseEffect>.KeyCollection keys = value.Keys; List<CurseEffectType> list = new List<CurseEffectType>(keys.Count); list.AddRange(keys); return list; } return new List<CurseEffectType>(); } public static bool HasCurse(GameObject entity) { return activeCurses.ContainsKey(entity); } public static bool HasCurse(GameObject entity, string name) { if (activeCurses.TryGetValue(entity, out var value)) { CurseEffectType curseEffectType = curseEffectTypes.FirstOrDefault((CurseEffectType t) => t.Name == name); if (curseEffectType != null) { return value.ContainsKey(curseEffectType); } } return false; } public static void ClearCurses(GameObject entity) { if (activeCurses.TryGetValue(entity, out var value)) { value.Keys.ToList().ForEach(delegate(CurseEffectType e) { RemoveCurse(entity, e); }); activeCurses.Remove(entity); } } public static void ClearCurses() { activeCurses.Keys.ToList().ForEach(ClearCurses); } } } namespace CursedScraps.Patches { public class BeltBagInventoryUIPatch { [HarmonyPatch(typeof(BeltBagInventoryUI), "RemoveItemFromUI")] [HarmonyPrefix] private static bool PreDropObject(ref BeltBagInventoryUI __instance, int slot) { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.currentBeltBag == (Object)null || slot == -1) { return true; } GrabbableObject val = __instance.currentBeltBag.objectsInBag[slot]; if (__instance.currentBeltBag.objectsInBag.Count > slot && (Object)(object)val != (Object)null && !__instance.currentBeltBag.tryingAddToBag && !ObjectCSManager.PreDropObject(((GrabbableObject)__instance.currentBeltBag).playerHeldBy, val)) { if (val.deactivated) { CursedScrapsNetworkManager.Instance.RemoveFromBagEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)val).GetComponent<NetworkObject>()), NetworkObjectReference.op_Implicit(((Component)__instance.currentBeltBag).GetComponent<NetworkObject>())); ((Behaviour)__instance.inventorySlotIcons[slot]).enabled = false; __instance.FillSlots(__instance.currentBeltBag); __instance.grabbingItemSlot = -1; } HUDManager.Instance.SetMouseCursorSprite(HUDManager.Instance.handOpenCursorTex, default(Vector2)); return false; } ObjectCSManager.PostDropObject(((GrabbableObject)__instance.currentBeltBag).playerHeldBy); return true; } } public class BeltBagItemPatch { [HarmonyPatch(typeof(BeltBagItem), "PutObjectInBagLocalClient")] [HarmonyPostfix] private static void PreGrabObject(ref BeltBagItem __instance, ref GrabbableObject gObject) { ObjectCSManager.PostGrabObject(((GrabbableObject)__instance).playerHeldBy, gObject); } } public class EnemyAIPatch { [HarmonyPatch(typeof(EnemyAI), "SetClientCalculatingAI")] [HarmonyPostfix] private static void CalculateIA(ref EnemyAI __instance) { Shadow.ApplyShadow(__instance); } } public class HUDManagerPatch { public static TextMeshProUGUI cursesText; [HarmonyPatch(typeof(HUDManager), "Start")] [HarmonyPostfix] private static void StartHUDManager() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) cursesText = CreateUIElement("CursesUI", new Vector2(1f, 0f), new Vector2(1f, 0f), new Vector2(1f, 0f), new Vector2(ConfigManager.deadCursesPosX.Value, ConfigManager.deadCursesPosY.Value), (TextAlignmentOptions)1028); } public static TextMeshProUGUI CreateUIElement(string name, Vector2 anchorMin, Vector2 anchorMax, Vector2 pivot, Vector2 anchoredPosition, TextAlignmentOptions alignment) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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) Transform transform = GameObject.Find("Systems/UI/Canvas/Panel/GameObject/PlayerScreen").transform; GameObject val = new GameObject(name); val.transform.localPosition = Vector3.zero; RectTransform val2 = val.AddComponent<RectTransform>(); ((Transform)val2).SetParent(transform, false); val2.anchorMin = anchorMin; val2.anchorMax = anchorMax; val2.pivot = pivot; val2.anchoredPosition = anchoredPosition; val2.sizeDelta = new Vector2(300f, 300f); TextMeshProUGUI val3 = val.AddComponent<TextMeshProUGUI>(); ((TMP_Text)val3).alignment = alignment; ((TMP_Text)val3).font = ((TMP_Text)HUDManager.Instance.controlTipLines[0]).font; ((TMP_Text)val3).fontSize = 14f; return val3; } [HarmonyPatch(typeof(HUDManager), "AssignNodeToUIElement")] [HarmonyPostfix] private static void ScanPerformed(ref HUDManager __instance, ref ScanNodeProperties node) { if (__instance.scanNodes.ContainsValue(node)) { Paralysis.ScanPerformed(GameNetworkManager.Instance.localPlayerController, node); } } [HarmonyPatch(typeof(HUDManager), "HoldInteractionFill")] [HarmonyPostfix] private static void EntranceInteraction(ref bool __result) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (__result && CSCurseRegistry.HasCurse(((Component)localPlayerController).gameObject)) { InteractTrigger hoveringOverTrigger = localPlayerController.hoveringOverTrigger; EntranceTeleport val = ((hoveringOverTrigger != null) ? ((Component)hoveringOverTrigger).gameObject.GetComponent<EntranceTeleport>() : null); if ((Object)(object)val != (Object)null && !Exploration.EntranceInteraction(localPlayerController, val)) { __result = false; } } } public static void RefreshCursesText(PlayerControllerB player) { if (!LFCUtilities.ShouldNotBeLocalPlayer(player) || !GameNetworkManager.Instance.localPlayerController.isPlayerDead || !CSCurseRegistry.HasCurse(((Component)player).gameObject)) { return; } string text = null; foreach (string item in from c in CSCurseRegistry.GetCurses(((Component)player).gameObject) select c.Name) { if (!string.IsNullOrEmpty(text)) { text += "\n"; } text += item; } ((TMP_Text)cursesText).text = ((!string.IsNullOrEmpty(text)) ? text : ""); } } public class IngamePlayerSettingsPatch { [HarmonyPatch(typeof(IngamePlayerSettings), "DiscardChangedSettings")] [HarmonyPrefix] private static bool PreventRemoveWhenDiscardSettings(ref IngamePlayerSettings __instance) { return DiscardSettings(__instance); } [HarmonyPatch(typeof(IngamePlayerSettings), "SaveChangedSettings")] [HarmonyPrefix] private static bool PreventRemoveWhenConfirmSettings(ref IngamePlayerSettings __instance) { return DiscardSettings(__instance); } public static bool DiscardSettings(IngamePlayerSettings ingamePlayerSettings) { PlayerControllerB val = GameNetworkManager.Instance?.localPlayerController; if ((Object)(object)val == (Object)null || !ConfigManager.globalPrevent.Value) { return true; } IEnumerable<string> source = from c in CSCurseRegistry.GetCurses(((Component)val).gameObject) select c.Name; if (source.Contains("Confusion") || source.Contains("Mute") || source.Contains("Deafness")) { ingamePlayerSettings.SetChangesNotAppliedTextVisible(false); ingamePlayerSettings.unsavedSettings.CopySettings(ingamePlayerSettings.settings); return false; } return true; } [HarmonyPatch(typeof(IngamePlayerSettings), "SetOption")] [HarmonyPrefix] private static bool PreventUpdateSettings(ref SettingsOptionType optionType) { PlayerControllerB val = GameNetworkManager.Instance?.localPlayerController; if ((Object)(object)val == (Object)null || !ConfigManager.globalPrevent.Value) { return true; } IEnumerable<string> source = from c in CSCurseRegistry.GetCurses(((Component)val).gameObject) select c.Name; if ((source.Contains("Mute") && ((int)optionType == 4 || (int)optionType == 5 || (int)optionType == 3)) || (source.Contains("Deafness") && ((int)optionType == 8 || (int)optionType == 5))) { HUDManager.Instance.DisplayTip("Impossible action", "A curse prevents you from performing this action.", false, false, "LC_Tip1"); return false; } return true; } } public class PlayerControllerBPatch { [HarmonyPatch(typeof(PlayerControllerB), "GrabObjectClientRpc")] [HarmonyPostfix] private static void PostGrabObject(ref PlayerControllerB __instance) { ObjectCSManager.PostGrabObject(__instance, __instance.currentlyHeldObjectServer); } [HarmonyPatch(typeof(PlayerControllerB), "DiscardHeldObject")] [HarmonyPrefix] private static bool PreDropObject(ref PlayerControllerB __instance) { return ObjectCSManager.PreDropObject(__instance, __instance.currentlyHeldObjectServer); } [HarmonyPatch(typeof(PlayerControllerB), "DiscardHeldObject")] [HarmonyPostfix] private static void PostDropObject(ref PlayerControllerB __instance) { ObjectCSManager.PostDropObject(__instance); } [HarmonyPatch(typeof(PlayerControllerB), "PlayerHitGroundEffects")] [HarmonyPostfix] private static void PlayerFall(ref PlayerControllerB __instance) { Fragile.PlayerFall(__instance); } [HarmonyPatch(typeof(PlayerControllerB), "UpdatePlayerPositionClientRpc")] [HarmonyPostfix] private static void UpdatePlayerPositionClientRpc(ref PlayerControllerB __instance) { Diminutive.PlayerCollision(__instance); } [HarmonyPatch(typeof(PlayerControllerB), "DamagePlayer")] [HarmonyPrefix] private static bool PreDamagePlayer(ref PlayerControllerB __instance, ref int damageNumber) { if (((NetworkBehaviour)__instance).IsOwner && !__instance.isPlayerDead && __instance.AllowPlayerDeath()) { return !Sacrifice.DamagePlayer(__instance, damageNumber); } return true; } [HarmonyPatch(typeof(PlayerControllerB), "DamagePlayer")] [HarmonyPostfix] private static void PostDamagePlayer(ref PlayerControllerB __instance) { if (LFCUtilities.IsServer && !__instance.isPlayerDead && __instance.AllowPlayerDeath()) { Fragile.DestroyHeldObjects(__instance); } } [HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")] [HarmonyPrefix] private static bool PreKillPlayer(ref PlayerControllerB __instance) { OneForAll.KillPlayer(__instance); bool result = !Sacrifice.KillPlayer(__instance); CursedScrapsNetworkManager.Instance.ClearPlayerCursesEveryoneRpc((int)__instance.playerClientId); return result; } [HarmonyPatch(typeof(PlayerControllerB), "SpectateNextPlayer")] [HarmonyPostfix] private static void SwitchSpectatedPlayer(ref PlayerControllerB __instance) { HUDManagerPatch.RefreshCursesText(__instance.spectatedPlayerScript); } } public class RoundManagerPatch { [HarmonyPatch(typeof(RoundManager), "waitForScrapToSpawnToSync")] [HarmonyPostfix] private static IEnumerator ApplyObjectCurse(IEnumerator result) { while (result.MoveNext()) { yield return result.Current; } foreach (GrabbableObject allA in LFCSpawnRegistry.GetAllAs<GrabbableObject>()) { if (string.IsNullOrEmpty(allA.itemProperties?.itemName) || (!string.IsNullOrEmpty(ConfigManager.scrapExclusions.Value) && ConfigManager.scrapExclusions.Value.Contains(allA.itemProperties.itemName)) || !allA.isInFactory || allA.isInShipRoom || allA.scrapValue <= 0) { continue; } string planetName = new string(StartOfRound.Instance.currentLevel.PlanetName.SkipWhile((char c) => !char.IsLetter(c)).ToArray()); if (new Random().Next(1, 100) > GetValueFromPair(ConfigManager.globalChance.Value, planetName)) { continue; } CSCurseRegistry.CurseEffectType randomCurse = GetRandomCurse(planetName); if (randomCurse != null) { NetworkObject component = ((Component)allA).GetComponent<NetworkObject>(); if (!((Object)(object)component == (Object)null) && component.IsSpawned) { CursedScrapsNetworkManager.Instance.ApplyObjectCurseEveryoneRpc(NetworkObjectReference.op_Implicit(component), randomCurse.Name); } } } } public static CSCurseRegistry.CurseEffectType GetRandomCurse(string planetName) { List<CSCurseRegistry.CurseEffectType> eligibleCurses = GetEligibleCurses(planetName); if (eligibleCurses.Count <= 0) { return null; } return eligibleCurses[new Random().Next(eligibleCurses.Count)]; } public static List<CSCurseRegistry.CurseEffectType> GetEligibleCurses(string planetName) { List<CSCurseRegistry.CurseEffectType> list = new List<CSCurseRegistry.CurseEffectType>(); foreach (CSCurseRegistry.CurseEffectType curseEffectType in CSCurseRegistry.curseEffectTypes) { for (int i = 0; i < GetValueFromPair(curseEffectType.Weight, planetName); i++) { list.Add(curseEffectType); } } return list; } public static int GetValueFromPair(string valueByMoons, string planetName) { string[] array = valueByMoons.Split(','); int result = 0; string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(':'); if (array3.Length == 2 && array3[0] == planetName) { return int.Parse(array3[1]); } if (array3.Length == 2 && array3[0] == "default") { result = int.Parse(array3[1]); } } return result; } } public class StartOfRoundPatch { [HarmonyPatch(typeof(StartOfRound), "Start")] [HarmonyBefore(new string[] { "evaisa.lethallib" })] [HarmonyPostfix] private static void StartRound(ref StartOfRound __instance) { if (NetworkManager.Singleton.IsHost && (Object)(object)CursedScrapsNetworkManager.Instance == (Object)null) { GameObject val = Object.Instantiate<GameObject>(CursedScraps.managerPrefab, ((Component)__instance).transform.parent); val.GetComponent<NetworkObject>().Spawn(false); CursedScraps.mls.LogInfo((object)"Spawning CursedScrapsNetworkManager"); } } [HarmonyPatch(typeof(StartOfRound), "OnDisable")] [HarmonyPostfix] public static void OnDisable() { CursedScrapsNetworkManager.Instance = null; } } } namespace CursedScraps.Patches.ModsPatches { [HarmonyPatch] internal class BagConfigPatch { public static bool EmptyBag(BeltBagItem @this, ref IEnumerator __result) { if ((Object)(object)((GrabbableObject)@this).playerHeldBy == (Object)null) { return true; } if (CSCurseRegistry.HasCurse(((Component)((GrabbableObject)@this).playerHeldBy).gameObject, "Captive")) { __result = EmptyCoroutine(); HUDManager.Instance.DisplayTip("Impossible action", "A curse prevents you to do this action.", false, false, "LC_Tip1"); return false; } __result = EmptyBagCoroutine(@this); return false; } public static IEnumerator EmptyCoroutine() { yield break; } public static IEnumerator EmptyBagCoroutine(BeltBagItem beltBagItem) { while (beltBagItem.objectsInBag.Any()) { for (int num = beltBagItem.objectsInBag.Count - 1; num >= 0; num--) { GrabbableObject grabbableObject = beltBagItem.objectsInBag[num]; if (!((Object)(object)((GrabbableObject)beltBagItem).playerHeldBy == (Object)null) && ObjectCSManager.PreDropObject(((GrabbableObject)beltBagItem).playerHeldBy, grabbableObject)) { beltBagItem.RemoveObjectFromBag(num); ObjectCSManager.PostDropObject(((GrabbableObject)beltBagItem).playerHeldBy); break; } } yield return (object)new WaitForEndOfFrame(); } } } [HarmonyPatch] internal class ToggleMutePatch { public static bool ToggleMute() { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || !CSCurseRegistry.HasCurse(((Component)localPlayerController).gameObject, "Mute")) { return true; } HUDManager.Instance.DisplayTip("Impossible action", "A curse prevents you from performing this action.", false, false, "LC_Tip1"); return false; } } } namespace CursedScraps.Managers { public class ConfigManager { public static ConfigEntry<string> globalChance; public static ConfigEntry<bool> globalPrevent; public static ConfigEntry<string> scrapExclusions; public static ConfigEntry<bool> isCurseInfoOn; public static ConfigEntry<float> deadCursesPosX; public static ConfigEntry<float> deadCursesPosY; public static ConfigEntry<bool> isHolyWater; public static ConfigEntry<int> holyWaterRarity; public static ConfigEntry<int> minHolyWater; public static ConfigEntry<int> maxHolyWater; public static ConfigEntry<bool> isInhibition; public static ConfigEntry<float> inhibitionMultiplier; public static ConfigEntry<string> inhibitionWeight; public static ConfigEntry<int> inhibitionDuration; public static ConfigEntry<bool> isInhibitionTip; public static ConfigEntry<float> inhibitionCooldown; public static ConfigEntry<string> inhibitionActions; public static ConfigEntry<bool> isConfusion; public static ConfigEntry<float> confusionMultiplier; public static ConfigEntry<string> confusionWeight; public static ConfigEntry<int> confusionDuration; public static ConfigEntry<bool> isCaptive; public static ConfigEntry<float> captiveMultiplier; public static ConfigEntry<string> captiveWeight; public static ConfigEntry<int> captiveDuration; public static ConfigEntry<bool> isBlurry; public static ConfigEntry<float> blurryMultiplier; public static ConfigEntry<string> blurryWeight; public static ConfigEntry<int> blurryDuration; public static ConfigEntry<float> blurryIntensity; public static ConfigEntry<bool> isMute; public static ConfigEntry<float> muteMultiplier; public static ConfigEntry<string> muteWeight; public static ConfigEntry<int> muteDuration; public static ConfigEntry<bool> isDeafness; public static ConfigEntry<float> deafnessMultiplier; public static ConfigEntry<string> deafnessWeight; public static ConfigEntry<int> deafnessDuration; public static ConfigEntry<bool> isErrant; public static ConfigEntry<float> errantMultiplier; public static ConfigEntry<string> errantWeight; public static ConfigEntry<int> errantDuration; public static ConfigEntry<string> errantExclusions; public static ConfigEntry<bool> isParalysis; public static ConfigEntry<float> paralysisMultiplier; public static ConfigEntry<string> paralysisWeight; public static ConfigEntry<int> paralysisDuration; public static ConfigEntry<float> paralysisTime; public static ConfigEntry<bool> isShadow; public static ConfigEntry<float> shadowMultiplier; public static ConfigEntry<string> shadowWeight; public static ConfigEntry<int> shadowDuration; public static ConfigEntry<string> shadowExclusions; public static ConfigEntry<bool> isDiminutive; public static ConfigEntry<float> diminutiveMultiplier; public static ConfigEntry<string> diminutiveWeight; public static ConfigEntry<int> diminutiveDuration; public static ConfigEntry<float> diminutiveSpeed; public static ConfigEntry<bool> isExploration; public static ConfigEntry<float> explorationMultiplier; public static ConfigEntry<string> explorationWeight; public static ConfigEntry<int> explorationDuration; public static ConfigEntry<float> explorationDistance; public static ConfigEntry<bool> isFragile; public static ConfigEntry<float> fragileMultiplier; public static ConfigEntry<string> fragileWeight; public static ConfigEntry<int> fragileDuration; public static ConfigEntry<string> fragileExclusions; public static ConfigEntry<bool> isOneForAll; public static ConfigEntry<float> oneForAllMultiplier; public static ConfigEntry<string> oneForAllWeight; public static ConfigEntry<int> oneForAllDuration; public static ConfigEntry<bool> isOneForAllInfoOn; public static ConfigEntry<bool> isSacrifice; public static ConfigEntry<float> sacrificeMultiplier; public static ConfigEntry<string> sacrificeWeight; public static ConfigEntry<int> sacrificeDuration; public static ConfigEntry<bool> isSacrificeInfoOn; public static void Load() { globalChance = CursedScraps.configFile.Bind<string>("_Global_", "Chance", "default:15", "Overall chance of scrap appearing.\nThis value does not replace the chance of appearance for each curse; the latter are considered after the overall chance to determine which curse is chosen.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); globalPrevent = CursedScraps.configFile.Bind<bool>("_Global_", "Preventing settings changes", true, "Set to false to allow players to change their settings when a curse modifying controls is active.\nThis configuration is mainly there in case of unforeseen bugs or potential incompatibility."); scrapExclusions = CursedScraps.configFile.Bind<string>("_Global_", "Exclusion list", "Key", "List of scraps that will not be cursed.\nYou can add scraps by separating them with a comma."); isCurseInfoOn = CursedScraps.configFile.Bind<bool>("_HUD_", "Curse info", true, "Does the information popup appear when a player is cursed?"); deadCursesPosX = CursedScraps.configFile.Bind<float>("_HUD_", "Dead curses pos X", -30f, "X position of player curses text on the interface as a spectator."); deadCursesPosY = CursedScraps.configFile.Bind<float>("_HUD_", "Dead curses pos Y", 50f, "Y position of player curses text on the interface as a spectator."); isHolyWater = CursedScraps.configFile.Bind<bool>("Holy Water", "Enable", true, "Is Holy Water item enabled?\nConsumable that removes all active curses on the player."); holyWaterRarity = CursedScraps.configFile.Bind<int>("Holy Water", "Rarity", 20, "Holy Water spawn rarity."); minHolyWater = CursedScraps.configFile.Bind<int>("Holy Water", "Min spawn", 1, "Min Holy Water to spawn"); maxHolyWater = CursedScraps.configFile.Bind<int>("Holy Water", "Max spawn", 4, "Max Holy Water to spawn"); isInhibition = CursedScraps.configFile.Bind<bool>("Inhibition", "Enable", true, "Is Inhibition curse enabled?\nPrevents the player from jumping and crouching."); inhibitionMultiplier = CursedScraps.configFile.Bind<float>("Inhibition", "Multiplier", 1.75f, "Value multiplier for scraps with the Inhibition curse."); inhibitionWeight = CursedScraps.configFile.Bind<string>("Inhibition", "Weight", "default:1", "Spawn weight of a scrap with the Inhibition curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); inhibitionDuration = CursedScraps.configFile.Bind<int>("Inhibition", "Duration", 90, "Duration of the Inhibition curse in seconds."); isInhibitionTip = CursedScraps.configFile.Bind<bool>("Inhibition", "Message", false, "Display a message when the blocked action is modified."); inhibitionCooldown = CursedScraps.configFile.Bind<float>("Inhibition", "Cooldown", 10f, "Cooldown duration before a new action can be triggered."); inhibitionActions = CursedScraps.configFile.Bind<string>("Inhibition", "Actions", "Jump,Crouch,Interact,Sprint,PingScan", "Actions that can be blocked by the curse Inhibition."); isConfusion = CursedScraps.configFile.Bind<bool>("Confusion", "Enable", true, "Is Confusion curse enabled?\nReverses movement controls and jump/crouch keys for the player."); confusionMultiplier = CursedScraps.configFile.Bind<float>("Confusion", "Multiplier", 2f, "Value multiplier for scraps with the Confusion curse."); confusionWeight = CursedScraps.configFile.Bind<string>("Confusion", "Weight", "default:1", "Spawn weight of a scrap with the Confusion curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); confusionDuration = CursedScraps.configFile.Bind<int>("Confusion", "Duration", 90, "Duration of the Confusion curse in seconds."); isCaptive = CursedScraps.configFile.Bind<bool>("Captive", "Enable", true, "Is Captive curse enabled?\nPrevents the item from being thrown until it has been brought back to the ship."); captiveMultiplier = CursedScraps.configFile.Bind<float>("Captive", "Multiplier", 1.5f, "Value multiplier for scraps with the Captive curse."); captiveWeight = CursedScraps.configFile.Bind<string>("Captive", "Weight", "default:1", "Spawn weight of a scrap with the Captive curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); captiveDuration = CursedScraps.configFile.Bind<int>("Captive", "Duration", 90, "Duration of the Captive curse in seconds."); isBlurry = CursedScraps.configFile.Bind<bool>("Blurry", "Enable", true, "Is Blurry curse enabled?\nReduces visual clarity on the player's camera."); blurryMultiplier = CursedScraps.configFile.Bind<float>("Blurry", "Multiplier", 2f, "Value multiplier for scraps with the Blurry curse."); blurryWeight = CursedScraps.configFile.Bind<string>("Blurry", "Weight", "default:1", "Spawn weight of a scrap with the Blurry curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); blurryDuration = CursedScraps.configFile.Bind<int>("Blurry", "Duration", 60, "Duration of the Blurry curse in seconds."); blurryIntensity = CursedScraps.configFile.Bind<float>("Blurry", "Intensity", 1f, "Intensity of the Blurry curse."); isMute = CursedScraps.configFile.Bind<bool>("Mute", "Enable", true, "Is Mute curse enabled?\nMutes the player's microphone."); muteMultiplier = CursedScraps.configFile.Bind<float>("Mute", "Multiplier", 1.25f, "Value multiplier for scraps with the Mute curse."); muteWeight = CursedScraps.configFile.Bind<string>("Mute", "Weight", "default:1", "Spawn weight of a scrap with the Mute curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); muteDuration = CursedScraps.configFile.Bind<int>("Mute", "Duration", 90, "Duration of the Mute curse in seconds."); isDeafness = CursedScraps.configFile.Bind<bool>("Deafness", "Enable", true, "Is Deafness curse enabled?\nRemoves the player's sound."); deafnessMultiplier = CursedScraps.configFile.Bind<float>("Deafness", "Multiplier", 2f, "Value multiplier for scraps with the Deafness curse."); deafnessWeight = CursedScraps.configFile.Bind<string>("Deafness", "Weight", "default:1", "Spawn weight of a scrap with the Deafness curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); deafnessDuration = CursedScraps.configFile.Bind<int>("Deafness", "Duration", 90, "Duration of the Deafness curse in seconds."); isErrant = CursedScraps.configFile.Bind<bool>("Errant", "Enable", true, "Is Errant curse enabled?\nTeleports the player randomly when an item is picked up or placed down."); errantMultiplier = CursedScraps.configFile.Bind<float>("Errant", "Multiplier", 2f, "Value multiplier for scraps with the Errant curse."); errantWeight = CursedScraps.configFile.Bind<string>("Errant", "Weight", "default:1", "Spawn weight of a scrap with the Errant curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); errantDuration = CursedScraps.configFile.Bind<int>("Errant", "Duration", 60, "Duration of the Errant curse in seconds."); errantExclusions = CursedScraps.configFile.Bind<string>("Errant", "Exclusion list", "Saw Tape,Pursuer Eye,Saw Key,Saw", "List of items not affected by the Errant curse.\nYou can add items by separating them with a comma."); isParalysis = CursedScraps.configFile.Bind<bool>("Paralysis", "Enable", true, "Is Paralysis curse enabled?\nParalyzes the player when scanning an enemy."); paralysisMultiplier = CursedScraps.configFile.Bind<float>("Paralysis", "Multiplier", 1.75f, "Value multiplier for scraps with the Paralysis curse."); paralysisWeight = CursedScraps.configFile.Bind<string>("Paralysis", "Weight", "default:1", "Spawn weight of a scrap with the Paralysis curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); paralysisDuration = CursedScraps.configFile.Bind<int>("Paralysis", "Duration", 90, "Duration of the Paralysis curse in seconds."); paralysisTime = CursedScraps.configFile.Bind<float>("Paralysis", "Time", 5f, "Player paralysis time in seconds."); isShadow = CursedScraps.configFile.Bind<bool>("Shadow", "Enable", true, "Is Shadow curse enabled?\nAll enemies are invisible by default (their sound is still active), scanning reveals them."); shadowMultiplier = CursedScraps.configFile.Bind<float>("Shadow", "Multiplier", 2f, "Value multiplier for scraps with the Shadow curse."); shadowWeight = CursedScraps.configFile.Bind<string>("Shadow", "Weight", "default:1", "Spawn weight of a scrap with the Shadow curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); shadowDuration = CursedScraps.configFile.Bind<int>("Shadow", "Duration", 90, "Duration of the Shadow curse in seconds."); shadowExclusions = CursedScraps.configFile.Bind<string>("Shadow", "Exclusion list", "Masked", "List of creatures that will not be affected by the Shadow curse.\nYou can add enemies by separating them with a comma."); isDiminutive = CursedScraps.configFile.Bind<bool>("Diminutive", "Enable", true, "Is Diminutive curse enabled?\nReduces the player's size."); diminutiveMultiplier = CursedScraps.configFile.Bind<float>("Diminutive", "Multiplier", 2f, "Value multiplier for scraps with the Diminutive curse."); diminutiveWeight = CursedScraps.configFile.Bind<string>("Diminutive", "Weight", "default:1", "Spawn weight of a scrap with the Diminutive curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); diminutiveDuration = CursedScraps.configFile.Bind<int>("Diminutive", "Duration", 90, "Duration of the Diminutive curse in seconds."); diminutiveSpeed = CursedScraps.configFile.Bind<float>("Diminutive", "Speed factor", -0.5f, "Speed factor for player movement."); isExploration = CursedScraps.configFile.Bind<bool>("Exploration", "Enable", true, "Is Exploration curse enabled?\nPrevents the player from exiting or entering the factory through all doors except one."); explorationMultiplier = CursedScraps.configFile.Bind<float>("Exploration", "Multiplier", 1.5f, "Value multiplier for scraps with the Exploration curse."); explorationWeight = CursedScraps.configFile.Bind<string>("Exploration", "Weight", "default:1", "Spawn weight of a scrap with the Exploration curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); explorationDuration = CursedScraps.configFile.Bind<int>("Exploration", "Duration", 120, "Duration of the Exploration curse in seconds."); explorationDistance = CursedScraps.configFile.Bind<float>("Exploration", "Distance", 30f, "Distance between the player and the door at which the door's aura disappears."); isFragile = CursedScraps.configFile.Bind<bool>("Fragile", "Enable", true, "Is Fragile curse enabled?."); fragileMultiplier = CursedScraps.configFile.Bind<float>("Fragile", "Multiplier", 2f, "Value multiplier for scraps with the Fragile curse."); fragileWeight = CursedScraps.configFile.Bind<string>("Fragile", "Weight", "default:1", "Spawn weight of a scrap with the Fragile curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); fragileDuration = CursedScraps.configFile.Bind<int>("Fragile", "Duration", 90, "Duration of the Fragile curse in seconds."); fragileExclusions = CursedScraps.configFile.Bind<string>("Fragile", "Exclusion list", "Saw Tape,Pursuer Eye,Saw Key,Saw", "List of items not affected by the Fragile curse.\nYou can add items by separating them with a comma."); isOneForAll = CursedScraps.configFile.Bind<bool>("One For All", "Enable", true, "Is One For All curse enabled?."); oneForAllMultiplier = CursedScraps.configFile.Bind<float>("One For All", "Multiplier", 2f, "Value multiplier for scraps with the One For All curse."); oneForAllWeight = CursedScraps.configFile.Bind<string>("One For All", "Weight", "default:1", "Spawn weight of a scrap with the One For All curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); oneForAllDuration = CursedScraps.configFile.Bind<int>("One For All", "Duration", 30, "Duration of the One For All curse in seconds."); isOneForAllInfoOn = CursedScraps.configFile.Bind<bool>("One For All", "One For All info", true, "Does the information popup appear to other players when someone is afflicted by the One For All curse?"); isSacrifice = CursedScraps.configFile.Bind<bool>("Sacrifice", "Enable", true, "Is Sacrifice curse enabled?."); sacrificeMultiplier = CursedScraps.configFile.Bind<float>("Sacrifice", "Multiplier", 2f, "Value multiplier for scraps with the Sacrifice curse."); sacrificeWeight = CursedScraps.configFile.Bind<string>("Sacrifice", "Weight", "default:1", "Spawn weight of a scrap with the Sacrifice curse.\nYou can adjust this value according to the moon by adding its name along with its value (moon:value). Each key/value pair should be separated by a comma."); sacrificeDuration = CursedScraps.configFile.Bind<int>("Sacrifice", "Duration", 60, "Duration of the Sacrifice curse in seconds."); isSacrificeInfoOn = CursedScraps.configFile.Bind<bool>("Sacrifice", "Sacrifice info", true, "Does the information popup appear to other players when someone is afflicted by the Sacrifice curse?"); } public static void RegisterCursesFromConfig() { if (isInhibition.Value) { CSCurseRegistry.RegisterCurse("Inhibition", inhibitionMultiplier.Value, inhibitionWeight.Value, inhibitionDuration.Value); } if (isConfusion.Value) { CSCurseRegistry.RegisterCurse("Confusion", confusionMultiplier.Value, confusionWeight.Value, confusionDuration.Value); } if (isCaptive.Value) { CSCurseRegistry.RegisterCurse("Captive", captiveMultiplier.Value, captiveWeight.Value, captiveDuration.Value); } if (isBlurry.Value) { CSCurseRegistry.RegisterCurse("Blurry", blurryMultiplier.Value, blurryWeight.Value, blurryDuration.Value); } if (isMute.Value) { CSCurseRegistry.RegisterCurse("Mute", muteMultiplier.Value, muteWeight.Value, muteDuration.Value); } if (isDeafness.Value) { CSCurseRegistry.RegisterCurse("Deafness", deafnessMultiplier.Value, deafnessWeight.Value, deafnessDuration.Value); } if (isErrant.Value) { CSCurseRegistry.RegisterCurse("Errant", errantMultiplier.Value, errantWeight.Value, errantDuration.Value); } if (isParalysis.Value) { CSCurseRegistry.RegisterCurse("Paralysis", paralysisMultiplier.Value, paralysisWeight.Value, paralysisDuration.Value); } if (isShadow.Value) { CSCurseRegistry.RegisterCurse("Shadow", shadowMultiplier.Value, shadowWeight.Value, shadowDuration.Value); } if (isDiminutive.Value) { CSCurseRegistry.RegisterCurse("Diminutive", diminutiveMultiplier.Value, diminutiveWeight.Value, diminutiveDuration.Value); } if (isExploration.Value) { CSCurseRegistry.RegisterCurse("Exploration", explorationMultiplier.Value, explorationWeight.Value, explorationDuration.Value); } if (isFragile.Value) { CSCurseRegistry.RegisterCurse("Fragile", fragileMultiplier.Value, fragileWeight.Value, fragileDuration.Value); } if (isOneForAll.Value) { CSCurseRegistry.RegisterCurse("One For All", oneForAllMultiplier.Value, oneForAllWeight.Value, oneForAllDuration.Value); } if (isSacrifice.Value) { CSCurseRegistry.RegisterCurse("Sacrifice", sacrificeMultiplier.Value, sacrificeWeight.Value, sacrificeDuration.Value); } } } public class CursedScrapsNetworkManager : NetworkBehaviour { public static CursedScrapsNetworkManager Instance; public void Awake() { Instance = this; } [Rpc(/*Could not decode attribute arguments.*/)] public void ScaleObjectEveryoneRpc(NetworkObjectReference obj, int playerId, bool scale) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1371634948u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref scale, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1371634948u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); Diminutive.ScaleObject(component, ((Component)val4).gameObject.GetComponentInChildren<GrabbableObject>(), scale); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ApplyObjectCurseEveryoneRpc(NetworkObjectReference obj, string curseName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3788314828u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); bool flag = curseName != null; ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(curseName, false); } ((NetworkBehaviour)this).__endSendRpc(ref val3, 3788314828u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { GrabbableObject componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<GrabbableObject>(); CSCurseRegistry.ApplyCurse(((Component)componentInChildren).gameObject, curseName, -1); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void RemoveObjectCurseEveryoneRpc(NetworkObjectReference obj, string curseName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2908991215u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); bool flag = curseName != null; ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(curseName, false); } ((NetworkBehaviour)this).__endSendRpc(ref val3, 2908991215u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null)) { GrabbableObject componentInChildren = ((Component)val4).gameObject.GetComponentInChildren<GrabbableObject>(); CSCurseRegistry.RemoveCurse(((Component)componentInChildren).gameObject, curseName); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ApplyPlayerCurseEveryoneRpc(int playerId, string curseName, int duration) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1481710240u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); bool flag = curseName != null; ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(curseName, false); } BytePacker.WriteValueBitPacked(val3, duration); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1481710240u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); CSCurseRegistry.ApplyCurse(((Component)component).gameObject, curseName, -1, duration); } } [Rpc(/*Could not decode attribute arguments.*/)] public void RemovePlayerCurseEveryoneRpc(int playerId, string curseName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2133840038u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); bool flag = curseName != null; ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(curseName, false); } ((NetworkBehaviour)this).__endSendRpc(ref val3, 2133840038u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); CSCurseRegistry.RemoveCurse(((Component)component).gameObject, curseName); } } [Rpc(/*Could not decode attribute arguments.*/)] public void ClearPlayerCursesEveryoneRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3728281275u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3728281275u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; CSCurseRegistry.ClearCurses(((Component)StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>()).gameObject); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PushPlayerEveryoneRpc(int playerId, Vector3 pushVector) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2791346655u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref pushVector); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2791346655u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>(); if (LFCUtilities.ShouldBeLocalPlayer(component)) { component.thisController.Move(pushVector); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void RemoveFromBagEveryoneRpc(NetworkObjectReference obj, NetworkObjectReference bagObj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: 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_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00a3: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2080080201u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkObjectReference>(ref bagObj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2080080201u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); NetworkObject val5 = default(NetworkObject); if (((NetworkObjectReference)(ref obj)).TryGet(ref val4, (NetworkManager)null) && ((NetworkObjectReference)(ref bagObj)).TryGet(ref val5, (NetworkManager)null)) { ((Component)val5).gameObject.GetComponentInChildren<BeltBagItem>()?.objectsInBag.Remove(((Component)val4).gameObject.GetComponentInChildren<GrabbableObject>()); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1371634948u, new RpcReceiveHandler(__rpc_handler_1371634948), "ScaleObjectEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(3788314828u, new RpcReceiveHandler(__rpc_handler_3788314828), "ApplyObjectCurseEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2908991215u, new RpcReceiveHandler(__rpc_handler_2908991215), "RemoveObjectCurseEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1481710240u, new RpcReceiveHandler(__rpc_handler_1481710240), "ApplyPlayerCurseEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2133840038u, new RpcReceiveHandler(__rpc_handler_2133840038), "RemovePlayerCurseEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(3728281275u, new RpcReceiveHandler(__rpc_handler_3728281275), "ClearPlayerCursesEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2791346655u, new RpcReceiveHandler(__rpc_handler_2791346655), "PushPlayerEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2080080201u, new RpcReceiveHandler(__rpc_handler_2080080201), "RemoveFromBagEveryoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1371634948(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool scale = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref scale, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).ScaleObjectEveryoneRpc(obj, playerId, scale); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3788314828(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string curseName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref curseName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).ApplyObjectCurseEveryoneRpc(obj, curseName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2908991215(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string curseName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref curseName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).RemoveObjectCurseEveryoneRpc(obj, curseName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1481710240(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string curseName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref curseName, false); } int duration = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref duration); target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).ApplyPlayerCurseEveryoneRpc(playerId, curseName, duration); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2133840038(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string curseName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref curseName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).RemovePlayerCurseEveryoneRpc(playerId, curseName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3728281275(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).ClearPlayerCursesEveryoneRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2791346655(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 pushVector = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pushVector); target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).PushPlayerEveryoneRpc(playerId, pushVector); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2080080201(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); NetworkObjectReference bagObj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref bagObj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CursedScrapsNetworkManager)(object)target).RemoveFromBagEveryoneRpc(obj, bagObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CursedScrapsNetworkManager"; } } public class ObjectCSManager { public static void PostGrabObject(PlayerControllerB player, GrabbableObject grabbableObject) { //IL_0025: 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_009e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)grabbableObject == (Object)null) { return; } Errant.PostGrabTeleport(player, grabbableObject); CursedScrapsNetworkManager.Instance.ScaleObjectEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)grabbableObject).GetComponent<NetworkObject>()), (int)player.playerClientId, scale: false); foreach (CSCurseRegistry.CurseEffectType curse in CSCurseRegistry.GetCurses(((Component)grabbableObject).gameObject)) { CursedScrapsNetworkManager.Instance.ApplyPlayerCurseEveryoneRpc((int)player.playerClientId, curse.Name, curse.Duration); LFCNetworkManager.Instance.SetScrapValueEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)grabbableObject).GetComponent<NetworkObject>()), (int)((float)grabbableObject.scrapValue * curse.Multiplier)); CursedScrapsNetworkManager.Instance.RemoveObjectCurseEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)grabbableObject).GetComponent<NetworkObject>()), curse.Name); } } public static bool PreDropObject(PlayerControllerB __instance, GrabbableObject grabbableObject) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (CSCurseRegistry.HasCurse(((Component)__instance).gameObject, "Captive")) { HUDManager.Instance.DisplayTip("Impossible action", "A curse prevents you to do this action.", false, false, "LC_Tip1"); return false; } if (!Fragile.PreDropObject(__instance, grabbableObject)) { return false; } Errant.PreDropTeleport(__instance, grabbableObject); CursedScrapsNetworkManager.Instance.ScaleObjectEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)grabbableObject).GetComponent<NetworkObject>()), (int)__instance.playerClientId, scale: true); return true; } public static void PostDropObject(PlayerControllerB __instance) { Errant.PostDropTeleport(__instance); } } } namespace CursedScraps.Behaviours.Items { public class HolyWater : PhysicsProp { public override void ItemActivate(bool used, bool buttonDown = true) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null)) { if (CSCurseRegistry.HasCurse(((Component)((GrabbableObject)this).playerHeldBy).gameObject)) { CursedScrapsNetworkManager.Instance.ClearPlayerCursesEveryoneRpc((int)((GrabbableObject)this).playerHeldBy.playerClientId); LFCNetworkManager.Instance.DestroyObjectEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)this).GetComponent<NetworkObject>())); } else { HUDManager.Instance.DisplayTip("Impossible action", "You have no active curse.", false, false, "LC_Tip1"); } } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "HolyWater"; } } } namespace CursedScraps.Behaviours.Curses { public class Blurry : CSCurseRegistry.CurseEffect { private static readonly CSCurseRegistry.CurseEffectType Type = CSCurseRegistry.curseEffectTypes.Find((CSCurseRegistry.CurseEffectType t) => t.Name.Equals("Blurry")); public Blurry(int playerWhoHit, int duration, Action onApply, Action onExpire, Action onUpdate) : base(Type, playerWhoHit, duration, onApply, onExpire, onUpdate) { } public override void Update(GameObject entity) { base.Update(entity); PlayerControllerB safeComponent = LFCUtilities.GetSafeComponent<PlayerControllerB>(entity); if (LFCUtilities.ShouldBeLocalPlayer(safeComponent)) { HUDManager.Instance.drunknessFilter.weight = ConfigManager.blurryIntensity.Value; } } } public class Captive : CSCurseRegistry.CurseEffect { private static readonly CSCurseRegistry.CurseEffectType Type = CSCurseRegistry.curseEffectTypes.Find((CSCurseRegistry.CurseEffectType t) => t.Name.Equals("Captive")); public Captive(int playerWhoHit, int duration, Action onApply, Action onExpire, Action onUpdate) : base(Type, playerWhoHit, duration, onApply, onExpire, onUpdate) { } } public class Confusion : CSCurseRegistry.CurseEffect { private static readonly CSCurseRegistry.CurseEffectType Type = CSCurseRegistry.curseEffectTypes.Find((CSCurseRegistry.CurseEffectType t) => t.Name.Equals("Confusion")); public Confusion(int playerWhoHit, int duration, Action onApply, Action onExpire, Action onUpdate) : base(Type, playerWhoHit, duration, onApply, onExpire, onUpdate) { } public override void Apply(GameObject entity) { //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: 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_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: 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_0090: Expected O, but got Unknown //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0680: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing refe