using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; 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 HarmonyLib; using Microsoft.CodeAnalysis; using Peak.UI; using Photon.Pun; using Photon.Realtime; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("YonDev.GhostMod4Lins")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.2.0")] [assembly: AssemblyInformationalVersion("1.0.2+4a04c2a25b94ce1b89426d605d26b0e58893202f")] [assembly: AssemblyProduct("Ghost4Lins")] [assembly: AssemblyTitle("YonDev.GhostMod4Lins")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace GhostMod4Lins { [BepInPlugin("YonDev.GhostMod4Lins", "Ghost4Lins", "1.0.2")] public class GhostMod : BaseUnityPlugin { private class PlayerGhostPatch { [HarmonyPatch(typeof(PlayerGhost), "RPCA_InitGhost")] [HarmonyPostfix] private static void RPCA_InitGhostPostfix(PlayerGhost __instance) { ApplyVisibilitySettings(__instance); ApplySoundSettings(__instance); } } private class AnimatedMouthPatch { [HarmonyPatch(typeof(AnimatedMouth), "ProcessMicData")] [HarmonyPrefix] private static bool ProcessMicDataPrefix(AnimatedMouth __instance) { if ((Object)(object)__instance.character == (Object)null || (Object)(object)__instance.character.Ghost == (Object)null) { return true; } if (__instance.character.IsLocal) { AudioSource audioSource = __instance.audioSource; if (audioSource != null) { audioSource.mute = false; } return true; } if (GhostMute.Value) { AudioSource audioSource2 = __instance.audioSource; if (audioSource2 != null) { audioSource2.mute = true; } return false; } AudioSource audioSource3 = __instance.audioSource; if (audioSource3 != null) { audioSource3.mute = false; } return true; } } [HarmonyPatch(typeof(KickButton), "Init")] public static class KickButton_Init_Patch { [HarmonyPostfix] private static void Postfix(KickButton __instance) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown Transform parent = ((Component)__instance).transform.parent; if ((Object)(object)parent.Find("CustomButton") != (Object)null) { return; } AudioLevelSlider value = Traverse.Create((object)__instance).Field("_slider").GetValue(); Player player = value.player; if (!ghostVisibility.ContainsKey(player.ActorNumber)) { ghostVisibility[player.ActorNumber] = GhostVisiblity.Value; } GameObject val = new GameObject("CustomButton"); val.transform.SetParent(parent, false); val.transform.localScale = new Vector3(0.75f, 0.75f, 1f); RectTransform component = ((Component)__instance).GetComponent(); RectTransform val2 = val.AddComponent(); val2.anchoredPosition = new Vector2(-280f, component.anchoredPosition.y); Image val3 = val.AddComponent(); val3.sprite = LoadSprite(); Button val4 = val.AddComponent