mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
21 lines
526 B
C#
21 lines
526 B
C#
using HarmonyLib;
|
|
using MiraAPI.Events;
|
|
using MiraAPI.Events.Vanilla.Gameplay;
|
|
|
|
namespace MiraAPI.Patches.Events;
|
|
|
|
/// <summary>
|
|
/// Patch for trigging the GameEndEvent.
|
|
/// </summary>
|
|
[HarmonyPatch]
|
|
public static class EndGamePatches
|
|
{
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(EndGameManager), nameof(EndGameManager.SetEverythingUp))]
|
|
public static void SetEverythingUpPatch(EndGameManager __instance)
|
|
{
|
|
var @event = new GameEndEvent(__instance);
|
|
MiraEventManager.InvokeEvent(@event);
|
|
}
|
|
}
|