public static bool Prefix( SituationToken __instance, Image ___ongoingSlotImage, Image ___ongoingSlotArtImage, GameObject ___ongoingSlotGreedyIcon, ParticleSystem ___ongoingSlotAppearFX ) { return(Patcher.Run(() => { if (!(Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))) { return true; } bool success = SituationAutomator.ToggleSituationAutomation( __instance.SituationController, ___ongoingSlotImage, ___ongoingSlotArtImage, ___ongoingSlotGreedyIcon, ___ongoingSlotAppearFX ); if (!success) { Registry.Retrieve <INotifier>().ShowNotificationWindow("I can't automate that -", "Only everyday tasks can be automated."); } return false; })); }
public static bool Prefix(SituationToken __instance) { return(Patcher.Run(() => { return !SituationAutomator.IsAutomated(__instance.SituationController); })); }
public static void Postfix(SituationController __instance, float interval) { Patcher.Run(() => { if (SituationAutomator.IsAutomated(__instance)) { SituationAutomator.DoAutomatedAction(__instance); } }); }