Patch_GameScript_Retry.cs 504 B

123456789101112131415161718192021222324
  1. using GadgetCore.API;
  2. using HarmonyLib;
  3. namespace VanitySlots.Patches
  4. {
  5. [HarmonyPatch(typeof(GameScript))]
  6. [HarmonyPatch("Retry")]
  7. [HarmonyGadget("VanitySlots")]
  8. public static class Patch_GameScript_Retry
  9. {
  10. [HarmonyPostfix]
  11. [HarmonyPriority(Priority.Low)]
  12. public static void Postfix(GameScript __instance, Item[] ___storage, ref int ___storageLevel)
  13. {
  14. if (!Core.IsSoftcore())
  15. {
  16. Core.itemStore.Clear();
  17. Core.itemStore.Save();
  18. }
  19. }
  20. }
  21. }