using System; using System.Collections.Generic; 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 CustomGrabColour.Config; using CustomGrabColour.PlayerGrabBeam; using HarmonyLib; using MenuLib; using MenuLib.MonoBehaviors; using Microsoft.CodeAnalysis; using Photon.Pun; using TMPro; 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: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("Autodesk.Fbx")] [assembly: IgnoresAccessChecksTo("Discord.Sdk")] [assembly: IgnoresAccessChecksTo("Domain_Reload")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("FbxBuildTestAssets")] [assembly: IgnoresAccessChecksTo("Klattersynth")] [assembly: IgnoresAccessChecksTo("Photon3Unity3D")] [assembly: IgnoresAccessChecksTo("PhotonChat")] [assembly: IgnoresAccessChecksTo("PhotonRealtime")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Utilities")] [assembly: IgnoresAccessChecksTo("PhotonVoice.API")] [assembly: IgnoresAccessChecksTo("PhotonVoice")] [assembly: IgnoresAccessChecksTo("PhotonVoice.PUN")] [assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime.Public")] [assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Attributes")] [assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Modules.Unity.Addressables")] [assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Modules.UnityLocalization")] [assembly: IgnoresAccessChecksTo("Sirenix.Serialization.Config")] [assembly: IgnoresAccessChecksTo("Sirenix.Serialization")] [assembly: IgnoresAccessChecksTo("Sirenix.Utilities")] [assembly: IgnoresAccessChecksTo("Unity.Addressables")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.Formats.Fbx.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.InternalAPIEngineBridge.013")] [assembly: IgnoresAccessChecksTo("Unity.Localization")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.MemoryProfiler")] [assembly: IgnoresAccessChecksTo("Unity.Postprocessing.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.ResourceManager")] [assembly: IgnoresAccessChecksTo("Unity.ScriptableBuildPipeline")] [assembly: IgnoresAccessChecksTo("Unity.Splines")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Antlr3.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Core")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Flow")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.State")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("websocket-sharp")] [assembly: AssemblyCompany("Enchanted_Games")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("2.3.0.0")] [assembly: AssemblyInformationalVersion("2.3.0+622d90efc5044cae354f99c6570baf89e82b124a")] [assembly: AssemblyProduct("CustomGrabColour")] [assembly: AssemblyTitle("CustomGrabColour")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.3.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 CustomGrabColour { public static class PluginInfo { public const string PluginID = "CustomGrabColour"; public const string PluginName = "CustomGrabColour"; public const string PluginVersion = "2.4.0"; public const string PluginGuid = "games.enchanted.CustomGrabColour"; } [BepInPlugin("games.enchanted.CustomGrabColour", "CustomGrabColour", "2.4.0")] public class Plugin : BaseUnityPlugin { private ManualLogSource _pluginLogger; public static Plugin Instance { get; private set; } public static void LogMessageIfDebug(object message) { if (CustomGrabColourConfig.EnableDebugLogs.Value) { Instance._pluginLogger.LogMessage((object)("CustomGrabColour Debug: " + message)); } } public static void LogMessage(object message) { Instance._pluginLogger.LogMessage((object)("CustomGrabColour: " + message)); } public static void LogError(object message) { Instance._pluginLogger.LogError((object)("CustomGrabColour Debug: " + message)); } public static void LogErrorIfDebug(object message) { if (CustomGrabColourConfig.EnableDebugLogs.Value) { Instance._pluginLogger.LogError((object)("CustomGrabColour: " + message)); } } public static void LogWarning(object message) { Instance._pluginLogger.LogWarning((object)("CustomGrabColour: " + message)); } private void Awake() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown Instance = this; _pluginLogger = ((BaseUnityPlugin)this).Logger; _pluginLogger.LogInfo((object)"Loading plugin CustomGrabColour! (games.enchanted.CustomGrabColour)"); CustomGrabColourConfig.Init(((BaseUnityPlugin)this).Config); Harmony val = new Harmony("games.enchanted.CustomGrabColour"); val.PatchAll(); ConfigMenu.Init(); _pluginLogger.LogInfo((object)"Loading finished for CustomGrabColour! (games.enchanted.CustomGrabColour)"); } } } namespace CustomGrabColour.PlayerGrabBeam { public class CustomGrabBeamColour : MonoBehaviour, IPunObservable { internal static GrabBeamColourSettings LocalNeutralColour; internal static GrabBeamColourSettings LocalHealingColour; internal static GrabBeamColourSettings LocalRotatingColour; internal static GrabBeamColourSettings LocalClimbingColour; internal GrabBeamColourSettings CurrentNeutralColour = new GrabBeamColourSettings(CustomGrabColourConfig.NeutralDefaultColour, matchSkin: false, GrabBeamColourSettings.BeamType.Neutral); internal GrabBeamColourSettings CurrentHealingColour = new GrabBeamColourSettings(CustomGrabColourConfig.HealingDefaultColour, matchSkin: false, GrabBeamColourSettings.BeamType.Heal); internal GrabBeamColourSettings CurrentRotatingColour = new GrabBeamColourSettings(CustomGrabColourConfig.RotatingDefaultColour, matchSkin: false, GrabBeamColourSettings.BeamType.Rotate); internal GrabBeamColourSettings CurrentClimbingColour = new GrabBeamColourSettings(CustomGrabColourConfig.ClimbingDefaultColour, matchSkin: false, GrabBeamColourSettings.BeamType.Climb); internal bool SentInitialColourUpdate = false; public PlayerAvatar player; public static GrabBeamColourSettings LocalBeamColour { get { throw new NotImplementedException("Tried to get field LocalBeamColour, call GetLocalSettingsForBeamType instead"); } set { switch (value.CurrentBeamType) { case GrabBeamColourSettings.BeamType.Neutral: LocalNeutralColour = value; break; case GrabBeamColourSettings.BeamType.Heal: LocalHealingColour = value; break; case GrabBeamColourSettings.BeamType.Rotate: LocalRotatingColour = value; break; case GrabBeamColourSettings.BeamType.Climb: LocalClimbingColour = value; break; } } } public GrabBeamColourSettings CurrentBeamColour { get { throw new NotImplementedException("Tried to get field CurrentBeamColour, call GetSettingsForBeamType instead"); } set { switch (value.CurrentBeamType) { case GrabBeamColourSettings.BeamType.Neutral: CurrentNeutralColour = value; break; case GrabBeamColourSettings.BeamType.Heal: CurrentHealingColour = value; break; case GrabBeamColourSettings.BeamType.Rotate: CurrentRotatingColour = value; break; case GrabBeamColourSettings.BeamType.Climb: CurrentClimbingColour = value; break; } } } public static GrabBeamColourSettings GetLocalSettingsForBeamType(GrabBeamColourSettings.BeamType beamType) { return beamType switch { GrabBeamColourSettings.BeamType.Heal => LocalHealingColour, GrabBeamColourSettings.BeamType.Rotate => LocalRotatingColour, GrabBeamColourSettings.BeamType.Climb => LocalClimbingColour, _ => LocalNeutralColour, }; } public GrabBeamColourSettings GetSettingsForBeamType(GrabBeamColourSettings.BeamType beamType) { return beamType switch { GrabBeamColourSettings.BeamType.Rotate => CurrentRotatingColour, GrabBeamColourSettings.BeamType.Heal => CurrentHealingColour, GrabBeamColourSettings.BeamType.Climb => CurrentClimbingColour, _ => CurrentNeutralColour, }; } private void Awake() { player = ((Component)this).gameObject.GetComponent(); } public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) { throw new NotImplementedException(); } public static void SaveLocalColoursToConfig() { CustomGrabColourConfig.SaveColour(LocalNeutralColour); CustomGrabColourConfig.SaveColour(LocalRotatingColour); CustomGrabColourConfig.SaveColour(LocalHealingColour); CustomGrabColourConfig.SaveColour(LocalClimbingColour); } public static void ResetBeamColours() { //IL_0001: 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_0049: 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) LocalNeutralColour = new GrabBeamColourSettings(CustomGrabColourConfig.NeutralDefaultColour, (bool)((ConfigEntryBase)CustomGrabColourConfig.NeutralGrabBeam.MatchSkin).DefaultValue, GrabBeamColourSettings.BeamType.Neutral); LocalRotatingColour = new GrabBeamColourSettings(CustomGrabColourConfig.RotatingDefaultColour, (bool)((ConfigEntryBase)CustomGrabColourConfig.RotatingGrabBeam.MatchSkin).DefaultValue, GrabBeamColourSettings.BeamType.Rotate); LocalHealingColour = new GrabBeamColourSettings(CustomGrabColourConfig.HealingDefaultColour, (bool)((ConfigEntryBase)CustomGrabColourConfig.HealingGrabBeam.MatchSkin).DefaultValue, GrabBeamColourSettings.BeamType.Heal); LocalClimbingColour = new GrabBeamColourSettings(CustomGrabColourConfig.ClimbingDefaultColour, (bool)((ConfigEntryBase)CustomGrabColourConfig.ClimbingGrabBeam.MatchSkin).DefaultValue, GrabBeamColourSettings.BeamType.Climb); UpdateBeamColourForAllBeams(); } public static void UpdateBeamColour(GrabBeamColourSettings newColour) { newColour.a = CustomGrabColourConfig.ClampOpacity(newColour.a); LocalBeamColour = newColour; UpdateBeamColour(newColour.CurrentBeamType); } public static void UpdateBeamColourForAllBeams() { foreach (GrabBeamColourSettings.BeamType value in Enum.GetValues(typeof(GrabBeamColourSettings.BeamType))) { UpdateBeamColour(value); } } public static void UpdateBeamColour(GrabBeamColourSettings.BeamType beamType) { GrabBeamColourSettings localSettingsForBeamType = GetLocalSettingsForBeamType(beamType); if (GameManager.Multiplayer()) { PlayerAvatar.instance.photonView.RPC("SetBeamColourRPC", (RpcTarget)3, GrabBeamColourSettings.ToRPCBuffer(localSettingsForBeamType)); } else { ((Component)PlayerAvatar.instance).GetComponent().SetBeamColourRPC(GrabBeamColourSettings.ToRPCBuffer(localSettingsForBeamType)); } } [PunRPC] public void SetBeamColourRPC(object[] beamColourParts) { GrabBeamColourSettings currentBeamColour = GrabBeamColourSettings.FromRPCBuffer(beamColourParts); Plugin.LogMessageIfDebug("SetBeamColourRPC called with values: r:" + currentBeamColour.r + ", g:" + currentBeamColour.g + ", b:" + currentBeamColour.b + ", a:" + currentBeamColour.a + ", matchSkin:" + currentBeamColour.MatchSkin + ", beamType:" + currentBeamColour.CurrentBeamType); currentBeamColour.a = CustomGrabColourConfig.ClampOpacity(currentBeamColour.a); CurrentBeamColour = currentBeamColour; if (currentBeamColour.CurrentBeamType != 0) { return; } Type typeFromHandle = typeof(PhysGrabber); try { FieldInfo field = typeFromHandle.GetField("prevColorState", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(player.physGrabber, -1); } } catch (Exception ex) { Plugin.LogErrorIfDebug("Error while setting field 'prevColorState', this is probably harmless.\n" + ex); } try { MethodInfo method = typeFromHandle.GetMethod("ColorStates", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(player.physGrabber, null); } } catch (Exception ex2) { Plugin.LogErrorIfDebug("Error while calling method 'ColorStates', this is probably harmless.\n" + ex2); } } private static Color GetGrabberCosmeticMaterial(PlayerCosmetics cosmetics, Color fallback) { //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_0058: 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_0074: Unknown result type (might be due to invalid IL or missing references) int num = cosmetics.colorsEquipped[13]; if (num < 0 || num >= MetaManager.instance.colors.Count) { Plugin.LogWarning($"[CustomGrabBeamColour] colourId {num} somehow out of range 0..{MetaManager.instance.colors.Count - 1}"); return fallback; } return MetaManager.instance.colors[num].color; } public Color GetGrabberCosmeticColour(Color fallbackColour) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return GetGrabberCosmeticMaterial(player.playerCosmetics, fallbackColour); } public static Color GetLocalGrabberCosmeticColour(Color fallbackColour) { //IL_000b: 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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return GetGrabberCosmeticMaterial(PlayerAvatar.instance.playerCosmetics, fallbackColour); } } public struct GrabBeamColourSettings { public enum BeamType : byte { Neutral, Heal, Rotate, Climb } public Color Colour; public bool MatchSkin; public readonly BeamType CurrentBeamType; public float r { get { return Colour.r; } set { Colour.r = value; } } public float g { get { return Colour.g; } set { Colour.g = value; } } public float b { get { return Colour.b; } set { Colour.b = value; } } public float a { get { return Colour.a; } set { Colour.a = value; } } public GrabBeamColourSettings(Color colour, bool matchSkin, BeamType currentBeamType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) Colour = colour; MatchSkin = matchSkin; CurrentBeamType = currentBeamType; } public static object[] ToRPCBuffer(GrabBeamColourSettings beamColour) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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) //IL_001e: 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_003a: Unknown result type (might be due to invalid IL or missing references) Color colour = beamColour.Colour; return new object[6] { colour.r, colour.g, colour.b, colour.a, beamColour.MatchSkin, (byte)beamColour.CurrentBeamType }; } public static GrabBeamColourSettings FromRPCBuffer(object[] rpcBuffer) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) if (!(rpcBuffer[0] is float) || !(rpcBuffer[1] is float) || !(rpcBuffer[2] is float) || !(rpcBuffer[3] is float) || !(rpcBuffer[4] is bool) || !(rpcBuffer[5] is byte)) { throw new ArgumentException("FromRPCBuffer recieved incorrect parameters"); } Color colour = default(Color); ((Color)(ref colour))..ctor((float)rpcBuffer[0], (float)rpcBuffer[1], (float)rpcBuffer[2], (float)rpcBuffer[3]); return new GrabBeamColourSettings(colour, (bool)rpcBuffer[4], (BeamType)rpcBuffer[5]); } } public static class GrabBeamUtil { private static void TrySendBeamColourUpdate(PlayerAvatar player, GrabBeamColourSettings.BeamType beamType) { CustomGrabBeamColour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { CustomGrabBeamColour.UpdateBeamColour(beamType); } } public static void TrySendBeamColourUpdateForAllBeams(PlayerAvatar player) { foreach (GrabBeamColourSettings.BeamType value in Enum.GetValues(typeof(GrabBeamColourSettings.BeamType))) { TrySendBeamColourUpdate(player, value); } } } } namespace CustomGrabColour.Patch { [HarmonyPatch(typeof(MetaManager))] internal abstract class MetaManagerPatches { [HarmonyPostfix] [HarmonyPatch("CosmeticColorSet")] public static void CosmeticColorSetPostfix(MetaManager __instance, int _index, int _colorID) { if (_index == 13 && !((Object)(object)PlayerAvatar.instance == (Object)null)) { GrabBeamUtil.TrySendBeamColourUpdateForAllBeams(PlayerAvatar.instance); } } } internal abstract class PhysGrabberPatchHolder { [HarmonyPatch(typeof(PhysGrabber))] internal abstract class PhysGrabberPatches { [HarmonyPrefix] [HarmonyPatch("ColorStateSetColor")] private static void ColorStateSetColorPrefix(PhysGrabber __instance, ref Color mainColor, ref Color emissionColor) { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) int num = PrevColorStateRef.Invoke(__instance); CustomGrabBeamColour currentGrabBeamColour = GetCurrentGrabBeamColour(__instance); if ((Object)(object)currentGrabBeamColour == (Object)null) { Plugin.LogMessageIfDebug("Player has no custom beam colour"); ResetRotateBeamGridsColour(__instance); return; } GrabBeamColourSettings grabBeamColourSettings; switch (num) { case 0: grabBeamColourSettings = currentGrabBeamColour.CurrentNeutralColour; break; case 1: grabBeamColourSettings = currentGrabBeamColour.CurrentHealingColour; break; case 2: grabBeamColourSettings = currentGrabBeamColour.CurrentRotatingColour; break; case 3: grabBeamColourSettings = currentGrabBeamColour.CurrentClimbingColour; break; default: ResetRotateBeamGridsColour(__instance); return; } Color val; if (grabBeamColourSettings.MatchSkin) { val = currentGrabBeamColour.GetGrabberCosmeticColour(grabBeamColourSettings.Colour); val.a = grabBeamColourSettings.Colour.a; } else { val = grabBeamColourSettings.Colour; } mainColor.r = val.r / 3.5f; mainColor.g = val.g / 4f; mainColor.b = val.b / 3.5f; mainColor.a = val.a; emissionColor.r = val.r / 3.5f; emissionColor.g = val.g / 4f; emissionColor.b = val.b / 3.5f; emissionColor.a = 0.3f; Plugin.LogMessageIfDebug("Set player '" + __instance.playerAvatar.playerName + "' beam to: (" + mainColor.r + ", " + mainColor.g + ", " + mainColor.b + ", " + mainColor.a + "). colour state is " + num); SetRotateBeamGridsColour(__instance, val); } [HarmonyPrefix] [HarmonyPatch("ChangeBeamAlpha")] private static bool CancelAlphaChange() { return false; } [HarmonyPrefix] [HarmonyPatch("PhysGrabBeamActivate")] private static void PhysGrabBeamActivatePrefix(PhysGrabber __instance) { CustomGrabBeamColour currentGrabBeamColour = GetCurrentGrabBeamColour(__instance); if (!currentGrabBeamColour.SentInitialColourUpdate) { bool flag; try { FieldInfo field = ((object)__instance).GetType().GetField("physGrabBeamActive", BindingFlags.Instance | BindingFlags.NonPublic); flag = !(field != null) || (bool)field.GetValue(__instance); } catch (Exception) { Plugin.LogMessageIfDebug("Failed to get value of PhysGrabber physGrabBeamActive field"); flag = true; } if (!flag) { Plugin.LogMessageIfDebug("PhysGrabBeamActivate called"); GrabBeamUtil.TrySendBeamColourUpdateForAllBeams(__instance.playerAvatar); currentGrabBeamColour.SentInitialColourUpdate = true; } } } } private static readonly FieldRef> PhysGrabPointVisualGridObjectsRef = AccessTools.FieldRefAccess>("physGrabPointVisualGridObjects"); private static readonly FieldRef PrevColorStateRef = AccessTools.FieldRefAccess("prevColorState"); private static readonly int EmissionColor = Shader.PropertyToID("_EmissionColor"); private static CustomGrabBeamColour GetCurrentGrabBeamColour(PhysGrabber grabber) { return ((Component)grabber.playerAvatar).GetComponent(); } private static void ResetRotateBeamGridsColour(PhysGrabber __instance) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) SetRotateBeamGridsColour(__instance, CustomGrabColourConfig.RotatingDefaultColour); } private static void SetRotateBeamGridsColour(PhysGrabber __instance, Color gridColour) { //IL_0046: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_008c: 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_00b4: 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_00d3: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_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) List list = PhysGrabPointVisualGridObjectsRef.Invoke(__instance); Color color = default(Color); Color val = default(Color); foreach (GameObject item in list) { Material material = ((Renderer)item.GetComponent()).material; if (Object.op_Implicit((Object)(object)material)) { ((Color)(ref color))..ctor(gridColour.r / 3.5f, gridColour.g / 4f, gridColour.b / 3.5f, gridColour.a); material.color = color; ((Color)(ref val))..ctor(gridColour.r / 3.5f, gridColour.g / 4f, gridColour.b / 3.5f, 0.3f); material.SetColor(EmissionColor, val); Plugin.LogMessageIfDebug("Set grid mesh to: (" + material.color.r + ", " + material.color.g + ", " + material.color.b + ", " + material.color.a + ")"); } } } } [HarmonyPatch(typeof(PlayerAvatar))] internal abstract class PlayerAvatarPatches { [HarmonyPostfix] [HarmonyPatch("Awake")] public static void AwakePostfix(PlayerAvatar __instance) { if (!((Object)(object)((Component)__instance).GetComponent() != (Object)null)) { ((Component)__instance).gameObject.AddComponent(); } } } } namespace CustomGrabColour.Config { internal static class ConfigMenu { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static BuilderDelegate <>9__9_0; public static BuilderDelegate <>9__9_1; public static BuilderDelegate <>9__9_2; public static BuilderDelegate <>9__10_0; public static ScrollViewBuilderDelegate <>9__10_1; public static Action <>9__10_26; public static ScrollViewBuilderDelegate <>9__10_2; public static Action <>9__10_27; public static ScrollViewBuilderDelegate <>9__10_3; public static Action <>9__10_28; public static ScrollViewBuilderDelegate <>9__10_4; public static Action <>9__10_29; public static ScrollViewBuilderDelegate <>9__10_5; public static Action <>9__10_30; public static ScrollViewBuilderDelegate <>9__10_6; public static ScrollViewBuilderDelegate <>9__10_7; public static Action <>9__10_31; public static ScrollViewBuilderDelegate <>9__10_8; public static Action <>9__10_32; public static ScrollViewBuilderDelegate <>9__10_9; public static Action <>9__10_33; public static ScrollViewBuilderDelegate <>9__10_10; public static Action <>9__10_34; public static ScrollViewBuilderDelegate <>9__10_11; public static Action <>9__10_35; public static ScrollViewBuilderDelegate <>9__10_12; public static ScrollViewBuilderDelegate <>9__10_13; public static Action <>9__10_36; public static ScrollViewBuilderDelegate <>9__10_14; public static Action <>9__10_37; public static ScrollViewBuilderDelegate <>9__10_15; public static Action <>9__10_38; public static ScrollViewBuilderDelegate <>9__10_16; public static Action <>9__10_39; public static ScrollViewBuilderDelegate <>9__10_17; public static Action <>9__10_40; public static ScrollViewBuilderDelegate <>9__10_18; public static ScrollViewBuilderDelegate <>9__10_19; public static Action <>9__10_41; public static ScrollViewBuilderDelegate <>9__10_20; public static Action <>9__10_42; public static ScrollViewBuilderDelegate <>9__10_21; public static Action <>9__10_43; public static ScrollViewBuilderDelegate <>9__10_22; public static Action <>9__10_44; public static ScrollViewBuilderDelegate <>9__10_23; public static Action <>9__10_45; public static ScrollViewBuilderDelegate <>9__10_24; internal void b__9_0(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Change Grab Colour", (Action)OpenPopup, parent, new Vector2(28.3f, 350f)); } internal void b__9_1(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Change Grab Colour", (Action)OpenPopup, parent, new Vector2(28.3f, 350f)); } internal void b__9_2(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Change Grab Colour", (Action)OpenPopup, parent, new Vector2(28.3f, 350f)); } internal void b__10_0(Transform parent) { //IL_0032: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) float verticalPos = GetVerticalPos(0); float verticalPos2 = GetVerticalPos(1); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(0.5f, 0.5f); REPOLabel val2 = MenuAPI.CreateREPOLabel("Neutral Colour Preview", parent, new Vector2(455f, verticalPos - 60f)); ((Component)val2).transform.localScale = Vector2.op_Implicit(val); ((Component)val2).transform.SetPositionAndRotation(new Vector3(455f - ((TMP_Text)val2.labelTMP).GetPreferredWidth() / 4f, ((Component)val2).transform.position.y, ((Component)val2).transform.position.z), ((Component)val2).transform.rotation); if (!Object.op_Implicit((Object)(object)_neutralGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(455f, verticalPos), out _neutralGrabColourPreviewParent, out _neutralGrabColourPreviewImage); } REPOLabel val3 = MenuAPI.CreateREPOLabel("Rotating Colour Preview", parent, new Vector2(455f, verticalPos2 - 60f)); ((Component)val3).transform.localScale = Vector2.op_Implicit(val); ((Component)val3).transform.SetPositionAndRotation(new Vector3(455f - ((TMP_Text)val3.labelTMP).GetPreferredWidth() / 4f, ((Component)val3).transform.position.y, ((Component)val3).transform.position.z), ((Component)val3).transform.rotation); if (!Object.op_Implicit((Object)(object)_rotatingGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(455f, verticalPos2), out _rotatingGrabColourPreviewParent, out _rotatingGrabColourPreviewImage); } REPOLabel val4 = MenuAPI.CreateREPOLabel("Healing Colour Preview", parent, new Vector2(605f, verticalPos - 60f)); ((Component)val4).transform.localScale = Vector2.op_Implicit(val); ((Component)val4).transform.SetPositionAndRotation(new Vector3(605f - ((TMP_Text)val4.labelTMP).GetPreferredWidth() / 4f, ((Component)val4).transform.position.y, ((Component)val4).transform.position.z), ((Component)val4).transform.rotation); if (!Object.op_Implicit((Object)(object)_healingGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(605f, verticalPos), out _healingGrabColourPreviewParent, out _healingGrabColourPreviewImage); } REPOLabel val5 = MenuAPI.CreateREPOLabel("Climbing Colour Preview", parent, new Vector2(605f, verticalPos2 - 60f)); ((Component)val5).transform.localScale = Vector2.op_Implicit(val); ((Component)val5).transform.SetPositionAndRotation(new Vector3(605f - ((TMP_Text)val5.labelTMP).GetPreferredWidth() / 4f, ((Component)val5).transform.position.y, ((Component)val5).transform.position.z), ((Component)val5).transform.rotation); if (!Object.op_Implicit((Object)(object)_climbingGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(605f, verticalPos2), out _climbingGrabColourPreviewParent, out _climbingGrabColourPreviewImage); } } internal RectTransform b__10_1(Transform parent) { //IL_0012: 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) REPOLabel val = MenuAPI.CreateREPOLabel("Neutral Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(0))); ((Component)val).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val).rectTransform; } internal RectTransform b__10_2(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.r = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.r = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } }, CustomGrabBeamColour.LocalNeutralColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(1))); return ((REPOElement)val).rectTransform; } internal void b__10_26(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.r = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.r = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } } internal RectTransform b__10_3(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.g = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.g = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } }, CustomGrabBeamColour.LocalNeutralColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(2))); return ((REPOElement)val).rectTransform; } internal void b__10_27(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.g = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.g = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } } internal RectTransform b__10_4(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.b = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.b = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } }, CustomGrabBeamColour.LocalNeutralColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(3))); return ((REPOElement)val).rectTransform; } internal void b__10_28(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.b = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.b = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } } internal RectTransform b__10_5(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalNeutralColour.a = f; Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.a = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; }, CustomGrabBeamColour.LocalNeutralColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(4))); return ((REPOElement)val).rectTransform; } internal void b__10_29(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalNeutralColour.a = f; Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.a = f; ((Graphic)_neutralGrabColourPreviewImage).color = color; } internal RectTransform b__10_6(Transform parent) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) REPOToggle val2 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalNeutralColour.MatchSkin = val; HandleNeutralSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(5)), "Yes", "No", CustomGrabBeamColour.LocalNeutralColour.MatchSkin); return ((REPOElement)val2).rectTransform; } internal void b__10_30(bool val) { CustomGrabBeamColour.LocalNeutralColour.MatchSkin = val; HandleNeutralSkinMatchChange(); } internal RectTransform b__10_7(Transform parent) { //IL_0012: 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) REPOLabel val = MenuAPI.CreateREPOLabel("Rotating Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(6))); ((Component)val).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val).rectTransform; } internal RectTransform b__10_8(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.r = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.r = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } }, CustomGrabBeamColour.LocalRotatingColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(7))); return ((REPOElement)val).rectTransform; } internal void b__10_31(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.r = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.r = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } } internal RectTransform b__10_9(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.g = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.g = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } }, CustomGrabBeamColour.LocalRotatingColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(8))); return ((REPOElement)val).rectTransform; } internal void b__10_32(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.g = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.g = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } } internal RectTransform b__10_10(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.b = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.b = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } }, CustomGrabBeamColour.LocalRotatingColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(9))); return ((REPOElement)val).rectTransform; } internal void b__10_33(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.b = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.b = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } } internal RectTransform b__10_11(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalRotatingColour.a = f; Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.a = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); }, CustomGrabBeamColour.LocalRotatingColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(10))); return ((REPOElement)val).rectTransform; } internal void b__10_34(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalRotatingColour.a = f; Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.a = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color; HandleRotatingSkinMatchChange(); } internal RectTransform b__10_12(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) REPOToggle val2 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalRotatingColour.MatchSkin = val; HandleRotatingSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(11)), "Yes", "No", CustomGrabBeamColour.LocalRotatingColour.MatchSkin); return ((REPOElement)val2).rectTransform; } internal void b__10_35(bool val) { CustomGrabBeamColour.LocalRotatingColour.MatchSkin = val; HandleRotatingSkinMatchChange(); } internal RectTransform b__10_13(Transform parent) { //IL_0012: 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) REPOLabel val = MenuAPI.CreateREPOLabel("Healing Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(6))); ((Component)val).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val).rectTransform; } internal RectTransform b__10_14(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.r = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.r = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } }, CustomGrabBeamColour.LocalHealingColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(7))); return ((REPOElement)val).rectTransform; } internal void b__10_36(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.r = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.r = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } } internal RectTransform b__10_15(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.g = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.g = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } }, CustomGrabBeamColour.LocalHealingColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(8))); return ((REPOElement)val).rectTransform; } internal void b__10_37(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.g = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.g = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } } internal RectTransform b__10_16(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.b = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.b = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } }, CustomGrabBeamColour.LocalHealingColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(9))); return ((REPOElement)val).rectTransform; } internal void b__10_38(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.b = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.b = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } } internal RectTransform b__10_17(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalHealingColour.a = f; Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.a = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); }, CustomGrabBeamColour.LocalHealingColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(10))); return ((REPOElement)val).rectTransform; } internal void b__10_39(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalHealingColour.a = f; Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.a = f; ((Graphic)_healingGrabColourPreviewImage).color = color; HandleHealingSkinMatchChange(); } internal RectTransform b__10_18(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) REPOToggle val2 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalHealingColour.MatchSkin = val; HandleHealingSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(11)), "Yes", "No", CustomGrabBeamColour.LocalHealingColour.MatchSkin); return ((REPOElement)val2).rectTransform; } internal void b__10_40(bool val) { CustomGrabBeamColour.LocalHealingColour.MatchSkin = val; HandleHealingSkinMatchChange(); } internal RectTransform b__10_19(Transform parent) { //IL_0012: 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) REPOLabel val = MenuAPI.CreateREPOLabel("Climbing Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(6))); ((Component)val).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val).rectTransform; } internal RectTransform b__10_20(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.r = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.r = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } }, CustomGrabBeamColour.LocalClimbingColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(7))); return ((REPOElement)val).rectTransform; } internal void b__10_41(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.r = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.r = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } } internal RectTransform b__10_21(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.g = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.g = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } }, CustomGrabBeamColour.LocalClimbingColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(8))); return ((REPOElement)val).rectTransform; } internal void b__10_42(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.g = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.g = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } } internal RectTransform b__10_22(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.b = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.b = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } }, CustomGrabBeamColour.LocalClimbingColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(9))); return ((REPOElement)val).rectTransform; } internal void b__10_43(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.b = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.b = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } } internal RectTransform b__10_23(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalClimbingColour.a = f; Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.a = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); }, CustomGrabBeamColour.LocalClimbingColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(10))); return ((REPOElement)val).rectTransform; } internal void b__10_44(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalClimbingColour.a = f; Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.a = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); } internal RectTransform b__10_24(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) REPOToggle val2 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalClimbingColour.MatchSkin = val; HandleClimbingSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(11)), "Yes", "No", CustomGrabBeamColour.LocalClimbingColour.MatchSkin); return ((REPOElement)val2).rectTransform; } internal void b__10_45(bool val) { CustomGrabBeamColour.LocalClimbingColour.MatchSkin = val; HandleClimbingSkinMatchChange(); } } private static Image _neutralGrabColourPreviewImage; private static GameObject _neutralGrabColourPreviewParent; private static Image _rotatingGrabColourPreviewImage; private static GameObject _rotatingGrabColourPreviewParent; private static Image _healingGrabColourPreviewImage; private static GameObject _healingGrabColourPreviewParent; private static Image _climbingGrabColourPreviewImage; private static GameObject _climbingGrabColourPreviewParent; private const float HorizontalPos = 70f; public static void Init() { //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_0020: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_006e: 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_0079: Expected O, but got Unknown object obj = <>c.<>9__9_0; if (obj == null) { BuilderDelegate val = delegate(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Change Grab Colour", (Action)OpenPopup, parent, new Vector2(28.3f, 350f)); }; <>c.<>9__9_0 = val; obj = (object)val; } MenuAPI.AddElementToEscapeMenu((BuilderDelegate)obj); object obj2 = <>c.<>9__9_1; if (obj2 == null) { BuilderDelegate val2 = delegate(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Change Grab Colour", (Action)OpenPopup, parent, new Vector2(28.3f, 350f)); }; <>c.<>9__9_1 = val2; obj2 = (object)val2; } MenuAPI.AddElementToColorMenu((BuilderDelegate)obj2); if (!CustomGrabColourConfig.DebugAddButtonToMainMenu.Value) { return; } object obj3 = <>c.<>9__9_2; if (obj3 == null) { BuilderDelegate val3 = delegate(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Change Grab Colour", (Action)OpenPopup, parent, new Vector2(28.3f, 350f)); }; <>c.<>9__9_2 = val3; obj3 = (object)val3; } MenuAPI.AddElementToMainMenu((BuilderDelegate)obj3); } private static void OpenPopup() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_0099: 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_00a4: Expected O, but got Unknown //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_00d9: Expected O, but got Unknown //IL_0103: 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_010e: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //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_01e2: Expected O, but got Unknown //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Expected O, but got Unknown //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Expected O, but got Unknown //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Expected O, but got Unknown //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Expected O, but got Unknown //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Expected O, but got Unknown //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Expected O, but got Unknown //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Expected O, but got Unknown //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Expected O, but got Unknown //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Expected O, but got Unknown //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Expected O, but got Unknown //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Expected O, but got Unknown //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Expected O, but got Unknown REPOPopupPage changeGrabColourPage = MenuAPI.CreateREPOPopupPage("Change Grab Beam Colour", (PresetSide)0, false, true, 1.5f); REPOPopupPage obj = changeGrabColourPage; object obj2 = <>c.<>9__10_0; if (obj2 == null) { BuilderDelegate val2 = delegate(Transform parent) { //IL_0032: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) float verticalPos = GetVerticalPos(0); float verticalPos2 = GetVerticalPos(1); Vector2 val53 = default(Vector2); ((Vector2)(ref val53))..ctor(0.5f, 0.5f); REPOLabel val54 = MenuAPI.CreateREPOLabel("Neutral Colour Preview", parent, new Vector2(455f, verticalPos - 60f)); ((Component)val54).transform.localScale = Vector2.op_Implicit(val53); ((Component)val54).transform.SetPositionAndRotation(new Vector3(455f - ((TMP_Text)val54.labelTMP).GetPreferredWidth() / 4f, ((Component)val54).transform.position.y, ((Component)val54).transform.position.z), ((Component)val54).transform.rotation); if (!Object.op_Implicit((Object)(object)_neutralGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(455f, verticalPos), out _neutralGrabColourPreviewParent, out _neutralGrabColourPreviewImage); } REPOLabel val55 = MenuAPI.CreateREPOLabel("Rotating Colour Preview", parent, new Vector2(455f, verticalPos2 - 60f)); ((Component)val55).transform.localScale = Vector2.op_Implicit(val53); ((Component)val55).transform.SetPositionAndRotation(new Vector3(455f - ((TMP_Text)val55.labelTMP).GetPreferredWidth() / 4f, ((Component)val55).transform.position.y, ((Component)val55).transform.position.z), ((Component)val55).transform.rotation); if (!Object.op_Implicit((Object)(object)_rotatingGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(455f, verticalPos2), out _rotatingGrabColourPreviewParent, out _rotatingGrabColourPreviewImage); } REPOLabel val56 = MenuAPI.CreateREPOLabel("Healing Colour Preview", parent, new Vector2(605f, verticalPos - 60f)); ((Component)val56).transform.localScale = Vector2.op_Implicit(val53); ((Component)val56).transform.SetPositionAndRotation(new Vector3(605f - ((TMP_Text)val56.labelTMP).GetPreferredWidth() / 4f, ((Component)val56).transform.position.y, ((Component)val56).transform.position.z), ((Component)val56).transform.rotation); if (!Object.op_Implicit((Object)(object)_healingGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(605f, verticalPos), out _healingGrabColourPreviewParent, out _healingGrabColourPreviewImage); } REPOLabel val57 = MenuAPI.CreateREPOLabel("Climbing Colour Preview", parent, new Vector2(605f, verticalPos2 - 60f)); ((Component)val57).transform.localScale = Vector2.op_Implicit(val53); ((Component)val57).transform.SetPositionAndRotation(new Vector3(605f - ((TMP_Text)val57.labelTMP).GetPreferredWidth() / 4f, ((Component)val57).transform.position.y, ((Component)val57).transform.position.z), ((Component)val57).transform.rotation); if (!Object.op_Implicit((Object)(object)_climbingGrabColourPreviewParent)) { CreateBeamPreviewColourRectangle(parent, new Vector2(605f, verticalPos2), out _climbingGrabColourPreviewParent, out _climbingGrabColourPreviewImage); } }; <>c.<>9__10_0 = val2; obj2 = (object)val2; } obj.AddElement((BuilderDelegate)obj2); REPOPopupPage obj3 = changeGrabColourPage; object obj4 = <>c.<>9__10_1; if (obj4 == null) { ScrollViewBuilderDelegate val3 = delegate(Transform parent) { //IL_0012: 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) REPOLabel val52 = MenuAPI.CreateREPOLabel("Neutral Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(0))); ((Component)val52).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val52).rectTransform; }; <>c.<>9__10_1 = val3; obj4 = (object)val3; } obj3.AddElementToScrollView((ScrollViewBuilderDelegate)obj4, 0f, 0f); REPOPopupPage obj5 = changeGrabColourPage; object obj6 = <>c.<>9__10_2; if (obj6 == null) { ScrollViewBuilderDelegate val4 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val51 = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.r = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color16 = ((Graphic)_neutralGrabColourPreviewImage).color; color16.r = f; ((Graphic)_neutralGrabColourPreviewImage).color = color16; } }, CustomGrabBeamColour.LocalNeutralColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(1))); return ((REPOElement)val51).rectTransform; }; <>c.<>9__10_2 = val4; obj6 = (object)val4; } obj5.AddElementToScrollView((ScrollViewBuilderDelegate)obj6, 0f, 0f); REPOPopupPage obj7 = changeGrabColourPage; object obj8 = <>c.<>9__10_3; if (obj8 == null) { ScrollViewBuilderDelegate val5 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val50 = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.g = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color15 = ((Graphic)_neutralGrabColourPreviewImage).color; color15.g = f; ((Graphic)_neutralGrabColourPreviewImage).color = color15; } }, CustomGrabBeamColour.LocalNeutralColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(2))); return ((REPOElement)val50).rectTransform; }; <>c.<>9__10_3 = val5; obj8 = (object)val5; } obj7.AddElementToScrollView((ScrollViewBuilderDelegate)obj8, 0f, 0f); REPOPopupPage obj9 = changeGrabColourPage; object obj10 = <>c.<>9__10_4; if (obj10 == null) { ScrollViewBuilderDelegate val6 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val49 = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalNeutralColour.b = f; if (!CustomGrabBeamColour.LocalNeutralColour.MatchSkin) { Color color14 = ((Graphic)_neutralGrabColourPreviewImage).color; color14.b = f; ((Graphic)_neutralGrabColourPreviewImage).color = color14; } }, CustomGrabBeamColour.LocalNeutralColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(3))); return ((REPOElement)val49).rectTransform; }; <>c.<>9__10_4 = val6; obj10 = (object)val6; } obj9.AddElementToScrollView((ScrollViewBuilderDelegate)obj10, 0f, 0f); REPOPopupPage obj11 = changeGrabColourPage; object obj12 = <>c.<>9__10_5; if (obj12 == null) { ScrollViewBuilderDelegate val7 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val48 = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalNeutralColour.a = f; Color color13 = ((Graphic)_neutralGrabColourPreviewImage).color; color13.a = f; ((Graphic)_neutralGrabColourPreviewImage).color = color13; }, CustomGrabBeamColour.LocalNeutralColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(4))); return ((REPOElement)val48).rectTransform; }; <>c.<>9__10_5 = val7; obj12 = (object)val7; } obj11.AddElementToScrollView((ScrollViewBuilderDelegate)obj12, 0f, 0f); REPOPopupPage obj13 = changeGrabColourPage; object obj14 = <>c.<>9__10_6; if (obj14 == null) { ScrollViewBuilderDelegate val8 = delegate(Transform parent) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) REPOToggle val47 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalNeutralColour.MatchSkin = val; HandleNeutralSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(5)), "Yes", "No", CustomGrabBeamColour.LocalNeutralColour.MatchSkin); return ((REPOElement)val47).rectTransform; }; <>c.<>9__10_6 = val8; obj14 = (object)val8; } obj13.AddElementToScrollView((ScrollViewBuilderDelegate)obj14, 0f, 0f); REPOPopupPage obj15 = changeGrabColourPage; object obj16 = <>c.<>9__10_7; if (obj16 == null) { ScrollViewBuilderDelegate val9 = delegate(Transform parent) { //IL_0012: 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) REPOLabel val46 = MenuAPI.CreateREPOLabel("Rotating Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(6))); ((Component)val46).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val46).rectTransform; }; <>c.<>9__10_7 = val9; obj16 = (object)val9; } obj15.AddElementToScrollView((ScrollViewBuilderDelegate)obj16, 0f, 0f); REPOPopupPage obj17 = changeGrabColourPage; object obj18 = <>c.<>9__10_8; if (obj18 == null) { ScrollViewBuilderDelegate val10 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val45 = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.r = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color12 = ((Graphic)_rotatingGrabColourPreviewImage).color; color12.r = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color12; HandleRotatingSkinMatchChange(); } }, CustomGrabBeamColour.LocalRotatingColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(7))); return ((REPOElement)val45).rectTransform; }; <>c.<>9__10_8 = val10; obj18 = (object)val10; } obj17.AddElementToScrollView((ScrollViewBuilderDelegate)obj18, 0f, 0f); REPOPopupPage obj19 = changeGrabColourPage; object obj20 = <>c.<>9__10_9; if (obj20 == null) { ScrollViewBuilderDelegate val11 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val44 = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.g = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color11 = ((Graphic)_rotatingGrabColourPreviewImage).color; color11.g = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color11; HandleRotatingSkinMatchChange(); } }, CustomGrabBeamColour.LocalRotatingColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(8))); return ((REPOElement)val44).rectTransform; }; <>c.<>9__10_9 = val11; obj20 = (object)val11; } obj19.AddElementToScrollView((ScrollViewBuilderDelegate)obj20, 0f, 0f); REPOPopupPage obj21 = changeGrabColourPage; object obj22 = <>c.<>9__10_10; if (obj22 == null) { ScrollViewBuilderDelegate val12 = delegate(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val43 = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalRotatingColour.b = f; if (!CustomGrabBeamColour.LocalRotatingColour.MatchSkin) { Color color10 = ((Graphic)_rotatingGrabColourPreviewImage).color; color10.b = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color10; HandleRotatingSkinMatchChange(); } }, CustomGrabBeamColour.LocalRotatingColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(9))); return ((REPOElement)val43).rectTransform; }; <>c.<>9__10_10 = val12; obj22 = (object)val12; } obj21.AddElementToScrollView((ScrollViewBuilderDelegate)obj22, 0f, 0f); REPOPopupPage obj23 = changeGrabColourPage; object obj24 = <>c.<>9__10_11; if (obj24 == null) { ScrollViewBuilderDelegate val13 = delegate(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val42 = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalRotatingColour.a = f; Color color9 = ((Graphic)_rotatingGrabColourPreviewImage).color; color9.a = f; ((Graphic)_rotatingGrabColourPreviewImage).color = color9; HandleRotatingSkinMatchChange(); }, CustomGrabBeamColour.LocalRotatingColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(10))); return ((REPOElement)val42).rectTransform; }; <>c.<>9__10_11 = val13; obj24 = (object)val13; } obj23.AddElementToScrollView((ScrollViewBuilderDelegate)obj24, 0f, 0f); REPOPopupPage obj25 = changeGrabColourPage; object obj26 = <>c.<>9__10_12; if (obj26 == null) { ScrollViewBuilderDelegate val14 = delegate(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) REPOToggle val41 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalRotatingColour.MatchSkin = val; HandleRotatingSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(11)), "Yes", "No", CustomGrabBeamColour.LocalRotatingColour.MatchSkin); return ((REPOElement)val41).rectTransform; }; <>c.<>9__10_12 = val14; obj26 = (object)val14; } obj25.AddElementToScrollView((ScrollViewBuilderDelegate)obj26, 0f, 0f); REPOPopupPage obj27 = changeGrabColourPage; object obj28 = <>c.<>9__10_13; if (obj28 == null) { ScrollViewBuilderDelegate val15 = delegate(Transform parent) { //IL_0012: 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) REPOLabel val40 = MenuAPI.CreateREPOLabel("Healing Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(6))); ((Component)val40).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val40).rectTransform; }; <>c.<>9__10_13 = val15; obj28 = (object)val15; } obj27.AddElementToScrollView((ScrollViewBuilderDelegate)obj28, 0f, 0f); REPOPopupPage obj29 = changeGrabColourPage; object obj30 = <>c.<>9__10_14; if (obj30 == null) { ScrollViewBuilderDelegate val16 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val39 = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.r = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color8 = ((Graphic)_healingGrabColourPreviewImage).color; color8.r = f; ((Graphic)_healingGrabColourPreviewImage).color = color8; HandleHealingSkinMatchChange(); } }, CustomGrabBeamColour.LocalHealingColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(7))); return ((REPOElement)val39).rectTransform; }; <>c.<>9__10_14 = val16; obj30 = (object)val16; } obj29.AddElementToScrollView((ScrollViewBuilderDelegate)obj30, 0f, 0f); REPOPopupPage obj31 = changeGrabColourPage; object obj32 = <>c.<>9__10_15; if (obj32 == null) { ScrollViewBuilderDelegate val17 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val38 = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.g = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color7 = ((Graphic)_healingGrabColourPreviewImage).color; color7.g = f; ((Graphic)_healingGrabColourPreviewImage).color = color7; HandleHealingSkinMatchChange(); } }, CustomGrabBeamColour.LocalHealingColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(8))); return ((REPOElement)val38).rectTransform; }; <>c.<>9__10_15 = val17; obj32 = (object)val17; } obj31.AddElementToScrollView((ScrollViewBuilderDelegate)obj32, 0f, 0f); REPOPopupPage obj33 = changeGrabColourPage; object obj34 = <>c.<>9__10_16; if (obj34 == null) { ScrollViewBuilderDelegate val18 = delegate(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val37 = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalHealingColour.b = f; if (!CustomGrabBeamColour.LocalHealingColour.MatchSkin) { Color color6 = ((Graphic)_healingGrabColourPreviewImage).color; color6.b = f; ((Graphic)_healingGrabColourPreviewImage).color = color6; HandleHealingSkinMatchChange(); } }, CustomGrabBeamColour.LocalHealingColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(9))); return ((REPOElement)val37).rectTransform; }; <>c.<>9__10_16 = val18; obj34 = (object)val18; } obj33.AddElementToScrollView((ScrollViewBuilderDelegate)obj34, 0f, 0f); REPOPopupPage obj35 = changeGrabColourPage; object obj36 = <>c.<>9__10_17; if (obj36 == null) { ScrollViewBuilderDelegate val19 = delegate(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val36 = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalHealingColour.a = f; Color color5 = ((Graphic)_healingGrabColourPreviewImage).color; color5.a = f; ((Graphic)_healingGrabColourPreviewImage).color = color5; HandleHealingSkinMatchChange(); }, CustomGrabBeamColour.LocalHealingColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(10))); return ((REPOElement)val36).rectTransform; }; <>c.<>9__10_17 = val19; obj36 = (object)val19; } obj35.AddElementToScrollView((ScrollViewBuilderDelegate)obj36, 0f, 0f); REPOPopupPage obj37 = changeGrabColourPage; object obj38 = <>c.<>9__10_18; if (obj38 == null) { ScrollViewBuilderDelegate val20 = delegate(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) REPOToggle val35 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalHealingColour.MatchSkin = val; HandleHealingSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(11)), "Yes", "No", CustomGrabBeamColour.LocalHealingColour.MatchSkin); return ((REPOElement)val35).rectTransform; }; <>c.<>9__10_18 = val20; obj38 = (object)val20; } obj37.AddElementToScrollView((ScrollViewBuilderDelegate)obj38, 0f, 0f); REPOPopupPage obj39 = changeGrabColourPage; object obj40 = <>c.<>9__10_19; if (obj40 == null) { ScrollViewBuilderDelegate val21 = delegate(Transform parent) { //IL_0012: 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) REPOLabel val34 = MenuAPI.CreateREPOLabel("Climbing Beam Colour", parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(6))); ((Component)val34).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); return ((REPOElement)val34).rectTransform; }; <>c.<>9__10_19 = val21; obj40 = (object)val21; } obj39.AddElementToScrollView((ScrollViewBuilderDelegate)obj40, 0f, 0f); REPOPopupPage obj41 = changeGrabColourPage; object obj42 = <>c.<>9__10_20; if (obj42 == null) { ScrollViewBuilderDelegate val22 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val33 = CreateColourSlider("Red", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.r = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color4 = ((Graphic)_climbingGrabColourPreviewImage).color; color4.r = f; ((Graphic)_climbingGrabColourPreviewImage).color = color4; HandleClimbingSkinMatchChange(); } }, CustomGrabBeamColour.LocalClimbingColour.r, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(7))); return ((REPOElement)val33).rectTransform; }; <>c.<>9__10_20 = val22; obj42 = (object)val22; } obj41.AddElementToScrollView((ScrollViewBuilderDelegate)obj42, 0f, 0f); REPOPopupPage obj43 = changeGrabColourPage; object obj44 = <>c.<>9__10_21; if (obj44 == null) { ScrollViewBuilderDelegate val23 = delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val32 = CreateColourSlider("Green", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.g = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color3 = ((Graphic)_climbingGrabColourPreviewImage).color; color3.g = f; ((Graphic)_climbingGrabColourPreviewImage).color = color3; HandleClimbingSkinMatchChange(); } }, CustomGrabBeamColour.LocalClimbingColour.g, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(8))); return ((REPOElement)val32).rectTransform; }; <>c.<>9__10_21 = val23; obj44 = (object)val23; } obj43.AddElementToScrollView((ScrollViewBuilderDelegate)obj44, 0f, 0f); REPOPopupPage obj45 = changeGrabColourPage; object obj46 = <>c.<>9__10_22; if (obj46 == null) { ScrollViewBuilderDelegate val24 = delegate(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val31 = CreateColourSlider("Blue", "", delegate(float f) { //IL_0022: 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_0035: Unknown result type (might be due to invalid IL or missing references) CustomGrabBeamColour.LocalClimbingColour.b = f; if (!CustomGrabBeamColour.LocalClimbingColour.MatchSkin) { Color color2 = ((Graphic)_climbingGrabColourPreviewImage).color; color2.b = f; ((Graphic)_climbingGrabColourPreviewImage).color = color2; HandleClimbingSkinMatchChange(); } }, CustomGrabBeamColour.LocalClimbingColour.b, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(9))); return ((REPOElement)val31).rectTransform; }; <>c.<>9__10_22 = val24; obj46 = (object)val24; } obj45.AddElementToScrollView((ScrollViewBuilderDelegate)obj46, 0f, 0f); REPOPopupPage obj47 = changeGrabColourPage; object obj48 = <>c.<>9__10_23; if (obj48 == null) { ScrollViewBuilderDelegate val25 = delegate(Transform parent) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) REPOSlider val30 = CreateAlphaSlider("Opacity", "", delegate(float f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) CustomGrabBeamColour.LocalClimbingColour.a = f; Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.a = f; ((Graphic)_climbingGrabColourPreviewImage).color = color; HandleClimbingSkinMatchChange(); }, CustomGrabBeamColour.LocalClimbingColour.a, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(10))); return ((REPOElement)val30).rectTransform; }; <>c.<>9__10_23 = val25; obj48 = (object)val25; } obj47.AddElementToScrollView((ScrollViewBuilderDelegate)obj48, 0f, 0f); REPOPopupPage obj49 = changeGrabColourPage; object obj50 = <>c.<>9__10_24; if (obj50 == null) { ScrollViewBuilderDelegate val26 = delegate(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) REPOToggle val29 = MenuAPI.CreateREPOToggle("Match Grabber Cosmetic", (Action)delegate(bool val) { CustomGrabBeamColour.LocalClimbingColour.MatchSkin = val; HandleClimbingSkinMatchChange(); }, parent, new Vector2(0f, GetVerticalOffsetForScrollChildren(11)), "Yes", "No", CustomGrabBeamColour.LocalClimbingColour.MatchSkin); return ((REPOElement)val29).rectTransform; }; <>c.<>9__10_24 = val26; obj50 = (object)val26; } obj49.AddElementToScrollView((ScrollViewBuilderDelegate)obj50, 0f, 0f); changeGrabColourPage.AddElement((BuilderDelegate)delegate(Transform parent) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) REPOButton val27 = MenuAPI.CreateREPOButton("Done", (Action)delegate { changeGrabColourPage.ClosePage(true); CustomGrabBeamColour.UpdateBeamColourForAllBeams(); CustomGrabBeamColour.SaveLocalColoursToConfig(); }, parent, new Vector2(70f, 30f)); REPOButton val28 = MenuAPI.CreateREPOButton("Reset", (Action)delegate { changeGrabColourPage.ClosePage(true); CustomGrabBeamColour.ResetBeamColours(); CustomGrabBeamColour.UpdateBeamColourForAllBeams(); CustomGrabBeamColour.SaveLocalColoursToConfig(); }, parent, new Vector2(590f, 30f)); val28.overrideButtonSize = val28.GetLabelSize() / 2f; ((Component)val28).transform.localScale = Vector2.op_Implicit(new Vector2(0.5f, 0.5f)); }); SetupPreviewRectangleColours(CustomGrabBeamColour.LocalNeutralColour.Colour, CustomGrabBeamColour.LocalRotatingColour.Colour, CustomGrabBeamColour.LocalHealingColour.Colour, CustomGrabBeamColour.LocalClimbingColour.Colour); changeGrabColourPage.OpenPage(false); } private static void SetupPreviewRectangleColours(Color neutralColour, Color rotatingColour, Color healingColour, Color climbingColour) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: 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_002a: Unknown result type (might be due to invalid IL or missing references) ((Graphic)_neutralGrabColourPreviewImage).color = neutralColour; ((Graphic)_rotatingGrabColourPreviewImage).color = rotatingColour; ((Graphic)_healingGrabColourPreviewImage).color = healingColour; ((Graphic)_climbingGrabColourPreviewImage).color = climbingColour; HandleNeutralSkinMatchChange(); HandleRotatingSkinMatchChange(); HandleHealingSkinMatchChange(); } private static void HandleNeutralSkinMatchChange() { //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_0017: 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_0038: 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) ((Graphic)_neutralGrabColourPreviewImage).color = (CustomGrabBeamColour.LocalNeutralColour.MatchSkin ? CustomGrabBeamColour.GetLocalGrabberCosmeticColour(CustomGrabColourConfig.NeutralDefaultColour) : CustomGrabBeamColour.LocalNeutralColour.Colour); Color color = ((Graphic)_neutralGrabColourPreviewImage).color; color.a = CustomGrabBeamColour.LocalNeutralColour.Colour.a; ((Graphic)_neutralGrabColourPreviewImage).color = color; } private static void HandleRotatingSkinMatchChange() { //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_0017: 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_0038: 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) ((Graphic)_rotatingGrabColourPreviewImage).color = (CustomGrabBeamColour.LocalRotatingColour.MatchSkin ? CustomGrabBeamColour.GetLocalGrabberCosmeticColour(CustomGrabColourConfig.RotatingDefaultColour) : CustomGrabBeamColour.LocalRotatingColour.Colour); Color color = ((Graphic)_rotatingGrabColourPreviewImage).color; color.a = CustomGrabBeamColour.LocalRotatingColour.Colour.a; ((Graphic)_rotatingGrabColourPreviewImage).color = color; } private static void HandleHealingSkinMatchChange() { //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_0017: 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_0038: 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) ((Graphic)_healingGrabColourPreviewImage).color = (CustomGrabBeamColour.LocalHealingColour.MatchSkin ? CustomGrabBeamColour.GetLocalGrabberCosmeticColour(CustomGrabColourConfig.HealingDefaultColour) : CustomGrabBeamColour.LocalHealingColour.Colour); Color color = ((Graphic)_healingGrabColourPreviewImage).color; color.a = CustomGrabBeamColour.LocalHealingColour.Colour.a; ((Graphic)_healingGrabColourPreviewImage).color = color; } private static void HandleClimbingSkinMatchChange() { //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_0017: 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_0038: 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) ((Graphic)_climbingGrabColourPreviewImage).color = (CustomGrabBeamColour.LocalClimbingColour.MatchSkin ? CustomGrabBeamColour.GetLocalGrabberCosmeticColour(CustomGrabColourConfig.ClimbingDefaultColour) : CustomGrabBeamColour.LocalClimbingColour.Colour); Color color = ((Graphic)_climbingGrabColourPreviewImage).color; color.a = CustomGrabBeamColour.LocalClimbingColour.Colour.a; ((Graphic)_climbingGrabColourPreviewImage).color = color; } private static void CreateBeamPreviewColourRectangle(Transform parent, Vector2 position, out GameObject colourPreviewParent, out Image colourPreviewImage) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_00ad: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) colourPreviewParent = new GameObject(); ((Object)colourPreviewParent).name = "Grab Beam Colour Preview Rectangle Parent"; colourPreviewParent.transform.SetParent(parent); Canvas val = colourPreviewParent.AddComponent(); ((Component)val).transform.SetParent(colourPreviewParent.gameObject.transform.parent); GameObject val2 = new GameObject(); val2.transform.SetParent(((Component)val).gameObject.transform.parent); colourPreviewImage = val2.AddComponent(); ((Object)colourPreviewImage).name = "Grab Beam Colour Preview Rectangle Image"; ((Component)colourPreviewImage).transform.SetParent(val2.gameObject.transform.parent); ((Graphic)colourPreviewImage).color = new Color(1f, 0f, 0f); ((Component)colourPreviewImage).gameObject.transform.position = Vector2.op_Implicit(position); ((Component)colourPreviewImage).gameObject.transform.localScale = new Vector3(0.85f, 0.85f, 1f); } private static REPOSlider CreateColourSlider(string name, string desc, Action onChange, float initial, Transform parent, Vector2 localPosition) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return MenuAPI.CreateREPOSlider(name, desc, onChange, parent, localPosition, 0f, 1f, 2, initial, "", "", (BarBehavior)0); } private static REPOSlider CreateAlphaSlider(string name, string desc, Action onChange, float initial, Transform parent, Vector2 localPosition) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return MenuAPI.CreateREPOSlider(name, desc, onChange, parent, localPosition, 0.1f, 0.7f, 2, initial, "", "", (BarBehavior)0); } private static REPOSlider CreateSlider(string name, string desc, Action onChange, float initial, float min, float max, Transform parent, Vector2 localPosition) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return MenuAPI.CreateREPOSlider(name, desc, onChange, parent, localPosition, min, max, 2, initial, "", "", (BarBehavior)0); } private static float GetVerticalOffsetForScrollChildren(int index) { return 40 * index; } private static float GetVerticalPos(int offset) { int num = -Math.Abs(-offset); num += 3; return -160f + (float)(150 * num); } } public static class ConfigUtil { public static string ColorToString(Color color) { return color.r + ", " + color.g + ", " + color.b + ", " + color.a; } public static Color StringToColor(string color, Color defaultColour) { //IL_0050: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_00e7: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) string[] array = color.Split(','); switch (array.Length) { case 3: { float[] array3 = new float[3]; for (int j = 0; j < array.Length; j++) { try { array3.SetValue(float.Parse(array[j].Trim()), j); } catch { return defaultColour; } } return new Color(array3[0], array3[1], array3[2], 0.2f); } case 4: { float[] array2 = new float[4]; for (int i = 0; i < array.Length; i++) { try { array2.SetValue(float.Parse(array[i].Trim()), i); } catch { return defaultColour; } } return new Color(array2[0], array2[1], array2[2], array2[3]); } default: return defaultColour; } } } public static class CustomGrabColourConfig { public struct BeamConfigEntries { public readonly ConfigEntry BeamColour; public readonly ConfigEntry MatchSkin; public BeamConfigEntries(ConfigEntry beamColour, ConfigEntry matchSkin) { BeamColour = beamColour; MatchSkin = matchSkin; } } private static readonly Dictionary BeamTypeToConfigEntries = new Dictionary(); public const float DefaultOpacity = 0.2f; public const float MinOpacity = 0.1f; public const float MaxOpacity = 0.7f; public static readonly Color NeutralDefaultColour = new Color(1f, 0.58f, 0.19f, 0.35f); public static readonly Color HealingDefaultColour = new Color(0.17f, 1f, 0.17f, 0.2f); public static readonly Color RotatingDefaultColour = new Color(0.65f, 0.06f, 0.8f, 0.2f); public static readonly Color ClimbingDefaultColour = new Color(0f, 0.7f, 1f, 0.2f); public static BeamConfigEntries NeutralGrabBeam; public static BeamConfigEntries HealingGrabBeam; public static BeamConfigEntries RotatingGrabBeam; public static BeamConfigEntries ClimbingGrabBeam; public static ConfigEntry EnableDebugLogs; public static ConfigEntry DebugAddButtonToMainMenu; private const string ColourNotes = "\nStored as R,G,B,A values in 0-1 range"; public static void Init(ConfigFile config) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_010c: Unknown result type (might be due to invalid IL or missing references) ConfigEntry beamColour = config.Bind("General", "NeutralGrabBeamColour", ConfigUtil.ColorToString(NeutralDefaultColour), "The default colour of the grab beam when holding an item.\nStored as R,G,B,A values in 0-1 range"); ConfigEntry matchSkin = config.Bind("General", "NeutralGrabBeamMatchSkin", true, "Should the neutral grab beam match the colour of your grabber cosmetic?"); NeutralGrabBeam = new BeamConfigEntries(beamColour, matchSkin); BeamTypeToConfigEntries.Add(GrabBeamColourSettings.BeamType.Neutral, NeutralGrabBeam); ConfigEntry beamColour2 = config.Bind("General", "RotatingGrabBeamColour", ConfigUtil.ColorToString(RotatingDefaultColour), "The colour of the grab beam when rotating an item or monster.\nStored as R,G,B,A values in 0-1 range"); ConfigEntry matchSkin2 = config.Bind("General", "RotatingGrabBeamMatchSkin", false, "Should the rotating grab beam match the colour of your grabber cosmetic?"); RotatingGrabBeam = new BeamConfigEntries(beamColour2, matchSkin2); BeamTypeToConfigEntries.Add(GrabBeamColourSettings.BeamType.Rotate, RotatingGrabBeam); ConfigEntry beamColour3 = config.Bind("General", "HealingGrabBeamColour", ConfigUtil.ColorToString(HealingDefaultColour), "The colour of the grab beam when healing another player.\nStored as R,G,B,A values in 0-1 range"); ConfigEntry matchSkin3 = config.Bind("General", "HealingGrabBeamMatchSkin", false, "Should the healing grab beam match the colour of your grabber cosmetic?"); HealingGrabBeam = new BeamConfigEntries(beamColour3, matchSkin3); BeamTypeToConfigEntries.Add(GrabBeamColourSettings.BeamType.Heal, HealingGrabBeam); ConfigEntry beamColour4 = config.Bind("General", "ClimbingGrabBeamColour", ConfigUtil.ColorToString(ClimbingDefaultColour), "The colour of the grab beam when climbing with the tumble climb upgrade.\nStored as R,G,B,A values in 0-1 range"); ConfigEntry matchSkin4 = config.Bind("General", "ClimbingGrabBeamMatchSkin", false, "Should the climbing grab beam match the colour of your grabber cosmetic?"); ClimbingGrabBeam = new BeamConfigEntries(beamColour4, matchSkin4); BeamTypeToConfigEntries.Add(GrabBeamColourSettings.BeamType.Climb, ClimbingGrabBeam); EnableDebugLogs = config.Bind("Debug", "EnableDebugLogs", false, "Outputs additional debugging information to the log"); DebugAddButtonToMainMenu = config.Bind("Debug", "AddConfigToMainMenu", false, "Adds the config menu button to the main menu"); LoadValuesFromConfig(); } private static void LoadValuesFromConfig() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //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_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_0057: 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_0061: 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_0074: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) Color val = ConfigUtil.StringToColor(NeutralGrabBeam.BeamColour.Value, NeutralDefaultColour); val.a = ClampOpacity(val.a); CustomGrabBeamColour.LocalNeutralColour = new GrabBeamColourSettings(val, NeutralGrabBeam.MatchSkin.Value, GrabBeamColourSettings.BeamType.Neutral); Color val2 = ConfigUtil.StringToColor(RotatingGrabBeam.BeamColour.Value, RotatingDefaultColour); val2.a = ClampOpacity(val2.a); CustomGrabBeamColour.LocalRotatingColour = new GrabBeamColourSettings(val2, RotatingGrabBeam.MatchSkin.Value, GrabBeamColourSettings.BeamType.Rotate); Color val3 = ConfigUtil.StringToColor(HealingGrabBeam.BeamColour.Value, HealingDefaultColour); val3.a = ClampOpacity(val3.a); CustomGrabBeamColour.LocalHealingColour = new GrabBeamColourSettings(val3, HealingGrabBeam.MatchSkin.Value, GrabBeamColourSettings.BeamType.Heal); Color val4 = ConfigUtil.StringToColor(ClimbingGrabBeam.BeamColour.Value, ClimbingDefaultColour); val4.a = ClampOpacity(val4.a); CustomGrabBeamColour.LocalClimbingColour = new GrabBeamColourSettings(val4, ClimbingGrabBeam.MatchSkin.Value, GrabBeamColourSettings.BeamType.Climb); } public static void SaveColour(GrabBeamColourSettings beamColourSettings) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) Plugin.LogMessageIfDebug("Saving colour to config file: " + beamColourSettings); beamColourSettings.a = ClampOpacity(beamColourSettings.a); if (!BeamTypeToConfigEntries.TryGetValue(beamColourSettings.CurrentBeamType, out var value)) { Plugin.LogWarning("Unable to save colour value for beam type: " + beamColourSettings.CurrentBeamType); } value.BeamColour.Value = ConfigUtil.ColorToString(beamColourSettings.Colour); value.MatchSkin.Value = beamColourSettings.MatchSkin; } public static float ClampOpacity(float opacity) { return Mathf.Clamp(opacity, 0.1f, 0.7f); } } }