using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using Photon.Pun; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] [assembly: AssemblyCompany("ShopkeeperStateManager")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ShopkeeperStateManager")] [assembly: AssemblyTitle("ShopkeeperStateManager")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [BepInPlugin("ShopkeeperStateManager", "Shopkeeper State Manager", "1.0.0")] public class ShopkeeperStateManager : BaseUnityPlugin { private bool showMenu; private Rect window = new Rect(100f, 100f, 300f, 620f); private void Update() { if (Input.GetKeyDown((KeyCode)290)) { showMenu = !showMenu; } } private void OnGUI() { //IL_0017: 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_0032: Expected O, but got Unknown //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) if (showMenu) { window = GUI.Window(12345, window, new WindowFunction(DrawWindow), "Shopkeeper State Manager"); } } private void DrawWindow(int id) { if (GUILayout.Button("Sleeping", Array.Empty())) { CallState((State)0); } if (GUILayout.Button("WakeUp", Array.Empty())) { CallState((State)1); } if (GUILayout.Button("GoToSleep", Array.Empty())) { CallState((State)2); } if (GUILayout.Button("Observe", Array.Empty())) { CallState((State)3); } if (GUILayout.Button("Flash", Array.Empty())) { CallState((State)4); } if (GUILayout.Button("Shock", Array.Empty())) { CallState((State)5); } if (GUILayout.Button("Hurt", Array.Empty())) { CallState((State)6); } if (GUILayout.Button("Aim", Array.Empty())) { CallState((State)7); } if (GUILayout.Button("WaitForRuckusPlayer", Array.Empty())) { CallState((State)8); } if (GUILayout.Button("SeeRuckusPlayer", Array.Empty())) { CallState((State)9); } if (GUILayout.Button("GrabRuckusPlayer", Array.Empty())) { CallState((State)10); } if (GUILayout.Button("JudgeRuckusPlayer", Array.Empty())) { CallState((State)11); } if (GUILayout.Button("Shoot", Array.Empty())) { CallState((State)12); } if (GUILayout.Button("AngryObservation", Array.Empty())) { CallState((State)13); } if (GUILayout.Button("WarnGrabPlayer", Array.Empty())) { CallState((State)14); } if (GUILayout.Button("WarnTellOff", Array.Empty())) { CallState((State)15); } GUI.DragWindow(); } private void CallState(State state) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) ShopKeeper val = Object.FindObjectOfType(); if (!((Object)(object)val == (Object)null)) { PhotonView componentInParent = ((Component)val).GetComponentInParent(); if (!((Object)(object)componentInParent == (Object)null)) { componentInParent.RPC("UpdateStateRPC", (RpcTarget)0, new object[1] { state }); } } } }