mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Merge pull request #49 from xChipseq/round-start-event
Invoke RoundStartEvent when starting freeplay
This commit is contained in:
1 file changed
+17
@@ -0,0 +1,17 @@
|
|||||||
|
using HarmonyLib;
|
||||||
|
using MiraAPI.Events;
|
||||||
|
using MiraAPI.Events.Vanilla.Gameplay;
|
||||||
|
|
||||||
|
namespace MiraAPI.Patches.Events;
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(TutorialManager._RunTutorial_d__3), nameof(TutorialManager._RunTutorial_d__3.MoveNext))]
|
||||||
|
public static class FreeplayRoundStartPatch
|
||||||
|
{
|
||||||
|
public static void Postfix(TutorialManager._RunTutorial_d__3 __instance, ref bool __result)
|
||||||
|
{
|
||||||
|
if (!__result)
|
||||||
|
{
|
||||||
|
MiraEventManager.InvokeEvent(new RoundStartEvent(true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user