AllProcPropSeqStartPatcher.cs 643 B

123456789101112131415161718
  1. using System;
  2. using System.Diagnostics.CodeAnalysis;
  3. using HarmonyLib;
  4. namespace MeidoPhotoStudio.Plugin;
  5. // TODO: Extend this further to potentially reduce the need for coroutines that wait for maid proc state
  6. public static class AllProcPropSeqStartPatcher
  7. {
  8. public static event EventHandler<ProcStartEventArgs> SequenceStart;
  9. [HarmonyPatch(typeof(Maid), nameof(Maid.AllProcPropSeqStart))]
  10. [HarmonyPostfix]
  11. [SuppressMessage("StyleCop.Analyzers.NamingRules", "SA1313", Justification = "Harmony parameter")]
  12. private static void NotifyProcStart(Maid __instance) =>
  13. SequenceStart?.Invoke(null, new(__instance));
  14. }