Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ShopkeeperStateManager v1.0.0
ShopkeeperStateManager.dll
Decompiled 13 hours agousing 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<GUILayoutOption>())) { CallState((State)0); } if (GUILayout.Button("WakeUp", Array.Empty<GUILayoutOption>())) { CallState((State)1); } if (GUILayout.Button("GoToSleep", Array.Empty<GUILayoutOption>())) { CallState((State)2); } if (GUILayout.Button("Observe", Array.Empty<GUILayoutOption>())) { CallState((State)3); } if (GUILayout.Button("Flash", Array.Empty<GUILayoutOption>())) { CallState((State)4); } if (GUILayout.Button("Shock", Array.Empty<GUILayoutOption>())) { CallState((State)5); } if (GUILayout.Button("Hurt", Array.Empty<GUILayoutOption>())) { CallState((State)6); } if (GUILayout.Button("Aim", Array.Empty<GUILayoutOption>())) { CallState((State)7); } if (GUILayout.Button("WaitForRuckusPlayer", Array.Empty<GUILayoutOption>())) { CallState((State)8); } if (GUILayout.Button("SeeRuckusPlayer", Array.Empty<GUILayoutOption>())) { CallState((State)9); } if (GUILayout.Button("GrabRuckusPlayer", Array.Empty<GUILayoutOption>())) { CallState((State)10); } if (GUILayout.Button("JudgeRuckusPlayer", Array.Empty<GUILayoutOption>())) { CallState((State)11); } if (GUILayout.Button("Shoot", Array.Empty<GUILayoutOption>())) { CallState((State)12); } if (GUILayout.Button("AngryObservation", Array.Empty<GUILayoutOption>())) { CallState((State)13); } if (GUILayout.Button("WarnGrabPlayer", Array.Empty<GUILayoutOption>())) { CallState((State)14); } if (GUILayout.Button("WarnTellOff", Array.Empty<GUILayoutOption>())) { 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<ShopKeeper>(); if (!((Object)(object)val == (Object)null)) { PhotonView componentInParent = ((Component)val).GetComponentInParent<PhotonView>(); if (!((Object)(object)componentInParent == (Object)null)) { componentInParent.RPC("UpdateStateRPC", (RpcTarget)0, new object[1] { state }); } } } }