Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of REPORolesPLUS v1.0.1
R.E.P.O.RolesPlus.dll
Decompiled a year agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Bobi; using HarmonyLib; using Microsoft.CodeAnalysis; using R.E.P.O.RolesPlus; using R.E.P.O.RolesPlus.patches; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("R.E.P.O. RolesPlus")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Piskotryasi")] [assembly: AssemblyProduct("R.E.P.O. RolesPlus")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("1400cf89-b246-4aa9-983d-84d939d983bb")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] 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 R.E.P.O.RolesPlus { public class ClassManager { private Random rnd = new Random(); public int chosenRoleId; public string chosenRole; internal static ManualLogSource mls; public RepoRoles repoRoles = new RepoRoles(); public readonly Harmony harmonyPatcher = new Harmony("patches.reporoles.mod"); public List<string> roleList = new List<string> { "Runner", "Tank", "Gambler" }; private float origMoveSpeed; private float origSprintSpeed; private float origCrouchSpeed; private float speedMultiplier; private int origPlayerHealth; private int origMaxPlayerHealth; private float origJumpForce; private float origMaxEnergy; private float origGrabStrength; private float origGrabRange; public ClassManager() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown if (mls == null) { mls = Logger.CreateLogSource("ClassManager"); } origMoveSpeed = PlayerController.instance.MoveSpeed; origSprintSpeed = PlayerController.instance.SprintSpeed; origCrouchSpeed = PlayerController.instance.CrouchSpeed; speedMultiplier = 1.5f; origJumpForce = PlayerController.instance.JumpForce; origPlayerHealth = (int)AccessTools.Field(typeof(PlayerHealth), "health").GetValue(PlayerAvatar.instance.playerHealth); origMaxPlayerHealth = (int)AccessTools.Field(typeof(PlayerHealth), "maxHealth").GetValue(PlayerAvatar.instance.playerHealth); origMaxEnergy = PlayerController.instance.EnergyStart; origGrabStrength = PhysGrabber.instance.grabStrength; origGrabRange = PlayerAvatar.instance.physGrabber.grabRange; } public void rollRole(PlayerController __instance) { chosenRoleId = rnd.Next(1, 8); assignRole(chosenRoleId, __instance); } public void assignRole(int roleId, PlayerController __instance) { //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_0a73: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Unknown result type (might be due to invalid IL or missing references) //IL_0aad: Unknown result type (might be due to invalid IL or missing references) //IL_0b26: Unknown result type (might be due to invalid IL or missing references) //IL_0b2b: Unknown result type (might be due to invalid IL or missing references) //IL_0b5b: Unknown result type (might be due to invalid IL or missing references) //IL_0b60: Unknown result type (might be due to invalid IL or missing references) //IL_0bfe: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c33: Unknown result type (might be due to invalid IL or missing references) //IL_0c38: Unknown result type (might be due to invalid IL or missing references) //IL_0c64: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0c9e: Unknown result type (might be due to invalid IL or missing references) string text = SemiFunc.PlayerGetName(PlayerAvatar.instance); string key = SemiFunc.PlayerGetSteamID(PlayerAvatar.instance); int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; if (StatsManager.instance.playerUpgradeHealth.TryGetValue(key, out var value)) { num = value; } if (StatsManager.instance.playerUpgradeSpeed.TryGetValue(key, out var value2)) { num2 = value2; } if (StatsManager.instance.playerUpgradeStamina.TryGetValue(key, out var value3)) { num3 = value3; } if (StatsManager.instance.playerUpgradeStrength.TryGetValue(key, out var value4)) { num4 = value4; } if (StatsManager.instance.playerUpgradeRange.TryGetValue(key, out var value5)) { num5 = value5; } __instance.CrouchSpeed = origCrouchSpeed; __instance.MoveSpeed = origMoveSpeed; __instance.SprintSpeed = origSprintSpeed + (float)num2 * 1f; __instance.JumpForce = origJumpForce; __instance.EnergyStart = origMaxEnergy + (float)num3 * 10f; __instance.EnergyCurrent = origMaxEnergy + (float)num3 * 10f; PlayerAvatar.instance.physGrabber.grabStrength = origGrabStrength + (float)num4 * 0.2f; PlayerAvatar.instance.physGrabber.grabRange = origGrabRange + (float)num5 * 1f; AccessTools.Field(typeof(PlayerHealth), "maxHealth").SetValue(PlayerAvatar.instance.playerHealth, origMaxPlayerHealth + num * 20); if ((int)AccessTools.Field(typeof(PlayerHealth), "health").GetValue(PlayerAvatar.instance.playerHealth) > (int)AccessTools.Field(typeof(PlayerHealth), "maxHealth").GetValue(PlayerAvatar.instance.playerHealth)) { AccessTools.Field(typeof(PlayerHealth), "health").SetValue(PlayerAvatar.instance.playerHealth, origMaxPlayerHealth + num * 20); } if (!SemiFunc.RunIsLevel() || SemiFunc.RunIsShop()) { return; } guiManager.showGUI = true; if (roleId <= 0) { mls.LogWarning((object)"Unable to find RoleId! Please contact the mod developer."); return; } KeyCode value6 = RepoRoles.toggleKey.Value; switch (roleId) { case 1: mls.LogInfo((object)"Assigning role Runner."); __instance.CrouchSpeed = origCrouchSpeed * speedMultiplier; __instance.MoveSpeed = origMoveSpeed * speedMultiplier; __instance.SprintSpeed = origSprintSpeed * speedMultiplier + (float)num2 * 1f; RepoRoles.GUIinstance.text = "Runner"; RepoRoles.GUIinstance.color = Color.yellow; RepoRoles.GUIinstance.descText = "You run much faster than everyone else!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; RepoRoles.GUIinstance.descColor = Color.yellow; break; case 2: mls.LogInfo((object)"Assigning role Tank."); AccessTools.Field(typeof(PlayerHealth), "maxHealth").SetValue(PlayerAvatar.instance.playerHealth, (float)(origMaxPlayerHealth + num * 20) * 2.5f); AccessTools.Field(typeof(PlayerHealth), "health").SetValue(PlayerAvatar.instance.playerHealth, (float)(origPlayerHealth + num * 20) * 2.5f); __instance.CrouchSpeed = origCrouchSpeed * 0.9f; __instance.MoveSpeed = origMoveSpeed * 0.9f; __instance.SprintSpeed = (origSprintSpeed + (float)num2 * 1f) * 0.9f; RepoRoles.GUIinstance.text = "Tank"; RepoRoles.GUIinstance.color = Color.gray; RepoRoles.GUIinstance.descText = "You walk slower but your hp is tripled!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; RepoRoles.GUIinstance.descColor = Color.gray; break; case 3: { int num6 = rnd.Next(1, 8); mls.LogInfo((object)"Assigning role Gambler."); RepoRoles.GUIinstance.text = "Gambler"; RepoRoles.GUIinstance.color = Color.magenta; RepoRoles.GUIinstance.descColor = Color.magenta; switch (num6) { case 1: mls.LogMessage((object)"You rolled effect combo 1 - Heavy Boy. You walk, crouch and run slower but you have more health!"); __instance.CrouchSpeed = origCrouchSpeed * 0.8f; __instance.MoveSpeed = origMoveSpeed * 0.8f; __instance.SprintSpeed = (origSprintSpeed + (float)num2 * 1f) * 0.8f; AccessTools.Field(typeof(PlayerHealth), "maxHealth").SetValue(PlayerAvatar.instance.playerHealth, 150 + num * 20); AccessTools.Field(typeof(PlayerHealth), "health").SetValue(PlayerAvatar.instance.playerHealth, 150 + num * 20); RepoRoles.GUIinstance.descText = "Heavy Boy: You rolled random effects: You walk, crouch and run slower but you have more health!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; case 2: mls.LogMessage((object)"You rolled effect combo 2 - Walker. You don\u00b4t jump as high but you walk, crouch and run faster!"); __instance.JumpForce = origJumpForce - 5f; __instance.CrouchSpeed = origCrouchSpeed * 1.3f; __instance.MoveSpeed = origMoveSpeed * 1.3f; __instance.SprintSpeed = (origSprintSpeed + (float)num2 * 1f) * 1.3f; RepoRoles.GUIinstance.descText = "Walker: You rolled random effects: You don\u00b4t jump as high but you walk, crouch and run faster!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; case 3: mls.LogMessage((object)"You rolled effect combo 3 - Strong Oldman. You have more stamina but you have less health."); __instance.EnergyStart = (origMaxEnergy + (float)num3 * 10f) * 2f; __instance.EnergyCurrent = (origMaxEnergy + (float)num3 * 10f) * 2f; AccessTools.Field(typeof(PlayerHealth), "maxHealth").SetValue(PlayerAvatar.instance.playerHealth, 70 + num * 20); AccessTools.Field(typeof(PlayerHealth), "health").SetValue(PlayerAvatar.instance.playerHealth, 70 + num * 20); RepoRoles.GUIinstance.descText = "Strong Oldman: You rolled random effects: You have more stamina but you have less health!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; case 4: mls.LogMessage((object)"You rolled effect combo 4 - Powerlifter. You\u00b4re stronger but you have less stamina."); PhysGrabber.instance.grabStrength = (origGrabStrength + (float)num4 * 0.2f) * 1.4f; __instance.EnergyStart = origMaxEnergy - 20f + (float)num3 * 10f; __instance.EnergyCurrent = origMaxEnergy - 20f + (float)num3 * 10f; RepoRoles.GUIinstance.descText = "PowerLifter: You rolled random effects: You\u00b4re stronger but you have less stamina!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; case 5: mls.LogMessage((object)"You rolled effect combo 5 - Telescopic. You\u00b4re not as strong but you have more reach."); PhysGrabber.instance.grabRange = (PlayerAvatar.instance.physGrabber.grabRange = (origGrabRange + (float)num5 * 1f) * 2f); PhysGrabber.instance.grabStrength = (origGrabStrength + (float)num4 * 0.2f) * 0.8f; RepoRoles.GUIinstance.descText = "Telescopic: You rolled random effects: You\u00b4re weaker but you have more reach!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; case 6: mls.LogMessage((object)"You rolled effect combo 6 - Skinny. You have more stamina and speed but less health."); __instance.EnergyStart = (origMaxEnergy + (float)num3 * 10f) * 1.5f; __instance.EnergyCurrent = (origMaxEnergy + (float)num3 * 10f) * 1.5f; __instance.CrouchSpeed = origCrouchSpeed * 1.2f; __instance.MoveSpeed = origMoveSpeed * 1.2f; __instance.SprintSpeed = (origSprintSpeed + (float)num2 * 1f) * 1.2f; AccessTools.Field(typeof(PlayerHealth), "maxHealth").SetValue(PlayerAvatar.instance.playerHealth, 50 + num * 20); AccessTools.Field(typeof(PlayerHealth), "health").SetValue(PlayerAvatar.instance.playerHealth, 50 + num * 20); RepoRoles.GUIinstance.descText = "Skinny: You rolled random effects: You have more stamina and speed but less health!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; case 7: mls.LogMessage((object)"You rolled effect combo 7 - Long Hand. You have more strength and reach but less stamina."); PhysGrabber.instance.grabStrength = (origGrabStrength + (float)num4 * 0.2f) * 1.6f; PhysGrabber.instance.grabRange = (PlayerAvatar.instance.physGrabber.grabRange = (origGrabRange + (float)num5 * 1f) * 2.5f); __instance.EnergyStart = origMaxEnergy - 40f + (float)num3 * 10f; __instance.EnergyCurrent = origMaxEnergy - 40f + (float)num3 * 10f; RepoRoles.GUIinstance.descText = "Long Hand - You rolled random effects: You have more strength and reach but less stamina!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; break; } break; } case 4: mls.LogMessage((object)"Assigning role Strongman."); PlayerAvatar.instance.physGrabber.grabStrength = (origGrabStrength + (float)num4 * 0.2f) * 2f; RepoRoles.GUIinstance.text = "Strongman"; RepoRoles.GUIinstance.color = Color.red; RepoRoles.GUIinstance.descText = "You\u00b4re incredibly strong!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; RepoRoles.GUIinstance.descColor = Color.red; break; case 5: mls.LogMessage((object)"Assigning role Ranged Looter."); PlayerAvatar.instance.physGrabber.grabRange = (origGrabRange + (float)num5 * 1f) * 2.5f; PlayerAvatar.instance.physGrabber.grabStrength = (origGrabStrength + (float)num4 * 0.2f) * 1.2f; RepoRoles.GUIinstance.text = "Ranged Looter"; RepoRoles.GUIinstance.color = Color.blue; RepoRoles.GUIinstance.descText = "You can reach objects from far away!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; RepoRoles.GUIinstance.descColor = Color.blue; break; case 6: mls.LogMessage((object)"Assigning role Athletic."); PlayerAvatar.instance.physGrabber.grabStrength = (origGrabStrength + (float)num4 * 0.2f) * 1.3f; __instance.EnergyStart = origMaxEnergy + (float)num3 * 10f + 20f; __instance.EnergyCurrent = origMaxEnergy + (float)num3 * 10f + 20f; __instance.JumpForce = origJumpForce + 3f; RepoRoles.GUIinstance.text = "Athletic"; RepoRoles.GUIinstance.color = Color.white; RepoRoles.GUIinstance.descText = "You have more stamina and strength and can jump higher!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; RepoRoles.GUIinstance.descColor = Color.white; break; case 7: mls.LogMessage((object)"Assigning role LOSER."); RepoRoles.GUIinstance.text = "LOSER"; RepoRoles.GUIinstance.color = Color.blue; RepoRoles.GUIinstance.descText = "You have... NOTHING ADDITIONAL!\nPress " + ((object)(KeyCode)(ref value6)).ToString() + " to continue suffer"; RepoRoles.GUIinstance.descColor = Color.blue; break; } } } [HarmonyPatch(typeof(TruckScreenText))] internal static class Sender { private static bool hasRanOnce; private static ClassManager manager = new ClassManager(); public static readonly Harmony harmonyPatcher = new Harmony("sender.reporoles.mod"); [HarmonyPatch("ArrowPointAtGoalLogic")] [HarmonyPrefix] private static void PrefixMethod() { if (!hasRanOnce) { manager.rollRole(PlayerController.instance); Logger.CreateLogSource("ChatMsgMgr").LogInfo((object)"Successfully rolled role!"); hasRanOnce = true; } } [HarmonyPatch("Start")] [HarmonyPrefix] private static void StartPrefix() { hasRanOnce = false; } } } namespace R.E.P.O.RolesPlus.patches { public class guiManager : MonoBehaviour { public static bool showGUI = true; public GUIStyle style; public string text; public Color color = Color.white; public string descText; public Color descColor = Color.white; private void OnGUI() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.RunIsLevel() && !SemiFunc.RunIsShop() && showGUI) { float num = Screen.width / 2 - 100; float num2 = Screen.height / 2 - 35; GUIStyle val = new GUIStyle(); val.fontSize = 40; val.fontStyle = (FontStyle)1; val.richText = true; val.normal.textColor = color; val.alignment = (TextAnchor)4; GUIStyle val2 = new GUIStyle(val); val2.normal.textColor = Color.black; val2.alignment = (TextAnchor)4; float num3 = 2f; GUI.Label(new Rect(num - num3, num2, 200f, 50f), text, val2); GUI.Label(new Rect(num + num3, num2, 200f, 50f), text, val2); GUI.Label(new Rect(num, num2 - num3, 200f, 50f), text, val2); GUI.Label(new Rect(num, num2 + num3, 200f, 50f), text, val2); GUI.Label(new Rect(num - num3, num2 - num3, 200f, 50f), text, val2); GUI.Label(new Rect(num - num3, num2 + num3, 200f, 50f), text, val2); GUI.Label(new Rect(num + num3, num2 - num3, 200f, 50f), text, val2); GUI.Label(new Rect(num + num3, num2 + num3, 200f, 50f), text, val2); GUI.Label(new Rect(num, num2, 200f, 50f), text, val); float num4 = Screen.width / 2 - 100; float num5 = Screen.height / 2 + 25; GUIStyle val3 = new GUIStyle(); val3.fontSize = 30; val3.fontStyle = (FontStyle)1; val3.richText = true; val3.normal.textColor = color; val3.alignment = (TextAnchor)4; GUIStyle val4 = new GUIStyle(val3); val4.normal.textColor = Color.black; val4.alignment = (TextAnchor)4; float num6 = 2f; GUI.Label(new Rect(num4 - num6, num5, 200f, 50f), descText, val4); GUI.Label(new Rect(num4 + num6, num5, 200f, 50f), descText, val4); GUI.Label(new Rect(num4, num5 - num6, 200f, 50f), descText, val4); GUI.Label(new Rect(num4, num5 + num6, 200f, 50f), descText, val4); GUI.Label(new Rect(num4 - num6, num5 - num6, 200f, 50f), descText, val4); GUI.Label(new Rect(num4 - num6, num5 + num6, 200f, 50f), descText, val4); GUI.Label(new Rect(num4 + num6, num5 - num6, 200f, 50f), descText, val4); GUI.Label(new Rect(num4 + num6, num5 + num6, 200f, 50f), descText, val4); GUI.Label(new Rect(num4, num5, 200f, 50f), descText, val3); } } private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(RepoRoles.toggleKey.Value)) { showGUI = !showGUI; } } } } namespace Bobi { [BepInPlugin("reporoles.mod", "RepoRolesPlus", "1.0.1")] public class RepoRoles : BaseUnityPlugin { public const string pluginGuid = "reporoles.mod"; public const string pluginName = "RepoRolesPlus"; public const string pluginVersion = "1.0.1"; public readonly Harmony harmony = new Harmony("reporoles.mod"); public static RepoRoles Instance; internal ManualLogSource mls; public static Font newFont; public static guiManager GUIinstance; public static ConfigEntry<KeyCode> toggleKey; public ConfigDefinition def = new ConfigDefinition("GUI", "GUI Toggle Key"); private void Awake() { mls = Logger.CreateLogSource("reporoles.mod"); if ((Object)(object)Instance == (Object)null) { Instance = this; } harmony.PatchAll(typeof(RepoRoles)); harmony.PatchAll(typeof(Sender)); mls.LogInfo((object)"Init"); SceneManager.sceneLoaded += delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown if ((Object)(object)GUIinstance == (Object)null) { GameObject val = new GameObject(); GUIinstance = val.AddComponent<guiManager>(); GUIinstance.text = ""; GUIinstance.color = Color.cyan; Object.DontDestroyOnLoad((Object)val); } }; toggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>(def, (KeyCode)114, (ConfigDescription)null); } } }