Used as extension method

This commit is contained in:
David Higueros committed 2026-11-02 20:44:59 -07:00
1 parent 355d6e63f0
commit 6b3dfb978d
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -166,7 +166,7 @@ public abstract class CustomActionButton
// Invoke the generic button click event.
var genericEvent = new MiraButtonClickEvent(this);
genericEvent.InvokeEvent();
if (genericEvent.IsCancelled) MiraEventManager.InvokeEvent(new MiraButtonCancelledEvent(this));
if (genericEvent.IsCancelled) new MiraButtonCancelledEvent(this).InvokeEvent();
// Invoke the button click event for specific button.
var eventType = CustomButtonManager.ButtonEventTypes[GetType()];
@@ -19,6 +19,6 @@ public static class FreeplayRoundStartPatch
{
if (__result) return;
MeetingButtonManager.OnGameStart();
MiraEventManager.InvokeEvent(new RoundStartEvent(true));
new RoundStartEvent(true).InvokeEvent();
}
}
@@ -69,7 +69,7 @@ public static class VanillaButtonPatches
genericEvent.InvokeEvent();
if (genericEvent.IsCancelled)
{
MiraEventManager.InvokeEvent(new VanillaButtonCancelledEvent(__instance));
new VanillaButtonCancelledEvent(__instance).InvokeEvent();
}
var eventType = typeof(VanillaButtonClickEvent<>).MakeGenericType(__instance.GetType());
+2 -2
View File
@@ -135,13 +135,13 @@ public static class IntroCutscenePatches
Info("IntroCutscene ended");
MeetingButtonManager.OnGameStart();
MiraEventManager.InvokeEvent(new IntroEndEvent(introCutscene));
new IntroEndEvent(introCutscene).InvokeEvent();
var @event = new BeforeRoundStartEvent(true);
@event.InvokeEvent();
if (@event.IsCancelled) return;
MiraEventManager.InvokeEvent(new RoundStartEvent(true));
new RoundStartEvent(true).InvokeEvent();
}
}
}
+2 -2
View File
@@ -106,7 +106,7 @@ internal static class MeetingHudPatches
[HarmonyPatch(nameof(MeetingHud.OnDestroy))]
public static void OnDestroyPatch(MeetingHud __instance)
{
MiraEventManager.InvokeEvent(new EndMeetingEvent(__instance));
new EndMeetingEvent(__instance).InvokeEvent();
}
[HarmonyPostfix]
@@ -123,7 +123,7 @@ internal static class MeetingHudPatches
}
}
MiraEventManager.InvokeEvent(new VotingCompleteEvent(__instance));
new VotingCompleteEvent(__instance).InvokeEvent();
}
// this is necessary because the actual ForceSkipAll method is inlined.