Merge branch 'master' into android

This commit is contained in:
XtraCube committed 2025-09-24 09:41:40 -04:00
commit df8598db4d
5 files changed
+87 -5

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<VersionPrefix>0.2.2</VersionPrefix>
<VersionPrefix>0.3.0</VersionPrefix>
<VersionSuffix>dev</VersionSuffix>
<Authors>All Of Us, XtraCube, Angxl</Authors>
+10 -1
View File
@@ -7,8 +7,17 @@ namespace MiraAPI.Patches.Events;
internal static class EndGamePatches
{
[HarmonyPatch(typeof(GameManager), nameof(GameManager.Awake))]
public static class GameManagerAwakePatch
{
public static void Postfix(GameManager __instance)
{
__instance.enabled = true;
}
}
[HarmonyPatch(typeof(GameManager), nameof(GameManager.RpcEndGame))]
public static class GameManagerPatches
public static class GameManagerRpcEndGamePatch
{
public static bool Prefix(GameOverReason endReason)
{
+2 -2
View File
@@ -33,8 +33,8 @@ internal static class EjectionPatches
__instance.completeString = role.GetCustomEjectionMessage(__instance.initData.networkedPlayer);
}
[HarmonyPatch(typeof(ExileController), nameof(ExileController.WrapUp))]
public static class WrapUpPatch
[HarmonyPatch(typeof(ExileController), nameof(ExileController.ReEnableGameplay))]
public static class ReEnableGameplayPatch
{
public static void Postfix()
{
@@ -13,7 +13,7 @@ namespace MiraAPI.Patches.Roles;
public static class RoleOptionsCollectionPatch
{
/// <summary>
/// This patch fixes GetNumPerGame being inlined (2025.5.20) in the original code.
/// This patch fixes GetNumPerGame being inlined (2025.9.9) in the original code.
/// </summary>
[HarmonyPrefix]
[HarmonyPatch(nameof(RoleOptionsCollectionV10.AnyRolesEnabled))]
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;
using HarmonyLib;
using Hazel;
using Il2CppSystem.Text;
namespace MiraAPI.Patches.Stubs;
@@ -229,4 +230,76 @@ public static class RoleBehaviourStubs
{
// nothing needed
}
/// <summary>
/// Stub method for RoleBehaviour.UseSecondaryAbility.
/// </summary>
/// <param name="instance">The RoleBehaviour object.</param>
[HarmonyReversePatch]
[HarmonyPatch(typeof(RoleBehaviour), nameof(RoleBehaviour.UseSecondaryAbility))]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void UseSecondaryAbility(RoleBehaviour instance)
{
// nothing needed
}
/// <summary>
/// Stub method for RoleBehaviour.OnRoleSet.
/// </summary>
/// <param name="instance">The RoleBehaviour object.</param>
[HarmonyReversePatch]
[HarmonyPatch(typeof(RoleBehaviour), nameof(RoleBehaviour.OnRoleSet))]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void OnRoleSet(RoleBehaviour instance)
{
// nothing needed
}
/// <summary>
/// Stub method for RoleBehaviour.InitializeMeetingAbilityButton.
/// </summary>
/// <param name="instance">The RoleBehaviour object.</param>
[HarmonyReversePatch]
[HarmonyPatch(typeof(RoleBehaviour), nameof(RoleBehaviour.InitializeMeetingAbilityButton))]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void InitializeMeetingAbilityButton(RoleBehaviour instance)
{
// nothing needed
}
/// <summary>
/// Stub method for RoleBehaviour.FindClosestBody.
/// </summary>
/// <param name="instance">The RoleBehaviour object.</param>
[HarmonyReversePatch]
[HarmonyPatch(typeof(RoleBehaviour), nameof(RoleBehaviour.FindClosestBody))]
[MethodImpl(MethodImplOptions.NoInlining)]
public static DeadBody FindClosestBody(RoleBehaviour instance)
{
return null!;
}
/// <summary>
/// Stub method for RoleBehaviour.HandleRoleRpc.
/// </summary>
/// <param name="instance">The RoleBehaviour object.</param>
[HarmonyReversePatch]
[HarmonyPatch(typeof(RoleBehaviour), nameof(RoleBehaviour.HandleRoleRpc))]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void HandleRoleRpc(RoleBehaviour instance, byte callId, MessageReader reader)
{
// nothing needed
}
/// <summary>
/// Stub method for RoleBehaviour.KillAnimSpecialSetup.
/// </summary>
/// <param name="instance">The RoleBehaviour object.</param>
[HarmonyReversePatch]
[HarmonyPatch(typeof(RoleBehaviour), nameof(RoleBehaviour.KillAnimSpecialSetup))]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void KillAnimSpecialSetup(RoleBehaviour instance, DeadBody deadBody, PlayerControl killer, PlayerControl victim)
{
// nothing needed
}
}