mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
31 lines
864 B
C#
31 lines
864 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MiraAPI.Modifiers;
|
|
using MiraAPI.Modifiers.Types;
|
|
using MiraAPI.PluginLoading;
|
|
using MiraAPI.Utilities.Assets;
|
|
using UnityEngine;
|
|
|
|
namespace MiraAPI.MeetingAbilities;
|
|
|
|
public static class TargetedMeetingAbilityManager
|
|
{
|
|
/// <summary>
|
|
/// Gets a list if==of all registered <see cref="TargetedMeetingButton"/>.
|
|
/// </summary>
|
|
public static List<TargetedMeetingButton> Buttons { get; internal set; } = new();
|
|
|
|
internal static bool RegisterMeetingAbility(Type type, MiraPluginInfo info)
|
|
{
|
|
if (!typeof(TargetedMeetingButton).IsAssignableFrom(type))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
var button = Activator.CreateInstance(type) as TargetedMeetingButton;
|
|
info.InternalMeetingAbilities.Add(button);
|
|
Buttons.Add(button);
|
|
return true;
|
|
}
|
|
}
|