Merge branch 'dev' into feat-addressables-2

This commit is contained in:
XtraCube committed 2025-03-29 22:07:24 -04:00
commit a8ac00d270
1 file changed
+20 -6
+20 -6
View File
@@ -1,4 +1,6 @@
using HarmonyLib;
using System.Collections.Generic;
using System.Reflection;
using HarmonyLib;
using MiraAPI.Events;
using MiraAPI.Events.Vanilla.Gameplay;
using MiraAPI.Events.Vanilla.Meeting;
@@ -33,11 +35,23 @@ public static class EjectionPatches
__instance.completeString = role.GetCustomEjectionMessage(__instance.initData.networkedPlayer);
}
[HarmonyPostfix]
[HarmonyPatch(nameof(ExileController.WrapUp))]
public static void WrapUpPostfix(ExileController __instance)
[HarmonyPatch]
internal static class WrapUpPatch
{
var @event = new RoundStartEvent(false);
MiraEventManager.InvokeEvent(@event);
public static IEnumerable<MethodBase> TargetMethods()
{
yield return AccessTools.Method(typeof(ExileController), nameof(ExileController.WrapUp));
yield return AccessTools.Method(typeof(AirshipExileController), nameof(AirshipExileController.WrapUpAndSpawn));
if (AccessTools.TypeByName("Submerged.ExileCutscene.SubmergedExileController") is { } type)
{
yield return AccessTools.Method(type, "WrapUpAndSpawn");
}
}
public static void Postfix()
{
var @event = new RoundStartEvent(false);
MiraEventManager.InvokeEvent(@event);
}
}
}