using GadgetCore.API; using GadgetCore.Util; using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using UnityEngine; namespace VanitySlots.Patches { [HarmonyPatch(typeof(GameScript))] [HarmonyPatch("EraseCharacter")] [HarmonyGadget("VanitySlots")] public static class Patch_GameScript_EraseCharacter { [HarmonyPrefix] [HarmonyPriority(Priority.Low)] public static void Prefix(GameScript __instance) { if (!Core.IsSoftcore()) { Core.itemStore.Clear(); Core.itemStore.Save(); } } } }