Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of ColoredMeditateArrows v1.3.0
plugins/ColoredMeditateArrows/ColoredMeditateArrows.dll
Decompiled 6 months agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates.Seeker; using Microsoft.CodeAnalysis; using On.EntityStates.Seeker; using RiskOfOptions; using RiskOfOptions.Options; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ColoredMeditateArrows")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ColoredMeditateArrows")] [assembly: AssemblyTitle("ColoredMeditateArrows")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ColoredMeditateArrows { [BepInPlugin("SirFrogsAlot.ColoredMeditateArrows", "ColoredMeditateArrows", "1.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ExamplePlugin : BaseUnityPlugin { public const string PluginGUID = "SirFrogsAlot.ColoredMeditateArrows"; public const string PluginAuthor = "SirFrogsAlot"; public const string PluginName = "ColoredMeditateArrows"; public const string PluginVersion = "1.3.0"; private ConfigEntry<Color> upArrowColor; private ConfigEntry<Color> downArrowColor; private ConfigEntry<Color> rightArrowColor; private ConfigEntry<Color> leftArrowColor; private ConfigEntry<Color> completedColor; private Color completedArrowColor; public void Awake() { //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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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 Log.Init(((BaseUnityPlugin)this).Logger); completedArrowColor = new Color(255f, 233f, 124f); ConfigOptions(); Meditate.SetupInputUIIcons += new hook_SetupInputUIIcons(OnEntityStates_Seeker_Meditate_SetupInputUIIcons); Meditate.UpdateUIInputSequence += new hook_UpdateUIInputSequence(OnEntityStates_Seeker_Meditate_UpdateUIInputSequence); } private void ConfigOptions() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown upArrowColor = ((BaseUnityPlugin)this).Config.Bind<Color>("General", "Up Arrow", Color.red, "Color Picker to modify Up Arrow"); downArrowColor = ((BaseUnityPlugin)this).Config.Bind<Color>("General", "Down Arrow", Color.blue, "Color Picker to modify Down Arrow"); rightArrowColor = ((BaseUnityPlugin)this).Config.Bind<Color>("General", "Right Arrow", Color.yellow, "Color Picker to modify Right Arrow"); leftArrowColor = ((BaseUnityPlugin)this).Config.Bind<Color>("General", "Left Arrow", Color.green, "Color Picker to modify Up Arrow"); completedColor = ((BaseUnityPlugin)this).Config.Bind<Color>("General", "Completed Arrow", completedArrowColor, "Color Picker to modify the Completed Arrow"); ModSettingsManager.AddOption((BaseOption)new ColorOption(upArrowColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(downArrowColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(rightArrowColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(leftArrowColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(completedColor)); } private void OnEntityStates_Seeker_Meditate_SetupInputUIIcons(orig_SetupInputUIIcons orig, Meditate self) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); for (int i = 0; i < 5; i++) { switch (self.seekerController.meditationStepAndSequence[i + 1]) { case 0: ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>()).color = upArrowColor.Value; break; case 1: ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>()).color = downArrowColor.Value; break; case 2: ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>()).color = rightArrowColor.Value; break; case 3: ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>()).color = leftArrowColor.Value; break; } } } private void OnEntityStates_Seeker_Meditate_UpdateUIInputSequence(orig_UpdateUIInputSequence orig, Meditate self) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); for (int i = 0; i < self.seekerController.meditationInputStep; i++) { ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>()).color = completedColor.Value; } } private void Update() { } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _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); } } }