Initial commit

This commit is contained in:
pan.codes 2024-05-02 19:12:52 +02:00
commit ad90dda473
5 changed files with 476 additions and 0 deletions

34
Plugin.cs Normal file
View file

@ -0,0 +1,34 @@
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<Animator> 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);
}
}
}