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 butterscotchandroses v0.3.3
butterscotchnroses.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using AllyNames; using BNR; using BNR.items; using BNR.patches; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using CoolerEclipse; using EntityStates; using EntityStates.JunkCube; using GoldenCoastPlusRevived.Modules; using HG; using HG.Reflection; using HarmonyLib; using IL.RoR2; using Inferno.Stat_AI; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On; using On.EntityStates.JunkCube; using On.RoR2; using On.RoR2.Hologram; using On.RoR2.UI; using On.RoR2.UI.SkinControllers; using R2API; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.Components.Options; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Hologram; using RoR2.Items; using RoR2.Orbs; using RoR2.Skills; using RoR2.UI; using RoR2.UI.SkinControllers; using RoR2BepInExPack.GameAssetPaths.Version_1_35_0; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using RoR2BepInExPack.GameAssetPathsBetter; using SS2; using ShaderSwapper; using Skillsmas.Skills.Merc; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.UI; using butterscotchnroses; using butterscotchnroses.artifacts; using butterscotchnroses.skills; [assembly: AssemblyTitle("butterscotchnroses")] [assembly: AssemblyProduct("butterscotchnroses")] [assembly: AssemblyInformationalVersion("1.0.0+3453717f087323071aef85dc83fbcbffdc3fc3a2")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("butterscotchnroses")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: OptIn] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 ProdzModpackUtils { public class ProdzUtils { public static Color TRANSPARENT = new Color(0f, 0f, 0f, 0f); public static Sprite GetComposite(Texture2D bg, Texture2D fg) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor((float)Mathf.Max(((Texture)bg).width, ((Texture)fg).width), (float)Mathf.Max(((Texture)bg).height, ((Texture)fg).height)); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(Mathf.Floor(((float)((Texture)bg).width - val.x) / 2f), Mathf.Floor(((float)((Texture)bg).width - val.y) / 2f)); Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(Mathf.Floor(((float)((Texture)fg).width - val.x) / 2f), Mathf.Floor(((float)((Texture)fg).width - val.y) / 2f)); Texture2D val4 = new Texture2D((int)val.x, (int)val.y); for (int i = 0; (float)i < val.x; i++) { for (int j = 0; (float)j < val.y; j++) { val4.SetPixel(i, j, Over(Pixel(bg, (float)i + val2.x, (float)j + val2.y), Pixel(fg, (float)i + val3.x, (float)j + val3.y))); } } return Sprite.Create(val4, new Rect(0f, 0f, val.x, val.y), new Vector2(0.5f, 0.5f), 3f); } public static Color Pixel(Texture2D img, float x, float y) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (0f > x || x >= (float)((Texture)img).width || 0f > y || y >= (float)((Texture)img).height) { return TRANSPARENT; } return img.GetPixel((int)x, (int)y); } public static Color Over(Color bg, Color fg) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) float num = bg.a * (1f - fg.a) + fg.a; return Color.op_Implicit((Color.op_Implicit(fg) * fg.a + Color.op_Implicit(bg) * bg.a * (1f - fg.a)) / num); } public static Sprite Load(params string[] path) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown Size dimensions = ImageHelper.GetDimensions(Path.Combine(path)); byte[] array = File.ReadAllBytes(Path.Combine(path)); Texture2D val = new Texture2D(dimensions.Width, dimensions.Height, (TextureFormat)3, false) { filterMode = (FilterMode)2 }; ImageConversion.LoadImage(val, array); return Sprite.Create(val, new Rect(0f, 0f, (float)dimensions.Width, (float)dimensions.Height), new Vector2(0.5f, 0.5f), 3f); } } public static class ImageHelper { private const string errorMessage = "Could not recognize image format."; private static Dictionary<byte[], Func<BinaryReader, Size>> imageFormatDecoders = new Dictionary<byte[], Func<BinaryReader, Size>> { { new byte[2] { 66, 77 }, DecodeBitmap }, { new byte[6] { 71, 73, 70, 56, 55, 97 }, DecodeGif }, { new byte[6] { 71, 73, 70, 56, 57, 97 }, DecodeGif }, { new byte[8] { 137, 80, 78, 71, 13, 10, 26, 10 }, DecodePng }, { new byte[2] { 255, 216 }, DecodeJfif } }; public static Size GetDimensions(string path) { using BinaryReader binaryReader = new BinaryReader(File.OpenRead(path)); try { return GetDimensions(binaryReader); } catch (ArgumentException ex) { if (ex.Message.StartsWith("Could not recognize image format.")) { throw new ArgumentException("Could not recognize image format.", "path", ex); } throw ex; } } public static Size GetDimensions(BinaryReader binaryReader) { int num = imageFormatDecoders.Keys.OrderByDescending((byte[] x) => x.Length).First().Length; byte[] array = new byte[num]; for (int num2 = 0; num2 < num; num2++) { array[num2] = binaryReader.ReadByte(); foreach (KeyValuePair<byte[], Func<BinaryReader, Size>> imageFormatDecoder in imageFormatDecoders) { if (array.StartsWith(imageFormatDecoder.Key)) { return imageFormatDecoder.Value(binaryReader); } } } throw new ArgumentException("Could not recognize image format.", "binaryReader"); } private static bool StartsWith(this byte[] thisBytes, byte[] thatBytes) { for (int i = 0; i < thatBytes.Length; i++) { if (thisBytes[i] != thatBytes[i]) { return false; } } return true; } private static short ReadLittleEndianInt16(this BinaryReader binaryReader) { byte[] array = new byte[2]; for (int i = 0; i < 2; i++) { array[1 - i] = binaryReader.ReadByte(); } return BitConverter.ToInt16(array, 0); } private static int ReadLittleEndianInt32(this BinaryReader binaryReader) { byte[] array = new byte[4]; for (int i = 0; i < 4; i++) { array[3 - i] = binaryReader.ReadByte(); } return BitConverter.ToInt32(array, 0); } private static Size DecodeBitmap(BinaryReader binaryReader) { binaryReader.ReadBytes(16); int width = binaryReader.ReadInt32(); int height = binaryReader.ReadInt32(); return new Size(width, height); } private static Size DecodeGif(BinaryReader binaryReader) { short width = binaryReader.ReadInt16(); int height = binaryReader.ReadInt16(); return new Size(width, height); } private static Size DecodePng(BinaryReader binaryReader) { binaryReader.ReadBytes(8); int width = binaryReader.ReadLittleEndianInt32(); int height = binaryReader.ReadLittleEndianInt32(); return new Size(width, height); } private static Size DecodeJfif(BinaryReader binaryReader) { while (binaryReader.ReadByte() == byte.MaxValue) { byte num = binaryReader.ReadByte(); short num2 = binaryReader.ReadLittleEndianInt16(); if (num == 192) { binaryReader.ReadByte(); int height = binaryReader.ReadLittleEndianInt16(); return new Size(binaryReader.ReadLittleEndianInt16(), height); } binaryReader.ReadBytes(num2 - 2); } throw new ArgumentException("Could not recognize image format."); } } } namespace butterscotchnroses { public class oldconfigs { private static ConfigEntry<bool> replaceOldConfigs; public static void fixOldConfigs() { replaceOldConfigs = ((BaseUnityPlugin)BNR.butterscotchnroses.instance).Config.Bind<bool>("BNR", "whether or not to replace/fix old default configs ,..,", true, "basically uhh replace default configs if enabled.,,."); Utils.CheckboxConfig(replaceOldConfigs); if (replaceOldConfigs.Value) { string text = "golemplains,golemplains2"; if (coolereclipse.whitelistStages.Value == text) { coolereclipse.whitelistStages.Value = (string)((ConfigEntryBase)coolereclipse.whitelistStages).DefaultValue; } string text2 = "skinCommandoAlt,CommandoBody,100,0,0,Test Skin;;skinCommandoAlt,CommandoBody,200,0,0,Test Skin 2;;skinCommandoDefault,CommandoBody,290,-40,-10,Awesome Skin !!!!"; if (skinrecolors.skinRecolors.Value == text2) { skinrecolors.skinRecolors.Value = (string)((ConfigEntryBase)skinrecolors.skinRecolors).DefaultValue; } string text3 = "goldshores,bazaar,solutionalhaunt,ss2_voidshop,goldshores"; if (coolereclipse.blacklistStages.Value == text3) { coolereclipse.blacklistStages.Value = (string)((ConfigEntryBase)coolereclipse.blacklistStages).DefaultValue; } string text4 = "BombardmentDrone,Bombardment Drone,Default;Drones,Tsar Bomba;Fat Man;Little Boy|JunkDrone,Junk Drone,Default;Drones|RechargeDrone,Barrier Drone,Default;Drones|JailerDrone,Jailer Drone,Default;Drones|CleanupDrone,Cleanup Drone,Default;Drones,Roomba|CopycatDrone,Freeze Drone,Default;Drones,Frozone|HaulerDrone,Transport Drone,Default;Drones|DTGunnerDroneBody,CROSSHAIRS,Default;Drones,Ruxin|DTHealingDroneBody,DOC,Default;Drones,Bunny|DTHaulerDroneBody,CHIRP,Default;Drones,Moose|FriendUnitBody,Best Buddy,Default,Friend Inside Me;Stupid Baby;Son|DroneBomber,Lt. Droneboy,Default,Lt. Beep Boop"; if (allynames.bodyNames.Value == text4) { allynames.bodyNames.Value = (string)((ConfigEntryBase)allynames.bodyNames).DefaultValue; } } } } } namespace butterscotchnroses.skills { public abstract class SkillBase<T> : SkillBase where T : SkillBase<T> { public static T Instance { get; private set; } public SkillBase() { if (Instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting SkillBase was instantiated twice"); } Instance = this as T; } } public abstract class SkillBase { public SkillDef SkillDef; public static EventHandler PostCreationEvent; public abstract SerializableEntityStateType ActivationState { get; } public abstract float Cooldown { get; } public virtual int StockToConsume { get; } = 1; public abstract string Machine { get; } public abstract int MaxStock { get; } public abstract string LangToken { get; } public abstract string Name { get; } public virtual string Survivor { get; } public virtual SkillSlot Slot { get; } = (SkillSlot)(-1); public abstract string Description { get; } public virtual bool IsCombat { get; } = true; public virtual bool Agile { get; } public virtual bool DelayCooldown { get; } public virtual List<string> Keywords { get; } = new List<string>(); public abstract Sprite SkillIcon { get; } public virtual UnlockableDef Unlock { get; } public virtual bool AutoApply { get; } = true; public virtual bool MustKeyPress { get; } public virtual bool AgileAddKeyword { get; } = true; public virtual bool SprintCancelable { get; } = true; public virtual bool ResetStockOnOverride { get; } public virtual bool Passive { get; } public virtual bool Configurable { get; } = true; public virtual bool ForceOff { get; } public virtual InterruptPriority Priority { get; } = (InterruptPriority)1; public virtual int StockToRecharge { get; } = 1; public void Init() { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Expected I4, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Expected O, but got Unknown //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Expected O, but got Unknown //IL_03db: 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_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_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Expected O, but got Unknown //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) if (ForceOff || (Configurable && !((BaseUnityPlugin)BNR.butterscotchnroses.instance).Config.Bind<bool>("Skills", Name, true, "Enable this skill?").Value)) { return; } SkillDef = GetSkillDef(); SkillDef.skillNameToken = "SKILL_" + LangToken.ToUpper() + "_NAME"; SkillDef.skillDescriptionToken = "SKILL_" + LangToken.ToUpper() + "_DESC"; SkillDef.skillName = LangToken.ToUpper(); SkillDef.baseRechargeInterval = Cooldown; SkillDef.baseMaxStock = MaxStock; SkillDef.activationState = ActivationState; SkillDef.cancelSprintingOnActivation = !Passive && !Agile; SkillDef.icon = SkillIcon; SkillDef.interruptPriority = Priority; if (!SprintCancelable) { SkillDef.canceledFromSprinting = false; } else { SkillDef.canceledFromSprinting = !Agile; } SkillDef.isCombatSkill = IsCombat; SkillDef.activationStateMachineName = Machine; SkillDef.beginSkillCooldownOnSkillEnd = DelayCooldown; SkillDef.stockToConsume = StockToConsume; SkillDef.requiredStock = ((!Passive) ? 1 : 321); SkillDef.mustKeyPress = MustKeyPress; SkillDef.fullRestockOnAssign = ResetStockOnOverride; SkillDef.rechargeStock = StockToRecharge; ((Object)SkillDef).name = LangToken.ToUpper(); List<string> keywords = Keywords; if (Agile && AgileAddKeyword) { keywords.Add(butterscotchnroses.skills.Keywords.Agile); } if (keywords.Count >= 1) { SkillDef.keywordTokens = keywords.ToArray(); } Variant val3; if (AutoApply && Passive) { GameObject val = Addressables.LoadAssetAsync<GameObject>((object)Survivor).WaitForCompletion(); bool flag = false; GenericSkill[] components = val.GetComponents<GenericSkill>(); foreach (GenericSkill val2 in components) { if ((val2.skillName != null && val2.skillName.ToLower().Contains("passive")) || (((Object)val2.skillFamily).name != null && ((Object)val2.skillFamily).name.ToLower().Contains("passive"))) { SkillFamily skillFamily = val2.skillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; val3 = new Variant { skillDef = SkillDef, unlockableDef = Unlock }; ((Variant)(ref val3)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null); variants[num] = val3; flag = true; break; } } if (!flag) { GenericSkill obj = val.AddComponent<GenericSkill>(); SkillLocator component = val.GetComponent<SkillLocator>(); SkillFamily val4 = ScriptableObject.CreateInstance<SkillFamily>(); obj.skillName = ((Object)val).name + "Passive"; ((Object)val4).name = ((Object)val).name + "Passive"; val4.variants = (Variant[])(object)new Variant[2]; Variant[] variants2 = val4.variants; val3 = new Variant { skillDef = SkillDef, unlockableDef = Unlock }; ((Variant)(ref val3)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null); variants2[1] = val3; SkillDef val5 = ScriptableObject.CreateInstance<SkillDef>(); val5.skillNameToken = component.passiveSkill.skillNameToken; val5.skillDescriptionToken = component.passiveSkill.skillDescriptionToken; val5.activationStateMachineName = "TheAmongUs"; val5.activationState = new SerializableEntityStateType(typeof(Idle)); val5.icon = component.passiveSkill.icon; ContentAddition.AddSkillDef(val5); component.passiveSkill.enabled = false; obj.hideInCharacterSelect = true; Variant[] variants3 = val4.variants; val3 = new Variant { skillDef = val5 }; ((Variant)(ref val3)).viewableNode = new Node(val5.skillNameToken, false, (Node)null); variants3[0] = val3; obj._skillFamily = val4; } } else if (AutoApply) { SkillLocator component2 = Addressables.LoadAssetAsync<GameObject>((object)Survivor).WaitForCompletion().GetComponent<SkillLocator>(); SkillFamily val6 = null; SkillSlot slot = Slot; switch ((int)slot) { case 0: val6 = component2.primary.skillFamily; break; case 1: val6 = component2.secondary.skillFamily; break; case 2: val6 = component2.utility.skillFamily; break; case 3: val6 = component2.special.skillFamily; break; } if ((Object)(object)val6 != (Object)null) { Array.Resize(ref val6.variants, val6.variants.Length + 1); Variant[] variants4 = val6.variants; int num2 = variants4.Length - 1; val3 = new Variant { skillDef = SkillDef, unlockableDef = Unlock }; ((Variant)(ref val3)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null); variants4[num2] = val3; } } LanguageAPI.Add(SkillDef.skillNameToken, Name); string text = Description; if (Agile && AgileAddKeyword) { text = "<style=cIsUtility>Agile.</style> " + text; } LanguageAPI.Add(SkillDef.skillDescriptionToken, text); ContentAddition.AddSkillDef(SkillDef); PostCreation(); } public virtual SkillDef GetSkillDef() { return ScriptableObject.CreateInstance<SkillDef>(); } public virtual void PostCreation() { PostCreationEvent?.Invoke(this, new EventArgs()); } public EntityStateMachine AddEntityStateMachine<T>(GameObject obj, string name) where T : EntityState { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine obj2 = obj.AddComponent<EntityStateMachine>(); obj2.customName = name; obj2.initialStateType = new SerializableEntityStateType(typeof(T)); obj2.mainStateType = new SerializableEntityStateType(typeof(T)); List<EntityStateMachine> list = obj.GetComponents<EntityStateMachine>().ToList(); obj.GetComponent<NetworkStateMachine>().stateMachines = list.ToArray(); return obj2; } public GameObject GetSurvivor() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<GameObject>((object)Survivor).WaitForCompletion(); } } public static class Keywords { public static string Poison = "KEYWORD_POISON"; public static string Regenerative = "KEYWORD_RAPID_REGEN"; public static string Agile = "KEYWORD_AGILE"; public static string HealthCost = "KEYWORD_PERCENT_HP"; public static string Disperse = "KEYWORD_SONIC_BOOM"; public static string Weak = "KEYWORD_WEAK"; public static string Heavy = "KEYWORD_HEAVY"; public static string Freeze = "KEYWORD_FREEZING"; public static string Stun = "KEYWORD_STUNNING"; public static string Expose = "KEYWORD_EXPOSE"; public static string Shock = "KEYWORD_SHOCKING"; public static string Slayer = "KEYWORD_SLAYER"; public static string Hemorrhage = "KEYWORD_SUPERBLEED"; public static string Ignite = "KEYWORD_IGNITE"; public static string Weakpoint = "KEYWORD_WEAKPOINT"; public static string ActiveReload = "KEYWORD_ACTIVERELOAD"; public static string VoidCorruption = "KEYWORD_VOIDCORRUPTION"; } } namespace butterscotchnroses.artifacts { public abstract class ArtifactBase<T> : ArtifactBase where T : ArtifactBase<T> { public static T instance { get; private set; } public ArtifactBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ArtifactBase was instantiated twice"); } instance = this as T; } } public abstract class ArtifactBase { public ArtifactDef ArtifactDef; public abstract string ArtifactName { get; } public abstract string ArtifactLangTokenName { get; } public abstract string ArtifactDescription { get; } public abstract Sprite ArtifactEnabledIcon { get; } public abstract Sprite ArtifactDisabledIcon { get; } public bool ArtifactEnabled => RunArtifactManager.instance.IsArtifactEnabled(ArtifactDef); public abstract void Init(ConfigFile config); protected void CreateLang() { LanguageAPI.Add("ARTIFACT_" + ArtifactLangTokenName + "_NAME", ArtifactName); LanguageAPI.Add("ARTIFACT_" + ArtifactLangTokenName + "_DESCRIPTION", ArtifactDescription); } protected void CreateArtifact() { ArtifactDef = ScriptableObject.CreateInstance<ArtifactDef>(); ArtifactDef.cachedName = "ARTIFACT_" + ArtifactLangTokenName; ArtifactDef.nameToken = "ARTIFACT_" + ArtifactLangTokenName + "_NAME"; ArtifactDef.descriptionToken = "ARTIFACT_" + ArtifactLangTokenName + "_DESCRIPTION"; ArtifactDef.smallIconSelectedSprite = ArtifactEnabledIcon; ArtifactDef.smallIconDeselectedSprite = ArtifactDisabledIcon; ContentAddition.AddArtifactDef(ArtifactDef); } public abstract void Hooks(); } internal class evil : ArtifactBase<evil> { public static ConfigEntry<int> TimesToPrintMessageOnStart; public override string ArtifactName => "Artifact of Example"; public override string ArtifactLangTokenName => "ARTIFACT_OF_EXAMPLE"; public override string ArtifactDescription => "When enabled, print a message to the chat at the start of the run."; public override Sprite ArtifactEnabledIcon => Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); public override Sprite ArtifactDisabledIcon => Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); public override void Init(ConfigFile config) { } private void CreateConfig(ConfigFile config) { TimesToPrintMessageOnStart = config.Bind<int>("Artifact: " + ArtifactName, "Times to Print Message in Chat", 5, "How many times should a message be printed to the chat on run start?"); } public override void Hooks() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown Run.onRunStartGlobal += PrintMessageToChat; GenericNotification.SetItem += new hook_SetItem(GenericNotificationOnSetItem); ItemIcon.SetItemIndex_ItemIndex_int_float += new hook_SetItemIndex_ItemIndex_int_float(ItemIconOnSetItemIndex_ItemIndex_int_float); } private void ItemIconOnSetItemIndex_ItemIndex_int_float(orig_SetItemIndex_ItemIndex_int_float orig, ItemIcon self, ItemIndex newitemindex, int newitemcount, float newdurationpercent) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0063: 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) orig.Invoke(self, newitemindex, newitemcount, newdurationpercent); if (base.ArtifactEnabled) { self.image.texture = (Texture)(object)Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion().texture; self.tooltipProvider.titleToken = "???"; self.tooltipProvider.bodyToken = "???"; self.tooltipProvider.titleColor = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)1)); } } private void GenericNotificationOnSetItem(orig_SetItem orig, GenericNotification self, ItemDef itemdef) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, itemdef); if (base.ArtifactEnabled) { self.iconImage.texture = (Texture)(object)Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion().texture; self.titleText.token = "???"; self.descriptionText.token = "???"; } } private void PrintMessageToChat(Run run) { if (NetworkServer.active && base.ArtifactEnabled) { for (int i = 0; i < TimesToPrintMessageOnStart.Value; i++) { Chat.AddMessage("Example Artifact has been Enabled."); } } } } } namespace BNR { [BepInPlugin("zzz.kina.BNR", "BNR", "0.3.3")] public class butterscotchnroses : BaseUnityPlugin { private const string PluginGUID = "zzz.kina.BNR"; private const string PluginAuthor = "kina"; private const string PluginName = "BNR"; private const string PluginVersion = "0.3.3"; public static butterscotchnroses instance; public static AssetBundle carvingKitBundle; public static AssetBundle bnrBundle; public static Harmony harmony; public static ConfigEntry<bool> clientSide; public static ConfigEntry<bool> logDebug; public void Awake() { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown instance = this; Log.Init(((BaseUnityPlugin)this).Logger); clientSide = ((BaseUnityPlugin)this).Config.Bind<bool>("BNR", "client side", false, "whether the mod should run in clientside mode or not .,,. disables content/changed behavior that would otherwise cause desyncs automatically !!!"); Utils.CheckboxConfig(clientSide); logDebug = ((BaseUnityPlugin)this).Config.Bind<bool>("BNR", "debug logs", false, "whether the mod should log debug logs.,.,"); carvingKitBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "carvingkit_assets")); ((MonoBehaviour)this).StartCoroutine(ShaderSwapper.UpgradeStubbedShadersAsync(carvingKitBundle)); bnrBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "bnrbundle")); harmony = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID); foreach (Type item in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(PatchBase)) select type) { try { PatchBase obj = (PatchBase)Activator.CreateInstance(item); obj.Config(((BaseUnityPlugin)this).Config); obj.Init(); } catch (Exception data) { Log.Warning("failed to patch something ! probably fine if you dont have whatever mod that was attempted to be patched enabled ,..,,."); Log.Warning(data); } } foreach (Type item2 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ModdedPatchBase)) select type) { try { ModdedPatchBase obj2 = (ModdedPatchBase)Activator.CreateInstance(item2); obj2.Config(((BaseUnityPlugin)this).Config); obj2.PreInit(); } catch (Exception data2) { Log.Warning("failed to patch something ! probably fine if you dont have whatever mod that was attempted to be patched enabled ,..,,."); Log.Warning(data2); } } if (!clientSide.Value) { foreach (Type item3 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(BuffBase)) select type) { ((BuffBase)Activator.CreateInstance(item3)).AddBuff(); } foreach (Type item4 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type) { ((ItemBase)Activator.CreateInstance(item4)).Init(((BaseUnityPlugin)this).Config); } foreach (Type item5 in from x in Assembly.GetExecutingAssembly().GetTypes() where !x.IsAbstract && x.IsSubclassOf(typeof(SkillBase)) select x) { ((SkillBase)Activator.CreateInstance(item5)).Init(); } foreach (Type item6 in from x in Assembly.GetExecutingAssembly().GetTypes() where !x.IsAbstract && x.IsSubclassOf(typeof(ArtifactBase)) select x) { ((ArtifactBase)Activator.CreateInstance(item6)).Init(((BaseUnityPlugin)this).Config); } } oldconfigs.fixOldConfigs(); ModSettingsManager.SetModIcon(bnrBundle.LoadAsset<Sprite>("icon")); } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data, [CallerLineNumber] int line = -1) { if (butterscotchnroses.logDebug.Value) { _logSource.LogDebug(data); } } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } public class acolytesoulrecolor : PatchBase<acolytesoulrecolor> { private static readonly int Color = Shader.PropertyToID("_Color"); private static readonly int PrintRamp = Shader.PropertyToID("_PrintRamp"); private static readonly int ColorRamp = Shader.PropertyToID("_RemapTex"); private ConfigEntry<string> pronounOverrides; private ConfigEntry<bool> descriptionOverride; private ConfigEntry<bool> enabled; public override void Init() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_007f: 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) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: 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) applyHooks(); if (enabled.Value) { Texture val = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampEngi_png).WaitForCompletion(); CharacterModel component = ((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC4/Acolyte/AISoulBody.prefab").WaitForCompletion().transform.Find("Model/mdlSoulBody")).GetComponent<CharacterModel>(); Material val2 = Object.Instantiate<Material>(component.baseRendererInfos[0].defaultMaterial); val2.SetColor(Color, Color32.op_Implicit(new Color32((byte)56, byte.MaxValue, (byte)48, byte.MaxValue))); val2.SetTexture(PrintRamp, val); Material val3 = Object.Instantiate<Material>(component.baseRendererInfos[1].defaultMaterial); val3.SetColor(Color, Color32.op_Implicit(new Color32((byte)56, byte.MaxValue, (byte)48, byte.MaxValue))); val3.SetTexture(ColorRamp, val); component.baseRendererInfos[0].defaultMaterial = val2; component.baseRendererInfos[1].defaultMaterial = val3; component.baseLightInfos[0].defaultColor = Color32.op_Implicit(new Color32((byte)56, byte.MaxValue, (byte)48, byte.MaxValue)); GameObject obj = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC4/Acolyte/AcolyteSoulDeathEffect.prefab").WaitForCompletion(); MainModule main = ((Component)obj.transform.Find("Transform/Sparks")).GetComponent<ParticleSystem>().main; MinMaxGradient startColor = default(MinMaxGradient); ((MinMaxGradient)(ref startColor)).colorMin = Color32.op_Implicit(new Color32((byte)107, byte.MaxValue, (byte)0, byte.MaxValue)); ((MinMaxGradient)(ref startColor)).colorMax = Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)33, byte.MaxValue)); ((MainModule)(ref main)).startColor = startColor; MainModule main2 = ((Component)obj.transform.Find("Transform/TriangleSparks")).GetComponent<ParticleSystem>().main; startColor = default(MinMaxGradient); ((MinMaxGradient)(ref startColor)).colorMin = Color32.op_Implicit(new Color32((byte)107, byte.MaxValue, (byte)0, byte.MaxValue)); ((MinMaxGradient)(ref startColor)).colorMax = Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)33, byte.MaxValue)); ((MainModule)(ref main2)).startColor = startColor; MainModule main3 = ((Component)obj.transform.Find("Transform/Unscaled Flames (1)")).GetComponent<ParticleSystem>().main; startColor = default(MinMaxGradient); ((MinMaxGradient)(ref startColor)).colorMin = Color32.op_Implicit(new Color32((byte)46, (byte)191, (byte)0, byte.MaxValue)); ((MinMaxGradient)(ref startColor)).colorMax = Color32.op_Implicit(new Color32((byte)28, (byte)72, (byte)0, byte.MaxValue)); ((MainModule)(ref main3)).startColor = startColor; } } private void applyHooks() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if (enabled.Value) { AcolyteExtractedSoulController.OnIncomingDamageServer += new Manipulator(AcolyteExtractedSoulControllerOnIncomingDamageServer); } else { AcolyteExtractedSoulController.OnIncomingDamageServer -= new Manipulator(AcolyteExtractedSoulControllerOnIncomingDamageServer); } } private void AcolyteExtractedSoulControllerOnIncomingDamageServer(ILContext il) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int damageOrbIndex = -1; MethodReference val2 = default(MethodReference); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchNewobj(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref damageOrbIndex) })) { Log.Error("failed il"); return; } int num = default(int); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, damageOrbIndex), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchStfld<GenericDamageOrb>(x, "damageColorIndex") })) { Log.Error("failed il 2"); return; } val.Index -= 2; val.Remove(); val.Emit(OpCodes.Ldc_I4_S, (sbyte)4); } public override void Config(ConfigFile config) { enabled = config.Bind<bool>("BNR - acolytesoulrecolor", "enable patches for acolytesoulrecolor", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { applyHooks(); }; } } public class buttonrecolors : PatchBase<buttonrecolors> { [HarmonyPatch] public class RooDropdownPatch { [HarmonyPatch(typeof(RooDropdown), "Awake")] [HarmonyPostfix] public static void CoolerEclipseAddSkyboxPreFix(RooDropdown __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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) ColorBlock colors = ((Selectable)__instance).colors; ((ColorBlock)(ref colors)).normalColor = buttonNorm.Value; ((ColorBlock)(ref colors)).highlightedColor = buttonHigh.Value; ((ColorBlock)(ref colors)).pressedColor = buttonPress.Value; ((ColorBlock)(ref colors)).selectedColor = buttonSelect.Value; ((ColorBlock)(ref colors)).disabledColor = buttonDisabled.Value; ((Selectable)__instance).colors = colors; } } [CompilerGenerated] private static class <>O { public static hook_Awake <0>__ButtonSkinControllerOnAwake; public static hook_Awake <1>__PanelSkinControllerOnAwake; } private ConfigEntry<bool> enabled; private static ConfigEntry<bool> colorButtons; private static ConfigEntry<Color> buttonNorm; private static ConfigEntry<Color> buttonHigh; private static ConfigEntry<Color> buttonPress; private static ConfigEntry<Color> buttonSelect; private static ConfigEntry<Color> buttonDisabled; public override void Init() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0082: 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) if (!enabled.Value) { return; } object obj = <>O.<0>__ButtonSkinControllerOnAwake; if (obj == null) { hook_Awake val = ButtonSkinControllerOnAwake; <>O.<0>__ButtonSkinControllerOnAwake = val; obj = (object)val; } ButtonSkinController.Awake += (hook_Awake)obj; object obj2 = <>O.<1>__PanelSkinControllerOnAwake; if (obj2 == null) { hook_Awake val2 = PanelSkinControllerOnAwake; <>O.<1>__PanelSkinControllerOnAwake = val2; obj2 = (object)val2; } PanelSkinController.Awake += (hook_Awake)obj2; MPDropdown.Awake += new hook_Awake(MPDropdownOnAwake); CustomScrollbar.Awake += new hook_Awake(CustomScrollbarOnAwake); if (colorButtons.Value) { AsyncOperationHandle<UISkinData> val3 = Addressables.LoadAssetAsync<UISkinData>((object)RoR2_Base_UI.skinCleanButton_asset); val3.Completed += delegate(AsyncOperationHandle<UISkinData> handle) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_004c: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ColorBlock colors = handle.Result.buttonStyle.colors; ((ColorBlock)(ref colors)).normalColor = buttonNorm.Value; ((ColorBlock)(ref colors)).highlightedColor = buttonHigh.Value; ((ColorBlock)(ref colors)).pressedColor = buttonPress.Value; ((ColorBlock)(ref colors)).selectedColor = buttonSelect.Value; ((ColorBlock)(ref colors)).disabledColor = buttonDisabled.Value; handle.Result.buttonStyle.colors = colors; }; butterscotchnroses.harmony.CreateClassProcessor(typeof(RooDropdownPatch)).Patch(); } } private void MPDropdownOnAwake(orig_Awake orig, MPDropdown self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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) orig.Invoke(self); if (colorButtons.Value) { ColorBlock colors = ((Selectable)self).colors; ((ColorBlock)(ref colors)).normalColor = buttonNorm.Value; ((ColorBlock)(ref colors)).highlightedColor = buttonHigh.Value; ((ColorBlock)(ref colors)).pressedColor = buttonPress.Value; ((ColorBlock)(ref colors)).selectedColor = buttonSelect.Value; ((ColorBlock)(ref colors)).disabledColor = buttonDisabled.Value; ((Selectable)self).colors = colors; } } private void CustomScrollbarOnAwake(orig_Awake orig, CustomScrollbar self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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) orig.Invoke(self); if (colorButtons.Value) { ColorBlock colors = ((Selectable)self).colors; ((ColorBlock)(ref colors)).normalColor = buttonNorm.Value; ((ColorBlock)(ref colors)).highlightedColor = buttonHigh.Value; ((ColorBlock)(ref colors)).pressedColor = buttonPress.Value; ((ColorBlock)(ref colors)).selectedColor = buttonSelect.Value; ((ColorBlock)(ref colors)).disabledColor = buttonDisabled.Value; ((Selectable)self).colors = colors; } } private static void PanelSkinControllerOnAwake(orig_Awake orig, PanelSkinController self) { //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) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (colorButtons.Value && !((Object)((Component)self).gameObject).name.Contains("ObjectivePanel") && !((Object)((Component)self).gameObject).name.Contains("Naked")) { Image component = ((Component)self).gameObject.GetComponent<Image>(); if (!((Object)((Component)component).gameObject).name.Contains("RuleBook")) { ((Graphic)component).color = Utils.Color255(buttonNorm.Value.r, buttonNorm.Value.g, buttonNorm.Value.b, ((Graphic)component).color.a); } } } private static void ButtonSkinControllerOnAwake(orig_Awake orig, ButtonSkinController self) { //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!colorButtons.Value) { return; } HGButton component = ((Component)self).gameObject.GetComponent<HGButton>(); if (!Object.op_Implicit((Object)(object)component) || ((Object)component).name.Contains("SurvivorIcon") || ((Object)((Component)component).gameObject).name.Contains("Choice") || ((Object)((Component)component).gameObject).name.Contains("Loadout") || ((Object)((Component)component).gameObject).name.Contains("ObjectivePanel") || ((Object)((Component)component).gameObject).name.Contains("Naked")) { return; } Transform parent = ((Component)component).gameObject.transform.parent; if (parent != null) { Transform parent2 = parent.parent; bool? obj; if (parent2 == null) { obj = null; } else { Transform parent3 = parent2.parent; obj = ((parent3 != null) ? new bool?(((Object)parent3).name.Contains("CommandPickerPanel(Clone)")) : ((bool?)null)); } bool? flag = obj; if (flag == true) { return; } } if (((Object)((Component)component).gameObject).name.Contains("Music&More")) { ((Component)component).gameObject.SetActive(false); } ColorBlock colors = ((Selectable)component).colors; ((ColorBlock)(ref colors)).normalColor = buttonNorm.Value; ((ColorBlock)(ref colors)).highlightedColor = buttonHigh.Value; ((ColorBlock)(ref colors)).pressedColor = buttonPress.Value; ((ColorBlock)(ref colors)).selectedColor = buttonSelect.Value; ((ColorBlock)(ref colors)).disabledColor = buttonDisabled.Value; ((Selectable)component).colors = colors; } public override void Config(ConfigFile config) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown enabled = config.Bind<bool>("BNR - UI", "enable patches for button recolors", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_007e: 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_0089: Expected O, but got Unknown //IL_003d: 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_0048: Expected O, but got Unknown if (enabled.Value) { object obj = <>O.<0>__ButtonSkinControllerOnAwake; if (obj == null) { hook_Awake val = ButtonSkinControllerOnAwake; <>O.<0>__ButtonSkinControllerOnAwake = val; obj = (object)val; } ButtonSkinController.Awake += (hook_Awake)obj; object obj2 = <>O.<1>__PanelSkinControllerOnAwake; if (obj2 == null) { hook_Awake val2 = PanelSkinControllerOnAwake; <>O.<1>__PanelSkinControllerOnAwake = val2; obj2 = (object)val2; } PanelSkinController.Awake += (hook_Awake)obj2; } else { object obj3 = <>O.<0>__ButtonSkinControllerOnAwake; if (obj3 == null) { hook_Awake val3 = ButtonSkinControllerOnAwake; <>O.<0>__ButtonSkinControllerOnAwake = val3; obj3 = (object)val3; } ButtonSkinController.Awake -= (hook_Awake)obj3; object obj4 = <>O.<1>__PanelSkinControllerOnAwake; if (obj4 == null) { hook_Awake val4 = PanelSkinControllerOnAwake; <>O.<1>__PanelSkinControllerOnAwake = val4; obj4 = (object)val4; } PanelSkinController.Awake -= (hook_Awake)obj4; } }; colorButtons = config.Bind<bool>("BNR - UI", "change buttons colors", false, "whether or not to use custom menu button colors,..,"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(colorButtons)); buttonNorm = config.Bind<Color>("BNR - UI", "normal button color", Utils.Color255(110, 83, 120), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(buttonNorm)); buttonHigh = config.Bind<Color>("BNR - UI", "highlighted button coor", Utils.Color255(255, 177, 245), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(buttonHigh)); buttonPress = config.Bind<Color>("BNR - UI", "pressed button color", Utils.Color255(192, 113, 182), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(buttonPress)); buttonSelect = config.Bind<Color>("BNR - UI", "selected button color", Utils.Color255(255, 177, 238), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(buttonSelect)); buttonDisabled = config.Bind<Color>("BNR - UI", "disabled button color", Utils.Color255(226, 197, 219), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(buttonDisabled)); } } public class coloredits : PatchBase<coloredits> { private static Dictionary<int, ConfigEntry<Color>> replacementStyleLookupDict = new Dictionary<int, ConfigEntry<Color>>(); private static TMP_StyleSheet styleSheet; private static ConfigEntry<bool> enabled; public override void Init() { ApplyHooks(); } private static void ApplyHooks() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) if (!enabled.Value) { return; } int num = ColorCatalog.indexToColor32.Length - 1; for (int i = 1; i < num; i++) { Color val = Color32.op_Implicit(ColorCatalog.indexToColor32[i]); ConfigEntry<Color> newColor = ((BaseUnityPlugin)butterscotchnroses.instance).Config.Bind<Color>("BNR - coloredits", "new color for " + Enum.GetName(typeof(ColorIndex), i), val, ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(newColor)); int i2 = i; newColor.SettingChanged += delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) ColorCatalog.indexToColor32[i2] = Color32.op_Implicit(newColor.Value); }; ColorCatalog.indexToColor32[i] = Color32.op_Implicit(newColor.Value); } RoR2Application.onLoadFinished = (Action)Delegate.Combine(RoR2Application.onLoadFinished, new Action(OnLoadFinished)); } private static void OnLoadFinished() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<TMP_StyleSheet> val = Addressables.LoadAssetAsync<TMP_StyleSheet>((object)TextMesh_Pro_FormerResources.TMP_Default_Style_Sheet_asset); val.Completed += delegate(AsyncOperationHandle<TMP_StyleSheet> handle) { ConfigApplyStyleSheed(handle.Result); }; static void ConfigApplyStyleSheed(TMP_StyleSheet styleSheet) { //IL_00d6: 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_00f7: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown TMP_Style[] array = styleSheet.styles.ToArray(); Color val2 = default(Color); foreach (TMP_Style tmpStyle in array) { ColorUtility.TryParseHtmlString(tmpStyle.styleOpeningDefinition.Replace("<color=", "").Replace(">", ""), ref val2); ConfigEntry<Color> newColor = ((BaseUnityPlugin)butterscotchnroses.instance).Config.Bind<Color>("BNR - coloredits", "tmp style tag recolor for " + (tmpStyle.name.StartsWith('c') ? tmpStyle.name.Substring(1).Replace(")", "") : tmpStyle.name.Replace(")", "")), val2, ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(newColor)); newColor.SettingChanged += delegate { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown styleSheet.styles.Remove(tmpStyle); TMP_Style item2 = new TMP_Style(tmpStyle.name, "<color=#" + ColorUtility.ToHtmlStringRGBA(newColor.Value) + ">", tmpStyle.styleClosingDefinition); styleSheet.styles.Add(item2); }; styleSheet.styles.Remove(tmpStyle); TMP_Style item = new TMP_Style(tmpStyle.name, "<color=#" + ColorUtility.ToHtmlStringRGBA(newColor.Value) + ">", tmpStyle.styleClosingDefinition); styleSheet.styles.Add(item); } } } public override void Config(ConfigFile config) { enabled = config.Bind<bool>("BNR - coloredits", "enable patches for coloredits", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { ApplyHooks(); }; } } public class cursoredits : PatchBase<cursoredits> { public enum cursorTypes { defaultCursor, cursor1, cursor2, cursor3 } private Texture cursorDefault; private Texture cursorDefaultActive; private Texture cursor1; private Texture cursor1Active; private Texture cursor2; private Texture cursor2Active; private Texture cursor3; private Texture cursor3Active; private ConfigEntry<cursorTypes> cursorType; private ConfigEntry<Color> cursorColor; private ConfigEntry<bool> enabled; public override void Init() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) applyHooks(); cursorDefault = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Core.texCursor_Active_png).WaitForCompletion(); cursorDefaultActive = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Core.texCursor_Inactive_png).WaitForCompletion(); cursor1 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_MiscIcons.texCursor_png).WaitForCompletion(); cursor1Active = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_MiscIcons.texCursor_png).WaitForCompletion(); cursor2 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_MiscIcons.texCursor2_png).WaitForCompletion(); cursor2Active = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_MiscIcons.texCursor2_png).WaitForCompletion(); cursor3 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_MiscIcons.texCursor3_png).WaitForCompletion(); cursor3Active = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_MiscIcons.texCursor3_png).WaitForCompletion(); } private void applyHooks() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown if (enabled.Value) { RoR2Application.onLoadFinished = (Action)Delegate.Combine(RoR2Application.onLoadFinished, new Action(applyCursorEdits)); CursorIndicatorController.SetCursor += new hook_SetCursor(CursorIndicatorControllerOnSetCursor); } else { RoR2Application.onLoadFinished = (Action)Delegate.Remove(RoR2Application.onLoadFinished, new Action(applyCursorEdits)); CursorIndicatorController.SetCursor -= new hook_SetCursor(CursorIndicatorControllerOnSetCursor); } } private void CursorIndicatorControllerOnSetCursor(orig_SetCursor orig, CursorIndicatorController self, CursorSet cursorset, CursorImage cursorimage, Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, cursorset, cursorimage, cursorColor.Value); } private void applyCursorEdits() { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) Texture val = default(Texture); foreach (MPEventSystem instances in MPEventSystem.instancesList) { cursorTypes value = cursorType.Value; switch (value) { case cursorTypes.cursor1: val = cursor1Active; break; case cursorTypes.cursor2: val = cursor2Active; break; case cursorTypes.cursor3: val = cursor3Active; break; case cursorTypes.defaultCursor: val = cursorDefaultActive; break; default: global::<PrivateImplementationDetails>.ThrowSwitchExpressionException(value); break; } Texture val2 = val; value = cursorType.Value; switch (value) { case cursorTypes.cursor1: val = cursor1; break; case cursorTypes.cursor2: val = cursor2; break; case cursorTypes.cursor3: val = cursor3; break; case cursorTypes.defaultCursor: val = cursorDefault; break; default: global::<PrivateImplementationDetails>.ThrowSwitchExpressionException(value); break; } Texture val3 = val; instances.cursorIndicatorController.mouseCursorSet.hoverObject.GetComponent<Image>().sprite = Sprite.Create((Texture2D)(object)((val3 is Texture2D) ? val3 : null), new Rect(0f, 0f, (float)cursor1.width, (float)cursor1.height), new Vector2(0f, 0f)); instances.cursorIndicatorController.mouseCursorSet.pointerObject.GetComponent<Image>().sprite = Sprite.Create((Texture2D)(object)((val2 is Texture2D) ? val2 : null), new Rect(0f, 0f, (float)cursor1.width, (float)cursor1.height), new Vector2(0f, 0f)); instances.cursorIndicatorController.cachedIndicatorColor = cursorColor.Value; instances.cursorIndicatorController.ApplyIndicatorColor(); } } public override void Config(ConfigFile config) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown cursorType = config.Bind<cursorTypes>("BNR - cursoredits", "cursor type ,..,", cursorTypes.defaultCursor, ""); cursorType.SettingChanged += delegate { applyCursorEdits(); }; ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)cursorType)); cursorColor = config.Bind<Color>("BNR - cursoredits", "cursor color ,..,", Color.white, ""); cursorColor.SettingChanged += delegate { applyCursorEdits(); }; ModSettingsManager.AddOption((BaseOption)new ColorOption(cursorColor)); enabled = config.Bind<bool>("BNR - cursoredits", "enable patches for cursoredits", false, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { applyHooks(); }; } } public class drifter : PatchBase<drifter> { private ConfigEntry<bool> enabled; private ConfigEntry<bool> neverKillCubes; private ConfigEntry<int> cubeCount; public override void Init() { if (enabled.Value) { applyHooks(); } } public void applyHooks() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if (enabled.Value && butterscotchnroses.clientSide.Value) { CharacterMaster.GetDeployableSameSlotLimit += new hook_GetDeployableSameSlotLimit(CharacterMasterOnGetDeployableSameSlotLimit); Idle.OnEnter += new hook_OnEnter(IdleOnOnEnter); } else { CharacterMaster.GetDeployableSameSlotLimit -= new hook_GetDeployableSameSlotLimit(CharacterMasterOnGetDeployableSameSlotLimit); Idle.OnEnter -= new hook_OnEnter(IdleOnOnEnter); } } private void IdleOnOnEnter(orig_OnEnter orig, Idle self) { orig.Invoke(self); if (neverKillCubes.Value) { ((EntityState)self).fixedAge = float.NegativeInfinity; } } private int CharacterMasterOnGetDeployableSameSlotLimit(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0007: Unknown result type (might be due to invalid IL or missing references) if ((int)slot != 22) { return orig.Invoke(self, slot); } return cubeCount.Value; } public override void Config(ConfigFile config) { enabled = config.Bind<bool>("BNR - drifter", "enable patches for drifter", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { applyHooks(); }; cubeCount = config.Bind<int>("BNR - drifter", "junk cube count", 20, "limit of junk cubes !!"); Utils.SliderConfig(4, 300, cubeCount); neverKillCubes = config.Bind<bool>("BNR - drifter", "never kill cubes !!!", true, "byeah ,,."); Utils.CheckboxConfig(neverKillCubes); } } public class dronevisibility : PatchBase<dronevisibility> { private ConfigEntry<bool> enabled; private ConfigEntry<bool> useSillyMaterials; private ConfigEntry<Color> sillyMaterialColor; private ConfigEntry<Color> operatorIndicatorColor; private ConfigEntry<float> visibilityDistance; private Material operatorMat; public override void Init() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) operatorMat = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/Drone Tech/matDroneTechCarryRings.mat").WaitForCompletion()); operatorMat.SetColor("_TintColor", operatorIndicatorColor.Value); Hook(); } private void Hook() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown if (enabled.Value) { HologramProjector.BuildHologram += new hook_BuildHologram(HologramProjectorOnBuildHologram); SummonMasterBehavior.OnEnable += new hook_OnEnable(SummonMasterBehaviorOnOnEnable); } else { HologramProjector.BuildHologram -= new hook_BuildHologram(HologramProjectorOnBuildHologram); SummonMasterBehavior.OnEnable -= new hook_OnEnable(SummonMasterBehaviorOnOnEnable); } } private void SummonMasterBehaviorOnOnEnable(orig_OnEnable orig, SummonMasterBehavior self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<DroneAvailability>())) { HologramProjector component = ((Component)self).GetComponent<HologramProjector>(); if (Object.op_Implicit((Object)(object)component)) { component.displayDistance = visibilityDistance.Value; } else { Log.Warning("failed to find projector on drone !!"); } } } private void HologramProjectorOnBuildHologram(orig_BuildHologram orig, HologramProjector self) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_00b5: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent<DroneAvailability>()) || ((Object)((Component)self).gameObject).name.Contains("Turret")) { return; } Texture portraitIcon = ((Component)self).gameObject.GetComponent<SummonMasterBehavior>().masterPrefab.GetComponent<CharacterMaster>().bodyPrefab.GetComponent<CharacterBody>().portraitIcon; Transform val = ((Component)self).gameObject.transform.Find("HologramPivot"); GameObject val2 = new GameObject("HologramSprite"); val2.transform.SetParent(((Component)val).transform); val2.AddComponent<HologramHelper>(); SpriteRenderer val3 = val2.AddComponent<SpriteRenderer>(); val3.sprite = Sprite.Create((Texture2D)(object)((portraitIcon is Texture2D) ? portraitIcon : null), new Rect(0f, 0f, (float)portraitIcon.width, (float)portraitIcon.height), new Vector2(0.5f, 0.5f)); val2.transform.localScale = new Vector3(2f, 2f, 1f); if (useSillyMaterials.Value) { ((Renderer)val3).sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC2.matHalcyoniteShrineCrystalGlow_mat).WaitForCompletion(); ((Renderer)val3).sharedMaterial.SetTexture("_Cloud2Tex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common.texCloudOrganic2_png).WaitForCompletion()); ((Renderer)val3).sharedMaterial.SetTexture("_Cloud1Tex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC2_Child.texChildPrimaryStarCloud_png).WaitForCompletion()); ((Renderer)val3).sharedMaterial.SetColor("_TintColor", sillyMaterialColor.Value); ((Renderer)val3).sharedMaterial.SetInt("_AlphaBias", 0); } GameObject val4 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC3/Drone Tech/CommandCarryTransportVFX.prefab").WaitForCompletion(), val2.transform, true); for (int i = 0; i < val4.transform.childCount; i++) { GameObject gameObject = ((Component)val4.transform.GetChild(i)).gameObject; if (((Object)gameObject).name != "MainRings") { Object.Destroy((Object)(object)gameObject); continue; } gameObject.GetComponent<ParticleSystem>().startSpeed = -10f; ((Renderer)gameObject.GetComponent<ParticleSystemRenderer>()).sharedMaterial = operatorMat; } val4.transform.position = val4.transform.localPosition; val4.transform.localPosition = new Vector3(0f, 0f, 0f); val4.transform.position = new Vector3(val4.transform.position.x, val4.transform.position.y - 3.2f, val4.transform.position.z); } public override void Config(ConfigFile config) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown enabled = config.Bind<bool>("BNR - Drone Visibility", "enable patches for drone visibility", false, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { Hook(); }; useSillyMaterials = config.Bind<bool>("BNR - Drone Visibility", "use silly materials for indicator !!", true, ""); Utils.CheckboxConfig(useSillyMaterials); sillyMaterialColor = config.Bind<Color>("BNR - Drone Visibility", "colors for silly sprite hologram thing material !!", Utils.Color255(191, 126, 211), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(sillyMaterialColor)); operatorIndicatorColor = config.Bind<Color>("BNR - Drone Visibility", "colors for operator vfx thing !!", Utils.Color255(252, 142, 249), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(operatorIndicatorColor)); visibilityDistance = config.Bind<float>("BNR - Drone Visibility", "set distance which hologram becomes visible (set like 99999 for always !!", 99999f, ""); Utils.SliderConfig(15f, 999f, visibilityDistance); } } public class HologramHelper : MonoBehaviour { private Transform hologram; public Vector3 pos; public void OnEnable() { //IL_0023: 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_0058: 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_007e: 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) hologram = ((Component)this).transform.parent.GetChild(0); ((Component)this).transform.position = ((Component)this).transform.localPosition; ((Component)this).transform.localPosition = new Vector3(0f, 0f, 0f); ((Component)this).transform.position = new Vector3(((Component)this).transform.position.x, ((Component)this).transform.position.y + 2f, ((Component)this).transform.position.z); } public void FixedUpdate() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hologram)) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } Vector3 val = default(Vector3); val.x = 0f; val.y = hologram.eulerAngles.y; val.z = hologram.eulerAngles.z; ((Component)this).transform.rotation = Quaternion.Euler(val); } } public class loadingscreen : PatchBase<loadingscreen> { private Dictionary<string, SimpleSpriteAnimation> spriteAnimations = new Dictionary<string, SimpleSpriteAnimation>(); private ConfigEntry<float> chanceForRandom; private ConfigEntry<bool> enabled; public override void Init() { AddSpriteReplacement("CommandoWalk"); AddSpriteReplacement("DroneHover"); AddSpriteReplacement("GolemWalk"); AddSpriteReplacement("LemurianWalk"); AddSpriteReplacement("LoaderWalk"); AddSpriteReplacement("ChildWalk"); applyHooks(); } private void AddSpriteReplacement(string ssaName) { if (((BaseUnityPlugin)butterscotchnroses.instance).Config.Bind<bool>("BNR - loadingscreen", "replace " + ssaName.Replace("Walk", "").Replace("Hover", "") + " on loading screen", true, "").Value) { spriteAnimations.Add(ssaName, butterscotchnroses.bnrBundle.LoadAsset<SimpleSpriteAnimation>(ssaName)); } } private void applyHooks() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown if (enabled.Value && Random.Range(0f, 100f) <= chanceForRandom.Value) { RoR2Application.onUpdate += RoR2ApplicationOnUpdate; LoadingScreenCanvas.OnLoadComplete += new hook_OnLoadComplete(LoadingScreenCanvasOnOnLoadComplete); } if (enabled.Value) { PickRandomObjectOnAwake.OnEnable += new hook_OnEnable(AddBlackBackgroundAndSpriteAnimations); } else { PickRandomObjectOnAwake.OnEnable -= new hook_OnEnable(AddBlackBackgroundAndSpriteAnimations); } void LoadingScreenCanvasOnOnLoadComplete(orig_OnLoadComplete orig, LoadingScreenCanvas self) { orig.Invoke(self); RoR2Application.onUpdate -= RoR2ApplicationOnUpdate; } } private void AddBlackBackgroundAndSpriteAnimations(orig_OnEnable orig, PickRandomObjectOnAwake self) { if (((Object)((Component)self).gameObject).name != "MiniScene") { orig.Invoke(self); return; } GameObject[] objectsToSelect = self.ObjectsToSelect; foreach (GameObject val in objectsToSelect) { if (spriteAnimations.TryGetValue(((Object)val).name, out var value)) { ((Component)val.transform.GetChild(0)).gameObject.GetComponent<SimpleSpriteAnimator>().animation = value; ((Component)val.transform.GetChild(0)).gameObject.GetComponent<Image>().sprite = value.frames[0].sprite; } } orig.Invoke(self); } private void RoR2ApplicationOnUpdate() { if (Object.op_Implicit((Object)(object)LoadingScreenCanvas.Instance?.percentage)) { LoadingScreenCanvas.Instance.percentage.SetPercentValue(Random.Range(int.MinValue, int.MaxValue)); } } public override void Config(ConfigFile config) { enabled = config.Bind<bool>("BNR - loadingscreen", "enable patches for loadingscreen", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { applyHooks(); }; chanceForRandom = config.Bind<float>("BNR - loadingscreen", "chance for loading screen to show random percents for no reason.,.,", 0.5f, "hehe,. .,"); Utils.SliderConfig(0f, 100f, chanceForRandom); } } public class malachite : PatchBase<malachite> { public static GameObject urchinMaster; private ConfigEntry<bool> enabled; public static ConfigEntry<float> timeBetweenSpawns; public override void Init() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) applyHooks(); urchinMaster = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_ElitePoison.UrchinTurretMaster_prefab).WaitForCompletion(); } private void applyHooks() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown if (enabled.Value && butterscotchnroses.clientSide.Value) { CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBodyOnOnBuffFirstStackGained); } else { CharacterBody.OnBuffFirstStackGained -= new hook_OnBuffFirstStackGained(CharacterBodyOnOnBuffFirstStackGained); } } private void CharacterBodyOnOnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (!((Object)(object)buffDef != (Object)(object)Buffs.AffixPoison)) { ((Component)self).gameObject.AddComponent<EvilUrchinSpawner>()._characterBody = self; } } public override void Config(ConfigFile config) { enabled = config.Bind<bool>("BNR - malachite", "enable patches for malachite (have them naturally spawn urchins ,.,.", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { applyHooks(); }; timeBetweenSpawns = config.Bind<float>("BNR - malachite", "time between urchin spawns .,,.", 12f, "byeah.,,"); Utils.SliderConfig(1f, 30f, timeBetweenSpawns); } } public class EvilUrchinSpawner : MonoBehaviour { public CharacterBody _characterBody; private float urchinSpawnTimer; private void OnEnable() { Log.Debug("added urchin spawner !!", 73); } private void FixedUpdate() { //IL_0079: 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_009f: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) urchinSpawnTimer += Time.fixedDeltaTime; if (!(urchinSpawnTimer > malachite.timeBetweenSpawns.Value)) { return; } urchinSpawnTimer = 0f; Log.Debug("spawning urgin !!", 83); if (!Object.op_Implicit((Object)(object)_characterBody) || !_characterBody.HasBuff(Buffs.AffixPoison)) { Log.Debug("uh oh,,", 87); Object.Destroy((Object)(object)this); return; } GameObject val = Object.Instantiate<GameObject>(malachite.urchinMaster, new Vector3(((Component)this).transform.position.x, ((Component)this).transform.position.y + 5f, ((Component)this).transform.position.z), Quaternion.LookRotation(Vector3.up)); CharacterMaster component = val.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = _characterBody.teamComponent.teamIndex; NetworkServer.Spawn(val); component.SpawnBodyHere(); } } } public class pingrecolor : PatchBase<pingrecolor> { private ConfigEntry<Color> pingIndicatorDefault; private ConfigEntry<Color> pingIndicatorEnemy; private ConfigEntry<Color> pingIndicatorInteractable; private ConfigEntry<Color> pingIndicatorCount; private ConfigEntry<bool> enabled; public override void Init() { applyHooks(); } private void applyHooks() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown if (enabled.Value) { PingIndicator.OnEnable += new hook_OnEnable(PingIndicatorOnOnEnable); PingIndicator.RebuildPing += new hook_RebuildPing(PingIndicatorOnRebuildPing); PingIndicator.Start += new hook_Start(PingIndicatorOnStart); PingIndicator.OnPreRenderOutlineHighlight += new hook_OnPreRenderOutlineHighlight(PingIndicatorOnOnPreRenderOutlineHighlight); ChargeIndicatorController.TriggerPing += new hook_TriggerPing(ChargeIndicatorControllerOnTriggerPing); } else { PingIndicator.OnEnable -= new hook_OnEnable(PingIndicatorOnOnEnable); PingIndicator.RebuildPing -= new hook_RebuildPing(PingIndicatorOnRebuildPing); PingIndicator.Start -= new hook_Start(PingIndicatorOnStart); PingIndicator.OnPreRenderOutlineHighlight -= new hook_OnPreRenderOutlineHighlight(PingIndicatorOnOnPreRenderOutlineHighlight); ChargeIndicatorController.TriggerPing -= new hook_TriggerPing(ChargeIndicatorControllerOnTriggerPing); } } private void ChargeIndicatorControllerOnTriggerPing(orig_TriggerPing orig, ChargeIndicatorController self, string pingownername, bool triggeranimation) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) self.playerPingColor = pingIndicatorInteractable.Value; orig.Invoke(self, pingownername, triggeranimation); } private void PingIndicatorOnOnPreRenderOutlineHighlight(orig_OnPreRenderOutlineHighlight orig, PingIndicator self, OutlineHighlight outlinehighlight) { recolorPingIndicator(self); orig.Invoke(self, outlinehighlight); } private void PingIndicatorOnStart(orig_Start orig, PingIndicator self) { recolorPingIndicator(self); orig.Invoke(self); } private void PingIndicatorOnOnEnable(orig_OnEnable orig, PingIndicator self) { recolorPingIndicator(self); orig.Invoke(self); } private void PingIndicatorOnRebuildPing(orig_RebuildPing orig, PingIndicator self) { recolorPingIndicator(self); orig.Invoke(self); } private void recolorPingIndicator(PingIndicator pingIndicator) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_003b: 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_0052: Expected I4, but got Unknown //IL_005a: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0084: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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) pingIndicator.defaultPingColor = pingIndicatorDefault.Value; pingIndicator.enemyPingColor = pingIndicatorEnemy.Value; pingIndicator.interactablePingColor = pingIndicatorInteractable.Value; PingType pingType = pingIndicator.pingType; pingIndicator.pingColor = (Color)((int)pingType switch { 0 => pingIndicatorDefault.Value, 1 => pingIndicatorEnemy.Value, 2 => pingIndicatorInteractable.Value, 3 => pingIndicatorCount.Value, _ => pingIndicator.pingColor, }); pingIndicator.activeColor = pingIndicator.pingColor; ((Component)((Component)pingIndicator).transform.GetChild(0)).GetComponent<ParticleSystem>().startColor = pingIndicatorDefault.Value; ((Component)((Component)pingIndicator).transform.GetChild(1)).GetComponent<ParticleSystem>().startColor = pingIndicatorInteractable.Value; ((Component)((Component)pingIndicator).transform.GetChild(2)).GetComponent<ParticleSystem>().startColor = pingIndicatorEnemy.Value; ((Component)pingIndicator.positionIndicator.alwaysVisibleObject.transform.GetChild(0)).GetComponent<SpriteRenderer>().color = pingIndicatorDefault.Value; ((Component)pingIndicator.positionIndicator.alwaysVisibleObject.transform.GetChild(1)).GetComponent<SpriteRenderer>().color = pingIndicatorEnemy.Value; ((Component)pingIndicator.positionIndicator.alwaysVisibleObject.transform.GetChild(2)).GetComponent<SpriteRenderer>().color = pingIndicatorInteractable.Value; } public override void Config(ConfigFile config) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown enabled = config.Bind<bool>("BNR - pingrecolor", "enable patches for pingrecolor", true, ""); Utils.CheckboxConfig(enabled); enabled.SettingChanged += delegate { applyHooks(); }; pingIndicatorDefault = config.Bind<Color>("BNR - pingrecolor", "ping recolor for default ping !!", Utils.Color255(252, 142, 249), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(pingIndicatorDefault)); pingIndicatorEnemy = config.Bind<Color>("BNR - pingrecolor", "ping recolor for enemy ping !!", Utils.Color255(252, 142, 249), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(pingIndicatorEnemy)); pingIndicatorInteractable = config.Bind<Color>("BNR - pingrecolor", "ping recolor for interactable ping !!", Utils.Color255(252, 142, 249), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(pingIndicatorInteractable)); pingIndicatorCount = config.Bind<Color>("BNR - pingrecolor", "ping recolor for count ping (unsure what this one actually is !! !!", Utils.Color255(252, 142, 249), ""); ModSettingsManager.AddOption((BaseOption)new ColorOption(pingIndicatorCount)); } } public class postprocessing : PatchBase<postprocessing> { private class stagePP { private PostProcessProfile profile; private string forwardFacingName; private string[] stageEditsList = Array.Empty<string>(); public static Dictionary<string, Type> typeStringMatcher = new Dictiona