using BepInEx; using HarmonyLib; using System.Collections.Generic; using UnityEngine; namespace CashRegistersAlwaysOpen { [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] public class Plugin : BaseUnityPlugin { public static List CheckoutAnimators = new(); private void Awake() { Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded! Applying patch..."); Harmony harmony = new Harmony(PluginInfo.PLUGIN_GUID); harmony.PatchAll(); } private void Update() { foreach (var item in CheckoutAnimators) { item.SetBool("Open", true); } } } [HarmonyPatch(typeof(Checkout), "Start")] public static class Checkout_Start_Patch { public static void Prefix(Checkout __instance) { Plugin.CheckoutAnimators.Add(__instance.m_CashRegisterAnimator); } } }