mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Merge branch 'dev' into feat-addressables-2
This commit is contained in:
commit
9e6524817a
4 files changed
+23
-1
No files matched your search
@@ -16,6 +16,7 @@ namespace MiraAPI;
|
||||
[BepInAutoPlugin("mira.api", "MiraAPI")]
|
||||
[BepInProcess("Among Us.exe")]
|
||||
[BepInDependency(ReactorPlugin.Id)]
|
||||
[BepInDependency(ModCompatibility.SubmergedId, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
[ReactorModFlags(ModFlags.RequireOnAllClients)]
|
||||
public partial class MiraApiPlugin : BasePlugin
|
||||
{
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
|
||||
namespace MiraAPI;
|
||||
|
||||
/// <summary>
|
||||
/// Mod compatibility tools.
|
||||
/// </summary>
|
||||
public static class ModCompatibility
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID for the Submerged mod.
|
||||
/// </summary>
|
||||
public const string SubmergedId = "Submerged";
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the Submerged mod is loaded.
|
||||
/// </summary>
|
||||
public static bool SubmergedLoaded => IL2CPPChainloader.Instance.Plugins.TryGetValue(SubmergedId, out _);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public static class EjectionPatches
|
||||
{
|
||||
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)
|
||||
if (ModCompatibility.SubmergedLoaded && AccessTools.TypeByName("Submerged.ExileCutscene.SubmergedExileController") is { } type)
|
||||
{
|
||||
yield return AccessTools.Method(type, "WrapUpAndSpawn");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Il2CppInterop.Runtime.Attributes;
|
||||
using Reactor.Utilities.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -19,6 +20,7 @@ public class PlayerVoteData(nint cppPtr) : MonoBehaviour(cppPtr)
|
||||
/// <summary>
|
||||
/// Gets the list of votes the owner has.
|
||||
/// </summary>
|
||||
[HideFromIl2Cpp]
|
||||
public List<CustomVote> Votes { get; private set; } = [];
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user