mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Merge branch 'dev' into feat-addressables-2
This commit is contained in:
commit
a8ac00d270
1 file changed
+20
-6
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user