diff --git a/Directory.Build.props b/Directory.Build.props
index e60aaf9..b09c823 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -8,7 +8,7 @@
true
- 0.4.0
+ 0.4.1devAll Of Us, XtraCube, Angxl
diff --git a/MiraAPI.Example/ExamplePlugin.cs b/MiraAPI.Example/ExamplePlugin.cs
index 0aed9c4..b20ec41 100644
--- a/MiraAPI.Example/ExamplePlugin.cs
+++ b/MiraAPI.Example/ExamplePlugin.cs
@@ -1,5 +1,4 @@
-using System.Linq;
-using BepInEx;
+using BepInEx;
using BepInEx.Configuration;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
diff --git a/MiraAPI.Example/Options/Modifiers/GeneralModifierOptions.cs b/MiraAPI.Example/Options/Modifiers/GeneralModifierOptions.cs
index 1414799..0bcbcdc 100644
--- a/MiraAPI.Example/Options/Modifiers/GeneralModifierOptions.cs
+++ b/MiraAPI.Example/Options/Modifiers/GeneralModifierOptions.cs
@@ -9,7 +9,7 @@ public class GeneralModifierOptions : AbstractOptionGroup
public override uint GroupPriority => 0;
- public override bool ShowInModifiersMenu => true;
+ public override MenuCategory ParentMenu => MenuCategory.Modifiers;
[ModdedToggleOption("Some Boolean Option")]
public bool SomeBooleanOption { get; set; } = true;
diff --git a/MiraAPI.Example/Options/Roles/FreezerRoleSettings.cs b/MiraAPI.Example/Options/Roles/FreezerRoleSettings.cs
index 1473068..3c1fdeb 100644
--- a/MiraAPI.Example/Options/Roles/FreezerRoleSettings.cs
+++ b/MiraAPI.Example/Options/Roles/FreezerRoleSettings.cs
@@ -2,11 +2,17 @@
using MiraAPI.GameOptions;
using MiraAPI.GameOptions.Attributes;
using MiraAPI.Utilities;
+using MiraAPI.Utilities.Assets;
namespace MiraAPI.Example.Options.Roles;
public class FreezerRoleSettings : AbstractOptionGroup
{
+ public override OptionNotifConfiguration Configuration => new(
+ Palette.Blue,
+ TmpSpriteUtils.CreateSpriteAsset(
+ MiraAssets.ImpostorFile.LoadAsset(),
+ "ApiExample.Role.Impostor.FreezerRole"));
public override string GroupName => "Custom Role";
[ModdedNumberOption("Freeze Duration", 1, 15, 1, MiraNumberSuffixes.Seconds)]
diff --git a/MiraAPI.Example/Options/Roles/TeleporterOptions.cs b/MiraAPI.Example/Options/Roles/TeleporterOptions.cs
index b6d02a4..d05569b 100644
--- a/MiraAPI.Example/Options/Roles/TeleporterOptions.cs
+++ b/MiraAPI.Example/Options/Roles/TeleporterOptions.cs
@@ -6,7 +6,7 @@ using MiraAPI.Utilities;
namespace MiraAPI.Example.Options.Roles;
-public class TeleporterOptions : AbstractOptionGroup
+public class TeleporterOptions : AbstractRoleOptionGroup
{
public override string GroupName => "Teleporter";
diff --git a/MiraAPI.Example/Roles/ChameleonRole.cs b/MiraAPI.Example/Roles/ChameleonRole.cs
index c1d7779..f601551 100644
--- a/MiraAPI.Example/Roles/ChameleonRole.cs
+++ b/MiraAPI.Example/Roles/ChameleonRole.cs
@@ -1,6 +1,7 @@
using AmongUs.GameOptions;
using MiraAPI.Patches.Stubs;
using MiraAPI.Roles;
+using MiraAPI.Utilities.Assets;
using Reactor.Utilities;
using TMPro;
using UnityEngine;
@@ -20,6 +21,8 @@ public class ChameloenRole : CrewmateRole, ICustomRole
public CustomRoleConfiguration Configuration => new(this)
{
OptionsScreenshot = ExampleAssets.Banner,
+ Icon = MiraAssets.CrewmateFile,
+ IconTmp = TmpSpriteUtils.CreateSpriteAsset(MiraAssets.CrewmateFile.LoadAsset(), "ApiExample.Role.Impostor.ChameleonRole"),
IntroSound = CustomRoleUtils.GetIntroSound(RoleTypes.Shapeshifter),
};
diff --git a/MiraAPI.Example/Roles/FreezerRole.cs b/MiraAPI.Example/Roles/FreezerRole.cs
index bef24d2..5a7f4bd 100644
--- a/MiraAPI.Example/Roles/FreezerRole.cs
+++ b/MiraAPI.Example/Roles/FreezerRole.cs
@@ -1,4 +1,5 @@
using MiraAPI.Roles;
+using MiraAPI.Utilities.Assets;
using UnityEngine;
namespace MiraAPI.Example.Roles;
@@ -13,6 +14,8 @@ public class FreezerRole : ImpostorRole, ICustomRole
public CustomRoleConfiguration Configuration => new CustomRoleConfiguration(this)
{
+ Icon = MiraAssets.ImpostorFile,
+ IconTmp = TmpSpriteUtils.CreateSpriteAsset(MiraAssets.ImpostorFile.LoadAsset(), "ApiExample.Role.Impostor.FreezerRole"),
OptionsScreenshot = ExampleAssets.Banner,
MaxRoleCount = 2,
};
diff --git a/MiraAPI/Colors/PaletteManager.cs b/MiraAPI/Colors/PaletteManager.cs
index c788353..fe7e725 100644
--- a/MiraAPI/Colors/PaletteManager.cs
+++ b/MiraAPI/Colors/PaletteManager.cs
@@ -5,12 +5,12 @@ using HarmonyLib;
namespace MiraAPI.Colors;
///
-/// Used to register and track custom colors.
+/// Used to register and track s.
///
public static class PaletteManager
{
///
- /// Gets all registered custom colors.
+ /// Gets all registered s.
///
public static CustomColor[] RegisteredColors => [.. CustomColors];
diff --git a/MiraAPI/Colors/RegisterCustomColorsAttribute.cs b/MiraAPI/Colors/RegisterCustomColorsAttribute.cs
index 0e9ace7..6356582 100644
--- a/MiraAPI/Colors/RegisterCustomColorsAttribute.cs
+++ b/MiraAPI/Colors/RegisterCustomColorsAttribute.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.Colors;
///
-/// Used to mark a class for custom colors registration.
+/// Used to mark a class for registration.
///
[AttributeUsage(AttributeTargets.Class)]
public class RegisterCustomColorsAttribute : Attribute;
diff --git a/MiraAPI/Events/Mira/MiraButtonCancelledEvent.cs b/MiraAPI/Events/Mira/MiraButtonCancelledEvent.cs
index f4a6ebf..e6c7c15 100644
--- a/MiraAPI/Events/Mira/MiraButtonCancelledEvent.cs
+++ b/MiraAPI/Events/Mira/MiraButtonCancelledEvent.cs
@@ -3,20 +3,20 @@
namespace MiraAPI.Events.Mira;
///
-/// Invoked when a Mira Button click is cancelled. Do not use for vanilla buttons.
+/// Invoked when a click is cancelled. Do not use for vanilla s.
///
-/// The Mira Button type.
+/// The type.
public sealed class MiraButtonCancelledEvent : MiraEvent where T : CustomActionButton
{
///
- /// Gets Mira Button whose click was cancelled.
+ /// Gets the whose click was cancelled.
///
public T Button { get; }
///
/// Initializes a new instance of the class.
///
- /// The Mira Button whose click was cancelled.
+ /// The whose click was cancelled.
public MiraButtonCancelledEvent(T button)
{
Button = button;
@@ -24,19 +24,19 @@ public sealed class MiraButtonCancelledEvent : MiraEvent where T : CustomActi
}
///
-/// Invoked when a Mira Button click is cancelled. Do not use for vanilla buttons.
+/// Invoked when a click is cancelled. Do not use for vanilla s.
///
public sealed class MiraButtonCancelledEvent : MiraEvent
{
///
- /// Gets Mira Button whose click was cancelled.
+ /// Gets the whose click was cancelled.
///
public CustomActionButton Button { get; }
///
/// Initializes a new instance of the class.
///
- /// The Mira Button whose click was cancelled.
+ /// The whose click was cancelled.
public MiraButtonCancelledEvent(CustomActionButton button)
{
Button = button;
diff --git a/MiraAPI/Events/Mira/MiraButtonClickEvent.cs b/MiraAPI/Events/Mira/MiraButtonClickEvent.cs
index c070383..401cc11 100644
--- a/MiraAPI/Events/Mira/MiraButtonClickEvent.cs
+++ b/MiraAPI/Events/Mira/MiraButtonClickEvent.cs
@@ -3,26 +3,26 @@
namespace MiraAPI.Events.Mira;
///
-/// Button click event for Mira Buttons only. Do not use for vanilla buttons.
+/// Button click event for s only. Do not use for vanilla s.
///
-/// The Mira Button type.
+/// The type.
public sealed class MiraButtonClickEvent : MiraCancelableEvent where T : CustomActionButton
{
///
- /// Gets Mira Button that was clicked.
+ /// Gets the that was clicked.
///
public T Button { get; }
///
- /// Gets the generic click event that is invoked before this button-specific event.
+ /// Gets the generic that is invoked before this button-specific event.
///
public MiraButtonClickEvent GenericClickEvent { get; }
///
/// Initializes a new instance of the class.
///
- /// The Mira Button that was clicked.
- /// The generic click event invoked before button-specific events.
+ /// The that was clicked.
+ /// The generic invoked before button-specific events.
public MiraButtonClickEvent(T button, MiraButtonClickEvent genericClickEvent)
{
GenericClickEvent = genericClickEvent;
@@ -31,19 +31,19 @@ public sealed class MiraButtonClickEvent : MiraCancelableEvent where T : Cust
}
///
-/// Button click event for Mira Buttons only. Do not use for vanilla buttons.
+/// Button click event for s only. Do not use for vanilla s.
///
public sealed class MiraButtonClickEvent : MiraCancelableEvent
{
///
- /// Gets Mira Button that was clicked.
+ /// Gets the that was clicked.
///
public CustomActionButton Button { get; }
///
/// Initializes a new instance of the class.
///
- /// The Mira Button that was clicked.
+ /// The that was clicked.
public MiraButtonClickEvent(CustomActionButton button)
{
Button = button;
diff --git a/MiraAPI/Events/MiraEventHandle.cs b/MiraAPI/Events/MiraEventHandle.cs
index 70514c4..451e6a2 100644
--- a/MiraAPI/Events/MiraEventHandle.cs
+++ b/MiraAPI/Events/MiraEventHandle.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.Events;
///
-/// Event handle to use when unregistering an event.
+/// Event handle to use when unregistering a .
///
public class MiraEventHandle
{
diff --git a/MiraAPI/Events/MiraEventManager.cs b/MiraAPI/Events/MiraEventManager.cs
index bac91c5..30ffb74 100644
--- a/MiraAPI/Events/MiraEventManager.cs
+++ b/MiraAPI/Events/MiraEventManager.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-using Reactor.Utilities;
namespace MiraAPI.Events;
@@ -13,11 +12,11 @@ public static class MiraEventManager
private static readonly Dictionary> EventWrappers = [];
///
- /// Invoke an event.
+ /// Invoke a .
///
- /// The event instance.
+ /// The instance.
/// Type of Event.
- /// If there was an event handler invoked for this event, return true. Otherwise, return false.
+ /// If there was an event handler invoked for this event, return . Otherwise, return .
public static bool InvokeEvent(T eventInstance) where T : MiraEvent
{
EventWrappers.TryGetValue(typeof(T), out var handlers);
@@ -42,11 +41,11 @@ public static class MiraEventManager
}
///
- /// Invoke an event and use a specific type to find the handlers.
+ /// Invoke a and use a specific type to find the handlers.
///
- /// The event instance.
+ /// The instance.
/// The type to use for handler lookup.
- /// If there was an event handler invoked for this event, return true. Otherwise, return false.
+ /// If there was an event handler invoked for this event, return . Otherwise, return .
public static bool InvokeEvent(MiraEvent eventInstance, Type type)
{
EventWrappers.TryGetValue(type, out var handlers);
@@ -71,12 +70,12 @@ public static class MiraEventManager
}
///
- /// Register an event.
+ /// Register a handler.
///
- /// The type of event.
- /// The MethodInfo of the event handler.
+ /// The type of event.
+ /// The of the event handler.
/// The priority of the event handler. Lower values are called first.
- /// An event handle to use when unregistering the event.
+ /// A to use when unregistering the event.
public static MiraEventHandle RegisterEventHandler(Type type, MethodInfo methodInfo, int priority = 0)
{
if (!type.IsSubclassOf(typeof(MiraEvent)))
@@ -102,12 +101,12 @@ public static class MiraEventManager
}
///
- /// Register an event.
+ /// Register a handler.
///
/// The callback method/handler for the event.
/// The priority of the event handler. Lower values are called first.
- /// Type of event.
- /// An event handle to use when unregistering the event.
+ /// Type of event.
+ /// A to use when unregistering the event.
public static MiraEventHandle RegisterEventHandler(Action handler, int priority = 0) where T : MiraEvent
{
EventWrappers.TryAdd(typeof(T), []);
@@ -127,10 +126,10 @@ public static class MiraEventManager
}
///
- /// Unregister an event using the event handle.
+ /// Unregister a handler using the .
///
/// A handle to the event.
- /// True if the event was unregistered successfully, false otherwise.
+ /// if the event was unregistered successfully, otherwise.
public static bool UnregisterEventHandler(MiraEventHandle eventHandle)
{
if (!EventWrappers.TryGetValue(eventHandle.EventType, out var handlers))
diff --git a/MiraAPI/Events/MiraEventWrapper.cs b/MiraAPI/Events/MiraEventWrapper.cs
index 7e754c3..3784688 100644
--- a/MiraAPI/Events/MiraEventWrapper.cs
+++ b/MiraAPI/Events/MiraEventWrapper.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.Events;
///
-/// Wrapper for event handlers.
+/// Wrapper for handlers.
///
public class MiraEventWrapper
{
diff --git a/MiraAPI/Events/RegisterEventAttribute.cs b/MiraAPI/Events/RegisterEventAttribute.cs
index 169c125..2fee367 100644
--- a/MiraAPI/Events/RegisterEventAttribute.cs
+++ b/MiraAPI/Events/RegisterEventAttribute.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.Events;
///
-/// Register an event.
+/// Register a handler.
///
[AttributeUsage(AttributeTargets.Method)]
public class RegisterEventAttribute : Attribute
diff --git a/MiraAPI/Events/Vanilla/Gameplay/AfterMurderEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/AfterMurderEvent.cs
index 0f0da3b..8b85622 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/AfterMurderEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/AfterMurderEvent.cs
@@ -6,17 +6,17 @@
public class AfterMurderEvent : MiraEvent
{
///
- /// Gets the player that killed the target.
+ /// Gets the that killed the .
///
public PlayerControl Source { get; }
///
- /// Gets the player that was killed.
+ /// Gets the that was killed.
///
public PlayerControl Target { get; }
///
- /// Gets the player's body, if it exists.
+ /// Gets the 's , if it exists.
///
public DeadBody? DeadBody { get; }
@@ -24,8 +24,8 @@ public class AfterMurderEvent : MiraEvent
/// Initializes a new instance of the class.
///
/// The killer.
- /// The killed player.
- /// The player's vody, if it exists.
+ /// The killed .
+ /// The 's , if it exists.
public AfterMurderEvent(PlayerControl source, PlayerControl target, DeadBody? deadBody)
{
Source = source;
diff --git a/MiraAPI/Events/Vanilla/Gameplay/BeforeGameEndEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/BeforeGameEndEvent.cs
index 0a70a1d..9703bd5 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/BeforeGameEndEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/BeforeGameEndEvent.cs
@@ -1,7 +1,7 @@
namespace MiraAPI.Events.Vanilla.Gameplay;
///
-/// Invoked before RpcEndGame is called, allowing cancellation of the game end entirely.
+/// Invoked before is called, allowing cancellation of the game end entirely.
///
public class BeforeGameEndEvent : MiraCancelableEvent
{
diff --git a/MiraAPI/Events/Vanilla/Gameplay/BeforeMurderEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/BeforeMurderEvent.cs
index 84cc67e..cc07e21 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/BeforeMurderEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/BeforeMurderEvent.cs
@@ -8,25 +8,25 @@ namespace MiraAPI.Events.Vanilla.Gameplay;
public sealed class BeforeMurderEvent : MiraCancelableEvent
{
///
- /// Gets the player that is killing the target.
+ /// Gets the that is killing the .
///
public PlayerControl Source { get; }
///
- /// Gets the player that is being killed.
+ /// Gets the that is being killed.
///
public PlayerControl Target { get; }
///
- /// Gets whether the murder was meant to be done in a meeting via an enum.
+ /// Gets whether the murder was meant to be done in a meeting, via an enum.
///
public MeetingCheck InMeeting { get; }
///
/// Initializes a new instance of the class.
///
- /// The player that is killing the target.
- /// The player that is being killed.
+ /// The that is killing the .
+ /// The that is being killed.
/// Whether the murder is intended to be triggered in a meeting.
public BeforeMurderEvent(PlayerControl source, PlayerControl target, MeetingCheck inMeeting)
{
@@ -38,8 +38,8 @@ public sealed class BeforeMurderEvent : MiraCancelableEvent
///
/// Initializes a new instance of the class.
///
- /// The player that is killing the target.
- /// The player that is being killed.
+ /// The that is killing the .
+ /// The that is being killed.
public BeforeMurderEvent(PlayerControl source, PlayerControl target)
{
Source = source;
diff --git a/MiraAPI/Events/Vanilla/Gameplay/BeforeRoundStartEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/BeforeRoundStartEvent.cs
index f9d41ee..77422af 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/BeforeRoundStartEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/BeforeRoundStartEvent.cs
@@ -1,12 +1,13 @@
namespace MiraAPI.Events.Vanilla.Gameplay;
///
-/// Event invoked on IntroCutscene.OnDestroy and ExileController.WrapUp to determine if it should run the round event or not.
+/// Event invoked on and
+/// to determine if it should run the event or not.
///
public class BeforeRoundStartEvent : MiraCancelableEvent
{
///
- /// Gets a value indicating whether the event was triggered by the IntroCutscene or ExileController.
+ /// Gets a value indicating whether the event was triggered by the or .
///
public bool TriggeredByIntro { get; }
diff --git a/MiraAPI/Events/Vanilla/Gameplay/GameEndEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/GameEndEvent.cs
index 1f06533..d44dae5 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/GameEndEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/GameEndEvent.cs
@@ -6,14 +6,14 @@
public class GameEndEvent : MiraEvent
{
///
- /// Gets the instance of the EndGameManager.
+ /// Gets the instance.
///
public EndGameManager EndGameManager { get; }
///
/// Initializes a new instance of the class.
///
- /// The instance of the EndGameManager.
+ /// The instance.
public GameEndEvent(EndGameManager manager)
{
EndGameManager = manager;
diff --git a/MiraAPI/Events/Vanilla/Gameplay/IntroBeginEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/IntroBeginEvent.cs
index 5d5e8d8..b08ec56 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/IntroBeginEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/IntroBeginEvent.cs
@@ -6,7 +6,7 @@
public class IntroBeginEvent : MiraEvent
{
///
- /// Gets the instance of the IntroCutscene.
+ /// Gets the instance.
///
public IntroCutscene IntroCutscene { get; }
diff --git a/MiraAPI/Events/Vanilla/Gameplay/IntroEndEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/IntroEndEvent.cs
index b27bcec..a23b960 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/IntroEndEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/IntroEndEvent.cs
@@ -6,7 +6,7 @@
public class IntroEndEvent(IntroCutscene introCutscene) : MiraEvent
{
///
- /// Gets the instance of the IntroCutscene.
+ /// Gets the instance.
///
public IntroCutscene IntroCutscene { get; } = introCutscene;
}
diff --git a/MiraAPI/Events/Vanilla/Gameplay/IntroRoleRevealEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/IntroRoleRevealEvent.cs
index 809ce11..1ffdf67 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/IntroRoleRevealEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/IntroRoleRevealEvent.cs
@@ -6,7 +6,7 @@
public class IntroRoleRevealEvent : MiraEvent
{
///
- /// Gets the instance of the IntroCutscene.
+ /// Gets the instance.
///
public IntroCutscene IntroCutscene { get; }
diff --git a/MiraAPI/Events/Vanilla/Gameplay/RoundStartEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/RoundStartEvent.cs
index 470f85a..93a7bfd 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/RoundStartEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/RoundStartEvent.cs
@@ -1,12 +1,13 @@
namespace MiraAPI.Events.Vanilla.Gameplay;
///
-/// Start Round event, invoked on IntroCutscene.OnDestroy and ExileController.WrapUp if the event isn't cancelled.
+/// Start Round event, invoked on and
+/// if the isn't cancelled.
///
public class RoundStartEvent : MiraEvent
{
///
- /// Gets a value indicating whether the event was triggered by the IntroCutscene or ExileController.
+ /// Gets a value indicating whether the event was triggered by the or .
///
public bool TriggeredByIntro { get; }
diff --git a/MiraAPI/Events/Vanilla/Gameplay/SetRoleEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/SetRoleEvent.cs
index 4c00cf2..1ebfd78 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/SetRoleEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/SetRoleEvent.cs
@@ -8,7 +8,7 @@ namespace MiraAPI.Events.Vanilla.Gameplay;
public class SetRoleEvent : MiraEvent
{
///
- /// Gets the player whos role was changed.
+ /// Gets the whose role was changed.
///
public PlayerControl Player { get; }
diff --git a/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonCancelledEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonCancelledEvent.cs
index 4265a3a..9e334b8 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonCancelledEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonCancelledEvent.cs
@@ -3,20 +3,20 @@
namespace MiraAPI.Events.Vanilla.Gameplay;
///
-/// Invoked when a Vanilla Button click is cancelled. Do not use for custom buttons.
+/// Invoked when a Vanilla click is cancelled. Do not use for .
///
-/// The Vanilla Button type.
+/// The vanilla type.
public sealed class VanillaButtonCancelledEvent : MiraEvent where T : AbilityButton
{
///
- /// Gets Vanilla Button whose click was cancelled.
+ /// Gets the Vanilla whose click was cancelled.
///
public T Button { get; }
///
/// Initializes a new instance of the class.
///
- /// The Mira Button whose click was cancelled.
+ /// The vanilla whose click was cancelled.
public VanillaButtonCancelledEvent(T button)
{
Button = button;
@@ -24,19 +24,19 @@ public sealed class VanillaButtonCancelledEvent : MiraEvent where T : Ability
}
///
-/// Invoked when a Vanilla Button click is cancelled. Do not use for custom buttons.
+/// Invoked when a Vanilla click is cancelled. Do not use for s.
///
public sealed class VanillaButtonCancelledEvent : MiraEvent
{
///
- /// Gets Vanilla Button whose click was cancelled.
+ /// Gets the Vanilla whose click was cancelled.
///
public AbilityButton Button { get; }
///
/// Initializes a new instance of the class.
///
- /// The Vanilla Button whose click was cancelled.
+ /// The vanilla whose click was cancelled.
public VanillaButtonCancelledEvent(AbilityButton button)
{
Button = button;
diff --git a/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonClickEvent.cs b/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonClickEvent.cs
index 3da499b..563cf66 100644
--- a/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonClickEvent.cs
+++ b/MiraAPI/Events/Vanilla/Gameplay/VanillaButtonClickEvent.cs
@@ -3,26 +3,26 @@
namespace MiraAPI.Events.Vanilla.Gameplay;
///
-/// Button click event for Vanilla Buttons only. Do not use for custom buttons.
+/// Button click event for Vanilla s only. Do not use for s.
///
-/// The Vanilla Button type.
+/// The vanilla type.
public sealed class VanillaButtonClickEvent : MiraCancelableEvent where T : AbilityButton
{
///
- /// Gets Vanilla Button that was clicked.
+ /// Gets the vanilla that was clicked.
///
public T Button { get; }
///
- /// Gets the generic click event that is invoked before this button-specific event.
+ /// Gets the generic that is invoked before this button-specific event.
///
public VanillaButtonClickEvent GenericClickEvent { get; }
///
/// Initializes a new instance of the class.
///
- /// The Mira Button that was clicked.
- /// The generic click event invoked before button-specific events.
+ /// The vanilla that was clicked.
+ /// The generic invoked before button-specific events.
public VanillaButtonClickEvent(T button, VanillaButtonClickEvent genericClickEvent)
{
GenericClickEvent = genericClickEvent;
@@ -31,31 +31,31 @@ public sealed class VanillaButtonClickEvent : MiraCancelableEvent where T : A
}
///
-/// Button click event for Vanilla Buttons only. Do not use for custom buttons.
+/// Button click event for Vanilla only. Do not use for s.
///
public sealed class VanillaButtonClickEvent : MiraCancelableEvent
{
///
- /// Gets Vanilla Button that was clicked.
+ /// Gets the Vanilla that was clicked.
///
public AbilityButton Button { get; }
///
- /// Gets the target player, if any, of the Vanilla Button that was clicked.
+ /// Gets the target , if any, of the Vanilla that was clicked.
///
public PlayerControl? PlayerTarget { get; }
///
- /// Gets the target vent, if any, of the Vanilla Button that was clicked.
+ /// Gets the target , if any, of the Vanilla that was clicked.
///
public Vent? VentTarget { get; }
///
/// Initializes a new instance of the class.
///
- /// The Vanilla Button that was clicked.
- /// The Player target, if any.
- /// The Vent target, if any.
+ /// The Vanilla that was clicked.
+ /// The target, if any.
+ /// The target, if any.
public VanillaButtonClickEvent(AbilityButton button, PlayerControl? playerTarget = null, Vent? ventTarget = null)
{
Button = button;
diff --git a/MiraAPI/Events/Vanilla/Map/PlayerOpenSabotageEvent.cs b/MiraAPI/Events/Vanilla/Map/PlayerOpenSabotageEvent.cs
index 8b2b6cb..6415d70 100644
--- a/MiraAPI/Events/Vanilla/Map/PlayerOpenSabotageEvent.cs
+++ b/MiraAPI/Events/Vanilla/Map/PlayerOpenSabotageEvent.cs
@@ -6,14 +6,14 @@
public class PlayerOpenSabotageEvent : MiraCancelableEvent
{
///
- /// Gets the MapBehaviour.
+ /// Gets the .
///
public MapBehaviour MapBehaviour { get; }
///
/// Initializes a new instance of the class.
///
- /// The MapBehaviour.
+ /// The .
public PlayerOpenSabotageEvent(MapBehaviour mapBehaviour)
{
MapBehaviour = mapBehaviour;
diff --git a/MiraAPI/Events/Vanilla/Map/UpdateSystemEvent.cs b/MiraAPI/Events/Vanilla/Map/UpdateSystemEvent.cs
index 5b70090..5e2219c 100644
--- a/MiraAPI/Events/Vanilla/Map/UpdateSystemEvent.cs
+++ b/MiraAPI/Events/Vanilla/Map/UpdateSystemEvent.cs
@@ -1,7 +1,7 @@
namespace MiraAPI.Events.Vanilla.Map;
///
-/// Cancelable event that is invoked before a system is updated. Usually used for sabotage events.
+/// that is invoked before a system is updated. Usually used for sabotage events.
///
public class UpdateSystemEvent : MiraCancelableEvent
{
@@ -11,7 +11,7 @@ public class UpdateSystemEvent : MiraCancelableEvent
public SystemTypes SystemType { get; }
///
- /// Gets the player that is updating the system.
+ /// Gets the that is updating the system.
///
public PlayerControl Player { get; }
@@ -21,10 +21,10 @@ public class UpdateSystemEvent : MiraCancelableEvent
public byte Amount { get; }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- /// The SystemType being updated.
- /// The player that is updating the system.
+ /// The being updated.
+ /// The that is updating the system.
/// Amount to update System to.
public UpdateSystemEvent(SystemTypes systemType, PlayerControl player, byte amount)
{
diff --git a/MiraAPI/Events/Vanilla/Meeting/EjectionEvent.cs b/MiraAPI/Events/Vanilla/Meeting/EjectionEvent.cs
index 1d25098..054335c 100644
--- a/MiraAPI/Events/Vanilla/Meeting/EjectionEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/EjectionEvent.cs
@@ -6,14 +6,14 @@
public class EjectionEvent : MiraEvent
{
///
- /// Gets the instance of the ExileController.
+ /// Gets the instance.
///
public ExileController ExileController { get; }
///
/// Initializes a new instance of the class.
///
- /// The exile controller.
+ /// The instance.
public EjectionEvent(ExileController controller)
{
ExileController = controller;
diff --git a/MiraAPI/Events/Vanilla/Meeting/EndMeetingEvent.cs b/MiraAPI/Events/Vanilla/Meeting/EndMeetingEvent.cs
index 55cdae9..98ccaa1 100644
--- a/MiraAPI/Events/Vanilla/Meeting/EndMeetingEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/EndMeetingEvent.cs
@@ -6,7 +6,7 @@
public class EndMeetingEvent(MeetingHud meetingHud) : MiraEvent
{
///
- /// Gets the MeetingHud instance.
+ /// Gets the instance.
///
public MeetingHud MeetingHud { get; } = meetingHud;
}
diff --git a/MiraAPI/Events/Vanilla/Meeting/ReportBodyEvent.cs b/MiraAPI/Events/Vanilla/Meeting/ReportBodyEvent.cs
index 5c51576..fb085b6 100644
--- a/MiraAPI/Events/Vanilla/Meeting/ReportBodyEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/ReportBodyEvent.cs
@@ -2,7 +2,7 @@
///
/// The event that is invoked when a body is reported.
-/// This is invoked in CmdReportBody.
+/// This is invoked in .
///
public class ReportBodyEvent : MiraCancelableEvent
{
@@ -12,12 +12,12 @@ public class ReportBodyEvent : MiraCancelableEvent
public PlayerControl Reporter { get; }
///
- /// Gets the player that is being reported. Will be null for emergency meeting.
+ /// Gets the player that is being reported. Will be for emergency meeting.
///
public NetworkedPlayerInfo? Target { get; }
///
- /// Gets the body that is being reported. Will be null for emergency meeting.
+ /// Gets the that is being reported. Will be for emergency meeting.
///
public DeadBody? Body { get; }
@@ -26,7 +26,7 @@ public class ReportBodyEvent : MiraCancelableEvent
///
/// The player who reported the body.
/// The player being reported.
- /// The body being reported.
+ /// The being reported.
public ReportBodyEvent(PlayerControl reporter, NetworkedPlayerInfo? target, DeadBody? body)
{
Reporter = reporter;
diff --git a/MiraAPI/Events/Vanilla/Meeting/StartMeetingEvent.cs b/MiraAPI/Events/Vanilla/Meeting/StartMeetingEvent.cs
index 78e58f3..0a15d99 100644
--- a/MiraAPI/Events/Vanilla/Meeting/StartMeetingEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/StartMeetingEvent.cs
@@ -7,14 +7,14 @@
public class StartMeetingEvent : MiraEvent
{
///
- /// Gets the MeetingHud instance.
+ /// Gets the instance.
///
public MeetingHud MeetingHud { get; }
///
/// Initializes a new instance of the class.
///
- /// The MeetingHud instance.
+ /// The instance.
public StartMeetingEvent(MeetingHud meetingHud)
{
MeetingHud = meetingHud;
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/AfterVoteEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/AfterVoteEvent.cs
index 714d3b8..60a3d36 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/AfterVoteEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/AfterVoteEvent.cs
@@ -1,6 +1,4 @@
-using MiraAPI.Voting;
-
-namespace MiraAPI.Events.Vanilla.Meeting.Voting;
+namespace MiraAPI.Events.Vanilla.Meeting.Voting;
///
/// Event that is invoked after the local player successfully votes a player or skips. This event is not cancelable.
@@ -8,7 +6,7 @@ namespace MiraAPI.Events.Vanilla.Meeting.Voting;
public class AfterVoteEvent : MiraEvent
{
///
- /// Gets the instance of the voter's vote data.
+ /// Gets the instance of the voter's .
///
public PlayerVoteArea VoteArea { get; }
@@ -20,7 +18,7 @@ public class AfterVoteEvent : MiraEvent
///
/// Initializes a new instance of the class.
///
- /// The player vote area that was voted on.
+ /// The that was voted on.
/// The player who voted.
public AfterVoteEvent(PlayerVoteArea playerVoteArea, PlayerControl voter)
{
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/BeforeVoteEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/BeforeVoteEvent.cs
index 1d8d907..e6b28f9 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/BeforeVoteEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/BeforeVoteEvent.cs
@@ -1,6 +1,4 @@
-using MiraAPI.Voting;
-
-namespace MiraAPI.Events.Vanilla.Meeting.Voting;
+namespace MiraAPI.Events.Vanilla.Meeting.Voting;
///
/// Event that is invoked before the local player confirms a vote on a player or when skipping. This event is cancelable.
@@ -8,7 +6,7 @@ namespace MiraAPI.Events.Vanilla.Meeting.Voting;
public class BeforeVoteEvent : MiraCancelableEvent
{
///
- /// Gets the instance of the voter's vote data.
+ /// Gets the instance of the voter's .
///
public PlayerVoteArea VoteArea { get; }
@@ -20,7 +18,7 @@ public class BeforeVoteEvent : MiraCancelableEvent
///
/// Initializes a new instance of the class.
///
- /// The player vote area that was voted on.
+ /// The that was voted on.
/// The player who voted.
public BeforeVoteEvent(PlayerVoteArea playerVoteArea, PlayerControl voter)
{
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/CheckForEndVotingEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/CheckForEndVotingEvent.cs
index b0bdae5..988cdc4 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/CheckForEndVotingEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/CheckForEndVotingEvent.cs
@@ -18,7 +18,7 @@ public class CheckForEndVotingEvent : MiraCancelableEvent
///
/// Initializes a new instance of the class.
///
- /// >True if voting is complete, false otherwise.
+ /// if voting is complete, otherwise.
public CheckForEndVotingEvent(bool isVotingComplete)
{
IsVotingComplete = isVotingComplete;
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/DummyVoteEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/DummyVoteEvent.cs
index 2f5cba0..ea3aa69 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/DummyVoteEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/DummyVoteEvent.cs
@@ -15,7 +15,7 @@ public class DummyVoteEvent : MiraCancelableEvent
public DummyBehaviour Dummy { get; }
///
- /// Gets the instance of the dummy's vote data.
+ /// Gets the instance of the dummy's .
///
public PlayerVoteData VoteData { get; }
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/HandleVoteEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/HandleVoteEvent.cs
index 48ec40f..c445778 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/HandleVoteEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/HandleVoteEvent.cs
@@ -5,12 +5,12 @@ namespace MiraAPI.Events.Vanilla.Meeting.Voting;
///
/// The event that is invoked when Mira handles a vote. This is invoked before Mira's behaviour, so be cautious.
/// If you intend on adding custom vote behaviour, cancel the event and do so.
-/// If you are NOT canceling the event, keep in mind that Mira automatically removes a vote and adds the suspect to the VotedPlayers list after this event is invoked.
+/// If you are NOT canceling the event, keep in mind that Mira automatically removes a vote and adds the suspect to the list after this event is invoked.
///
public class HandleVoteEvent : MiraCancelableEvent
{
///
- /// Gets the instance of the voter's vote data.
+ /// Gets the instance of the voter's .
///
public PlayerVoteData VoteData { get; }
@@ -30,14 +30,14 @@ public class HandleVoteEvent : MiraCancelableEvent
public bool PreventVote { get; }
///
- /// Gets the player info of the target.
+ /// Gets the of the target.
///
public NetworkedPlayerInfo TargetPlayerInfo { get; }
///
/// Initializes a new instance of the class.
///
- /// The voter's data.
+ /// The voter's .
/// The target's playerId.
public HandleVoteEvent(PlayerVoteData playerVoteData, byte targetId)
{
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/MeetingSelectEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/MeetingSelectEvent.cs
index 6ea8eff..0c3f6d5 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/MeetingSelectEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/MeetingSelectEvent.cs
@@ -8,7 +8,7 @@ namespace MiraAPI.Events.Vanilla.Meeting.Voting;
public class MeetingSelectEvent : MiraEvent
{
///
- /// Gets the instance of the voter's vote data.
+ /// Gets the instance of the voter's .
///
public PlayerVoteData VoteData { get; }
@@ -18,7 +18,7 @@ public class MeetingSelectEvent : MiraEvent
public int TargetId { get; }
///
- /// Gets the player info of the target.
+ /// Gets the of the target.
///
public NetworkedPlayerInfo TargetPlayerInfo { get; }
@@ -30,9 +30,9 @@ public class MeetingSelectEvent : MiraEvent
///
/// Initializes a new instance of the class.
///
- /// The voter's data.
+ /// The voter's .
/// The target's playerId.
- /// >Whether the player is allowed to select the target.
+ /// Whether the player is allowed to select the target.
public MeetingSelectEvent(PlayerVoteData playerVoteData, int targetId, bool allowSelect)
{
VoteData = playerVoteData;
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/PopulateResultsEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/PopulateResultsEvent.cs
index 131b6d5..f5e4001 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/PopulateResultsEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/PopulateResultsEvent.cs
@@ -4,20 +4,20 @@ using MiraAPI.Voting;
namespace MiraAPI.Events.Vanilla.Meeting.Voting;
///
-/// Called in VotingUtils.HandlePopulateResults.
+/// Called in .
/// Cancelling is NOT advised but if you do plan on cancelling, please ensure you account for displaying ALL player's votes.
///
public class PopulateResultsEvent : MiraCancelableEvent
{
///
- /// Gets a list of networked votes.
+ /// Gets a list of networked s.
///
public List Votes { get; }
///
/// Initializes a new instance of the class.
///
- /// The list of votes.
+ /// The list of s.
public PopulateResultsEvent(List votes)
{
Votes = votes;
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/ProcessVotesEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/ProcessVotesEvent.cs
index 9ecaab0..a61cc51 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/ProcessVotesEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/ProcessVotesEvent.cs
@@ -10,8 +10,8 @@ namespace MiraAPI.Events.Vanilla.Meeting.Voting;
///
/// Initializes a new instance of the class.
///
-/// >The list of votes that are being processed.
-/// The player to be exiled. Will be null if no player is to be exiled.
+/// The list of s that are being processed.
+/// The player to be exiled. Will be if no player is to be exiled.
public class ProcessVotesEvent(List votes, NetworkedPlayerInfo? exiledPlayer = null) : MiraEvent
{
private readonly List _originalVotes = [.. votes];
@@ -29,12 +29,12 @@ public class ProcessVotesEvent(List votes, NetworkedPlayerInfo? exil
public bool VotesModified => !Votes.SequenceEqual(_originalVotes);
///
- /// Gets the list of votes that are being processed.
+ /// Gets the list of s that are being processed.
///
public List Votes { get; } = votes;
///
- /// Gets or sets the player to be exiled. Will be null if no player is to be exiled.
+ /// Gets or sets the player to be exiled. Will be if no player is to be exiled.
///
public NetworkedPlayerInfo? ExiledPlayer
{
diff --git a/MiraAPI/Events/Vanilla/Meeting/Voting/VotingCompleteEvent.cs b/MiraAPI/Events/Vanilla/Meeting/Voting/VotingCompleteEvent.cs
index 5f782bf..52d4c36 100644
--- a/MiraAPI/Events/Vanilla/Meeting/Voting/VotingCompleteEvent.cs
+++ b/MiraAPI/Events/Vanilla/Meeting/Voting/VotingCompleteEvent.cs
@@ -3,11 +3,11 @@
///
/// The event that is invoked when the voting phase of a meeting is complete.
///
-/// The MeetingHud instance.
+/// The instance.
public class VotingCompleteEvent(MeetingHud meetingHud) : MiraEvent
{
///
- /// Gets the MeetingHud instance.
+ /// Gets the instance.
///
public MeetingHud MeetingHud { get; } = meetingHud;
}
diff --git a/MiraAPI/Events/Vanilla/Player/CompleteHnsTaskEvent.cs b/MiraAPI/Events/Vanilla/Player/CompleteHnsTaskEvent.cs
index 7d8f71d..5ac7190 100644
--- a/MiraAPI/Events/Vanilla/Player/CompleteHnsTaskEvent.cs
+++ b/MiraAPI/Events/Vanilla/Player/CompleteHnsTaskEvent.cs
@@ -16,14 +16,14 @@ public class CompleteHnsTaskEvent : MiraEvent
public PlayerTask Task { get; }
///
- /// Gets the instance of the attached to the game.
+ /// Gets the instance of the attached to the game.
///
public HideAndSeekManager HnsManager { get; }
///
/// Initializes a new instance of the class.
///
- /// The Hide and Seek Manager currently active.
+ /// The currently active.
/// The player who completed the task.
/// The task that the player completed.
public CompleteHnsTaskEvent(HideAndSeekManager hnsManager, PlayerControl player, PlayerTask task)
diff --git a/MiraAPI/Events/Vanilla/Player/PlayerDeathEvent.cs b/MiraAPI/Events/Vanilla/Player/PlayerDeathEvent.cs
index 9b1ae49..3821af4 100644
--- a/MiraAPI/Events/Vanilla/Player/PlayerDeathEvent.cs
+++ b/MiraAPI/Events/Vanilla/Player/PlayerDeathEvent.cs
@@ -16,7 +16,7 @@ public class PlayerDeathEvent : MiraEvent
public DeathReason DeathReason { get; }
///
- /// Gets the dead body associated with the player, if any.
+ /// Gets the associated with the player, if any.
///
public DeadBody? DeadBody { get; }
@@ -25,7 +25,7 @@ public class PlayerDeathEvent : MiraEvent
///
/// The player who died.
/// The reason the player died.
- /// The player's body, if it exists.
+ /// The player's , if it exists.
public PlayerDeathEvent(PlayerControl player, DeathReason reason, DeadBody? deadBody)
{
Player = player;
diff --git a/MiraAPI/Events/Vanilla/Usables/EnterVentEvent.cs b/MiraAPI/Events/Vanilla/Usables/EnterVentEvent.cs
index ce3b3ca..233e6ee 100644
--- a/MiraAPI/Events/Vanilla/Usables/EnterVentEvent.cs
+++ b/MiraAPI/Events/Vanilla/Usables/EnterVentEvent.cs
@@ -6,20 +6,20 @@
public class EnterVentEvent : MiraCancelableEvent
{
///
- /// Gets the player that is entering the vent.
+ /// Gets the that is entering the .
///
public PlayerControl Player { get; }
///
- /// Gets the vent that the player is entering.
+ /// Gets the that the is entering.
///
public Vent? Vent { get; }
///
/// Initializes a new instance of the class.
///
- /// The player that is entering the vent.
- /// The vent being entered.
+ /// The that is entering the .
+ /// The being entered.
public EnterVentEvent(PlayerControl player, Vent? vent)
{
Player = player;
diff --git a/MiraAPI/Events/Vanilla/Usables/ExitVentEvent.cs b/MiraAPI/Events/Vanilla/Usables/ExitVentEvent.cs
index 351411f..6194905 100644
--- a/MiraAPI/Events/Vanilla/Usables/ExitVentEvent.cs
+++ b/MiraAPI/Events/Vanilla/Usables/ExitVentEvent.cs
@@ -6,20 +6,20 @@
public class ExitVentEvent : MiraCancelableEvent
{
///
- /// Gets the player that is exiting the vent.
+ /// Gets the that is exiting the .
///
public PlayerControl Player { get; }
///
- /// Gets the vent that the player is exiting.
+ /// Gets the that the is exiting.
///
public Vent? Vent { get; }
///
/// Initializes a new instance of the class.
///
- /// The player who is exiting the vent.
- /// The vent being exited from.
+ /// The who is exiting the .
+ /// The being exited from.
public ExitVentEvent(PlayerControl player, Vent? vent)
{
Player = player;
diff --git a/MiraAPI/Events/Vanilla/Usables/PlayerCanUseEvent.cs b/MiraAPI/Events/Vanilla/Usables/PlayerCanUseEvent.cs
index f9ba115..9dced79 100644
--- a/MiraAPI/Events/Vanilla/Usables/PlayerCanUseEvent.cs
+++ b/MiraAPI/Events/Vanilla/Usables/PlayerCanUseEvent.cs
@@ -8,7 +8,7 @@ public class PlayerCanUseEvent : PlayerUseEvent
///
/// Initializes a new instance of the class.
///
- /// The IUsable.
+ /// The .
public PlayerCanUseEvent(IUsable usable) : base(usable)
{
}
diff --git a/MiraAPI/Events/Vanilla/Usables/PlayerUseEvent.cs b/MiraAPI/Events/Vanilla/Usables/PlayerUseEvent.cs
index 5f05676..7fc5cd5 100644
--- a/MiraAPI/Events/Vanilla/Usables/PlayerUseEvent.cs
+++ b/MiraAPI/Events/Vanilla/Usables/PlayerUseEvent.cs
@@ -11,19 +11,19 @@ public class PlayerUseEvent : MiraCancelableEvent
public IUsable Usable { get; }
///
- /// Gets a value indicating whether the IUsable is a , , or .
+ /// Gets a value indicating whether the is a , , or .
///
public bool IsPrimaryConsole { get; }
///
- /// Gets a value indicating whether the IUsable is a .
+ /// Gets a value indicating whether the is a .
///
public bool IsVent { get; }
///
/// Initializes a new instance of the class.
///
- /// The IUsable.
+ /// The .
public PlayerUseEvent(IUsable usable)
{
Usable = usable;
diff --git a/MiraAPI/GameEnd/CustomGameOver.cs b/MiraAPI/GameEnd/CustomGameOver.cs
index 70d7b27..bb9e23b 100644
--- a/MiraAPI/GameEnd/CustomGameOver.cs
+++ b/MiraAPI/GameEnd/CustomGameOver.cs
@@ -10,44 +10,44 @@ namespace MiraAPI.GameEnd;
public abstract class CustomGameOver
{
///
- /// Gets the current CustomGameOver.
+ /// Gets the current .
///
public static CustomGameOver? Instance { get; internal set; }
///
- /// Verifies if the condition for this CustomGameOver is met.
+ /// Verifies if the condition for this is met.
///
- /// The PlayerControl that requested the Game Over.
+ /// The that requested the Game Over.
/// The collection of winners.
- /// True if the condition is met, otherwise false.
+ /// if the condition is met, otherwise .
public virtual bool VerifyCondition(PlayerControl playerControl, NetworkedPlayerInfo[] winners)
{
return true;
}
///
- /// Runs before the base game calls EndGameManager.SetEverythingUp.
+ /// Runs before the base game calls .
///
- /// The EndGameManager instance.
- /// Return True to use the run the original method, return False to skip it.
+ /// The instance.
+ /// Return to use the run the original method, return to skip it.
public virtual bool BeforeEndGameSetup(EndGameManager endGameManager)
{
return true;
}
///
- /// Runs after the base game calls EndGameManager.SetEverythingUp.
+ /// Runs after the base game calls .
///
- /// The EndGameManager instance.
+ /// The instance.
public virtual void AfterEndGameSetup(EndGameManager endGameManager)
{
}
///
- /// Get the GameOverReason associated with this CustomGameOver.
+ /// Get the associated with this .
///
/// Type of the custom game over.
- /// The GameOverReason associated with the custom game over.
+ /// The associated with the custom game over.
public static GameOverReason GameOverReason() where T : CustomGameOver
{
return (GameOverReason)GameOverManager.GetGameOverId();
@@ -67,10 +67,10 @@ public abstract class CustomGameOver
}
///
- /// Implicitly convert a CustomGameOver to a GameOverReason.
+ /// Implicitly convert a to a .
///
- /// The CustomGameOver instance.
- /// The GameOverReason associated with the CustomGameOver.
+ /// The instance.
+ /// The associated with the CustomGameOver.
public static implicit operator GameOverReason(CustomGameOver gameOver)
{
return (GameOverReason)GameOverManager.GetGameOverId(gameOver.GetType());
diff --git a/MiraAPI/GameEnd/GameOverManager.cs b/MiraAPI/GameEnd/GameOverManager.cs
index 8bc6f1e..28d2f48 100644
--- a/MiraAPI/GameEnd/GameOverManager.cs
+++ b/MiraAPI/GameEnd/GameOverManager.cs
@@ -1,12 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using Reactor.Utilities;
namespace MiraAPI.GameEnd;
///
-/// Manage custom game overs.
+/// Manage s.
///
public static class GameOverManager
{
@@ -16,11 +15,11 @@ public static class GameOverManager
private static int _nextId = Enum.GetNames().Length;
///
- /// Register a custom game over.
+ /// Register a .
///
- /// Type of the custom game over.
- /// Thrown when the type is not a subclass of CustomGameOver, is abstract, or does not have a parameterless constructor.
- /// >True if the game over was registered successfully, false otherwise.
+ /// Type of the .
+ /// Thrown when the type is not a subclass of , is abstract, or does not have a parameterless constructor.
+ /// if the game over was registered successfully, otherwise.
public static bool RegisterGameOver(Type gameOverType)
{
if (!typeof(CustomGameOver).IsAssignableFrom(gameOverType))
@@ -47,11 +46,11 @@ public static class GameOverManager
}
///
- /// Create an instance of a custom game over.
+ /// Create an instance of a .
///
- /// ID of the custom game over.
- /// The created instance of the custom game over.
- /// An instance of the custom game over.
+ /// ID of the .
+ /// The created instance of the .
+ /// An instance of the .
public static bool TryGetGameOver(int id, [NotNullWhen(true)] out CustomGameOver? customGameOver)
{
if (GameOverTypes.TryGetValue(id, out var gameOverType))
@@ -65,20 +64,20 @@ public static class GameOverManager
}
///
- /// Get the ID of a custom game over.
+ /// Get the ID of a .
///
- /// Type of the custom game over.
- /// The ID of the custom game over.
+ /// Type of the .
+ /// The ID of the .
public static int GetGameOverId() where T : CustomGameOver
{
return GetGameOverId(typeof(T));
}
///
- /// Get the ID of a custom game over.
+ /// Get the ID of a .
///
- /// Type of the custom game over.
- /// The ID of the custom game over.
+ /// Type of the .
+ /// The ID of the .
/// Thrown when the type is not registered.
public static int GetGameOverId(Type gameOverType)
{
diff --git a/MiraAPI/GameOptions/AbstractOptionGroup.cs b/MiraAPI/GameOptions/AbstractOptionGroup.cs
index dfd8f49..f8f0877 100644
--- a/MiraAPI/GameOptions/AbstractOptionGroup.cs
+++ b/MiraAPI/GameOptions/AbstractOptionGroup.cs
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Linq;
using MiraAPI.Modifiers;
+using MiraAPI.Roles;
using UnityEngine;
namespace MiraAPI.GameOptions;
@@ -29,15 +31,18 @@ public abstract class AbstractOptionGroup
public virtual Type? OptionableType => null;
///
- /// Gets a value indicating whether the group should be shown in the modifiers menu. This is deprecated, please use ParentMenu!
+ /// Gets a value indicating whether the group should be shown in the modifiers menu.
///
// TODO: make this not a boolean
+#pragma warning disable S1133
+ [Obsolete("Use ParentMenu instead.")]
+#pragma warning restore S1133
public virtual bool ShowInModifiersMenu => false;
///
/// Gets a value indicating which menu the group is in.
///
- public virtual MenuCategory ParentMenu => MenuCategory.Roles;
+ public virtual MenuCategory ParentMenu => MenuCategory.Game;
///
/// Gets the function that determines whether the group should be visible or not.
@@ -45,19 +50,26 @@ public abstract class AbstractOptionGroup
public virtual Func GroupVisible => () => true;
///
- /// Gets the group color. This is used to color the group in the options menu.
+ /// Gets the group . This is used to color the group in the options menu.
///
public virtual Color GroupColor => MiraApiPlugin.DefaultHeaderColor;
///
/// Gets the group priority. This is used to determine the order in which groups are displayed in the options menu.
- /// Zero is the highest priority, and the default value is the max uint value.
+ /// Zero is the highest priority, and the default value is the max value.
///
public virtual uint GroupPriority => uint.MaxValue;
+ ///
+ /// Gets the default notification settings for the group.
+ ///
+ public virtual OptionNotifConfiguration Configuration => new(new Color(0.7333f, 0.7333f, 0.7333f, 1));
+
internal bool AllOptionsHidden { get; set; }
internal CategoryHeaderMasked? Header { get; set; }
+
+ internal Coroutine? CreationCoroutine { get; set; }
}
///
@@ -69,9 +81,7 @@ public abstract class AbstractOptionGroup : AbstractOptionGroup where T : IOp
///
public override Type OptionableType => typeof(T);
- ///
- /// Gets a value indicating which menu the group is in.
- ///
+ ///
public override MenuCategory ParentMenu
{
get
@@ -90,11 +100,60 @@ public abstract class AbstractOptionGroup : AbstractOptionGroup where T : IOp
}
}
+///
+/// Base class for option groups. An option group is a collection of options that are displayed together in the options menu.
+///
+/// The custom role that the group is for.
+public abstract class AbstractRoleOptionGroup() : AbstractOptionGroup where T : ICustomRole
+{
+ ///
+ public override Type OptionableType => typeof(T);
+
+ ///
+ public override MenuCategory ParentMenu => MenuCategory.Roles;
+
+ ///
+ public override OptionNotifConfiguration Configuration
+ {
+ get
+ {
+ var role = CustomRoleManager.CustomMiraRoles.FirstOrDefault(x => x.GetType() == OptionableType);
+ if (role == null)
+ {
+ return new(new Color(0.7333f, 0.7333f, 0.7333f, 1));
+ }
+ return new(role.RoleColor, role.Configuration.IconTmp);
+ }
+ }
+}
+
+///
+/// Menu categories for option groups.
+///
public enum MenuCategory
{
+ ///
+ /// Determines the option group is in the game settings tab.
+ ///
Game,
+
+ ///
+ /// Determines the option group is in the role settings tab.
+ ///
Roles,
+
+ ///
+ /// Determines the option group is in the modifier settings tab.
+ ///
Modifiers,
+
+ ///
+ /// Determines the option group is in the first custom settings tab.
+ ///
CustomOne,
+
+ ///
+ /// Determines the option group is in the second custom settings tab.
+ ///
CustomTwo,
}
diff --git a/MiraAPI/GameOptions/Attributes/ModdedEnumOptionAttribute.cs b/MiraAPI/GameOptions/Attributes/ModdedEnumOptionAttribute.cs
index 54680f2..5c937b6 100644
--- a/MiraAPI/GameOptions/Attributes/ModdedEnumOptionAttribute.cs
+++ b/MiraAPI/GameOptions/Attributes/ModdedEnumOptionAttribute.cs
@@ -5,7 +5,7 @@ using MiraAPI.GameOptions.OptionTypes;
namespace MiraAPI.GameOptions.Attributes;
///
-/// Attribute for creating an enum option.
+/// Attribute for creating a .
///
[AttributeUsage(AttributeTargets.Property)]
public class ModdedEnumOptionAttribute(string title, Type enumType, string[]? values = null)
diff --git a/MiraAPI/GameOptions/Attributes/ModdedNumberOptionAttribute.cs b/MiraAPI/GameOptions/Attributes/ModdedNumberOptionAttribute.cs
index 63dc82f..6ff98dc 100644
--- a/MiraAPI/GameOptions/Attributes/ModdedNumberOptionAttribute.cs
+++ b/MiraAPI/GameOptions/Attributes/ModdedNumberOptionAttribute.cs
@@ -6,7 +6,7 @@ using MiraAPI.Utilities;
namespace MiraAPI.GameOptions.Attributes;
///
-/// A number option attribute for the modded options system.
+/// Attribute for a .
///
[AttributeUsage(AttributeTargets.Property)]
public class ModdedNumberOptionAttribute(
diff --git a/MiraAPI/GameOptions/Attributes/ModdedOptionAttribute.cs b/MiraAPI/GameOptions/Attributes/ModdedOptionAttribute.cs
index bb9dab5..3d48453 100644
--- a/MiraAPI/GameOptions/Attributes/ModdedOptionAttribute.cs
+++ b/MiraAPI/GameOptions/Attributes/ModdedOptionAttribute.cs
@@ -4,7 +4,7 @@ using System.Reflection;
namespace MiraAPI.GameOptions.Attributes;
///
-/// Represents an attribute that is used to define a modded option.
+/// Represents an attribute that is used to define an .
///
/// The option title.
/// Optional parameter to specify a role Type.
@@ -32,13 +32,13 @@ public abstract class ModdedOptionAttribute(string title, Type? roleType = null,
///
/// Sets the value of the option.
///
- /// The new value as an object.
+ /// The new value as an .
public abstract void SetValue(object value);
///
/// Gets the value of the option.
///
- /// The value of the option as an object.
+ /// The value of the option as an .
public abstract object GetValue();
internal abstract IModdedOption? CreateOption(object? value, PropertyInfo property);
diff --git a/MiraAPI/GameOptions/Attributes/ModdedToggleOptionAttribute.cs b/MiraAPI/GameOptions/Attributes/ModdedToggleOptionAttribute.cs
index 0ad64da..2fccf1f 100644
--- a/MiraAPI/GameOptions/Attributes/ModdedToggleOptionAttribute.cs
+++ b/MiraAPI/GameOptions/Attributes/ModdedToggleOptionAttribute.cs
@@ -5,7 +5,7 @@ using MiraAPI.GameOptions.OptionTypes;
namespace MiraAPI.GameOptions.Attributes;
///
-/// Attribute for a toggle option.
+/// Attribute for a .
///
/// The option title.
[AttributeUsage(AttributeTargets.Property)]
diff --git a/MiraAPI/GameOptions/IModdedOption.cs b/MiraAPI/GameOptions/IModdedOption.cs
index 5a3c3f8..646c22b 100644
--- a/MiraAPI/GameOptions/IModdedOption.cs
+++ b/MiraAPI/GameOptions/IModdedOption.cs
@@ -22,22 +22,32 @@ public interface IModdedOption
string Title { get; set; }
///
- /// Gets the StringName for the option, used for localization.
+ /// Gets or sets the parent of the option.
+ ///
+ AbstractOptionGroup ParentGroup { get; set; }
+
+ ///
+ /// Gets the notification settings for the option.
+ ///
+ OptionNotifConfiguration Configuration { get; }
+
+ ///
+ /// Gets the for the option, used for localization.
///
StringNames StringName { get; }
///
- /// Gets or sets the MiraPlugin that created this option.
+ /// Gets or sets the that created this option.
///
IMiraPlugin? ParentMod { get; set; }
///
- /// Gets the game setting data for the option.
+ /// Gets the for the option.
///
BaseGameSetting Data { get; }
///
- /// Gets the OptionBehaviour object of the option.
+ /// Gets the object of the option.
///
OptionBehaviour? OptionBehaviour { get; }
@@ -52,55 +62,55 @@ public interface IModdedOption
bool IncludeInPreset { get; set; }
///
- /// Gets or sets the ConfigDefinition for the option, used for BepInEx configuration.
+ /// Gets or sets the for the option, used for BepInEx configuration.
///
ConfigDefinition? ConfigDefinition { get; set; }
///
/// Creates the option behaviour for the modded option.
///
- /// The ToggleOption template.
- /// The NumberOption template.
- /// The StringOption template.
- /// The PlayerOption template.
- /// >The Transform container for the option.
- /// >The created OptionBehaviour object.
+ /// The template.
+ /// The template.
+ /// The template.
+ /// The template.
+ /// The container for the option.
+ /// The created object.
OptionBehaviour CreateOption(ToggleOption toggleOpt, NumberOption numberOpt, StringOption stringOpt, PlayerOption playerOpt, Transform container);
///
- /// Gets the value as a float.
+ /// Gets the value as a .
///
- /// >The value of the option as a float.
+ /// The value of the option as a .
float GetFloatData();
///
- /// Gets the NetData for the option, used for network synchronization.
+ /// Gets the for the option, used for network synchronization.
///
- /// >Returns the NetData object for the option.
+ /// Returns the object for the option.
NetData GetNetData();
///
/// Handles incoming network data for the option.
///
- /// >The byte array representing the network data.
+ /// The byte array representing the network data.
void HandleNetData(byte[] data);
///
/// Saves the option to a preset configuration file.
///
- /// The ConfigFile representing the preset configuration.
+ /// The representing the preset configuration.
/// Indicates whether to save the default value instead of the current value.
void SaveToPreset(ConfigFile presetConfig, bool saveDefault = false);
///
/// Binds the option to a configuration file.
///
- /// The ConfigFile to bind the option to.
+ /// The to bind the option to.
void Bind(ConfigFile config);
///
/// Loads the option from a preset configuration file, applying the values to the option's configuration.
///
- /// The ConfigFile representing the preset configuration.
+ /// The representing the preset configuration.
void LoadFromPreset(ConfigFile presetConfig);
}
diff --git a/MiraAPI/GameOptions/MiraNumberOptionComponent.cs b/MiraAPI/GameOptions/MiraNumberOptionComponent.cs
index dce033d..8cfa456 100644
--- a/MiraAPI/GameOptions/MiraNumberOptionComponent.cs
+++ b/MiraAPI/GameOptions/MiraNumberOptionComponent.cs
@@ -13,7 +13,7 @@ namespace MiraAPI.GameOptions;
public class MiraNumberOptionComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
{
///
- /// Gets or sets the modded option associated with the object.
+ /// Gets or sets the associated with the object.
///
[HideFromIl2Cpp]
public ModdedNumberOption NumberOption { get; set; }
diff --git a/MiraAPI/GameOptions/ModdedOptionsManager.cs b/MiraAPI/GameOptions/ModdedOptionsManager.cs
index 4900309..a1ba1ee 100644
--- a/MiraAPI/GameOptions/ModdedOptionsManager.cs
+++ b/MiraAPI/GameOptions/ModdedOptionsManager.cs
@@ -14,11 +14,13 @@ using MiraAPI.PluginLoading;
using MiraAPI.Utilities;
using Reactor.Networking.Rpc;
using Reactor.Utilities;
+using TMPro;
+using UnityEngine;
namespace MiraAPI.GameOptions;
///
-/// Handles modded options.
+/// Handles s.
///
public static class ModdedOptionsManager
{
@@ -34,6 +36,36 @@ public static class ModdedOptionsManager
internal static uint NextId => _nextId++;
private static uint _nextId = 1;
+ public static void AddSettingsChangeMessage(NotificationPopper notif, StringNames key, string value, Color textColor, TMP_SpriteAsset? sprite, bool playSound = true)
+ {
+ var item = string.Empty;
+ var text = textColor.ToTextColor();
+ if (sprite != null)
+ {
+ item = TranslationController.Instance.GetString(
+ StringNames.LobbyChangeSettingNotification,
+ string.Concat(
+ "",
+ text,
+ TranslationController.Instance.GetString(key),
+ ""),
+ "" + value + ""
+ );
+ }
+ else
+ {
+ item = TranslationController.Instance.GetString(
+ StringNames.LobbyChangeSettingNotification,
+ "" +
+ text +
+ TranslationController.Instance.GetString(key) + "",
+ "" + value + "");
+ }
+ notif.SettingsChangeMessageLogic(key, item, playSound);
+ }
+
internal static bool RegisterGroup(Type type)
{
if (Activator.CreateInstance(type) is not AbstractOptionGroup group)
@@ -161,6 +193,7 @@ public static class ModdedOptionsManager
option.ConfigDefinition = new ConfigDefinition(groupName, propertyName);
+ option.ParentGroup = group;
option.ParentMod = pluginInfo.MiraPlugin;
pluginInfo.InternalOptions.Add(option);
ModdedOptions.Add(option.Id, option);
@@ -230,7 +263,7 @@ public static class ModdedOptionsManager
///
/// The original getter method.
/// The result of the property getter.
- /// False so the original getter gets skipped.
+ /// so the original getter gets skipped.
#pragma warning disable CA1707
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Harmony naming convention")]
public static bool PropertyGetterPatch(MethodBase __originalMethod, ref object __result)
diff --git a/MiraAPI/GameOptions/OptionGroupSingleton.cs b/MiraAPI/GameOptions/OptionGroupSingleton.cs
index 53b2029..a521d7d 100644
--- a/MiraAPI/GameOptions/OptionGroupSingleton.cs
+++ b/MiraAPI/GameOptions/OptionGroupSingleton.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.GameOptions;
///
-/// Singleton for option groups.
+/// Singleton for s.
///
/// The option group type.
public static class OptionGroupSingleton where T : AbstractOptionGroup
@@ -11,7 +11,7 @@ public static class OptionGroupSingleton where T : AbstractOptionGroup
private static T? _instance;
///
- /// Gets the instance of the option group.
+ /// Gets the instance of the group.
///
#pragma warning disable CA1000
public static T Instance => _instance ??= ModdedOptionsManager.Groups.OfType().Single();
diff --git a/MiraAPI/GameOptions/OptionNotifConfiguration.cs b/MiraAPI/GameOptions/OptionNotifConfiguration.cs
new file mode 100644
index 0000000..e16106f
--- /dev/null
+++ b/MiraAPI/GameOptions/OptionNotifConfiguration.cs
@@ -0,0 +1,53 @@
+using System;
+using Il2CppInterop.Runtime.Attributes;
+using TMPro;
+using UnityEngine;
+namespace MiraAPI.GameOptions;
+
+///
+/// Used to configure the specific visuals for option notifications.
+///
+public record struct OptionNotifConfiguration
+{
+#pragma warning disable S1133
+ [Obsolete("Default constructor is not supported")]
+#pragma warning restore S1133
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
+ public OptionNotifConfiguration()
+#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
+ {
+ throw new NotImplementedException("Default constructor is not supported.");
+ }
+
+ ///
+ /// Initializes a new instance of the struct based on a group.
+ ///
+ /// The in which you are configuring.
+ public OptionNotifConfiguration(AbstractOptionGroup group)
+ {
+ PopUpIconTmp = group.Configuration.PopUpIconTmp;
+ PopUpTextColor = group.Configuration.PopUpTextColor;
+ }
+
+ ///
+ /// Initializes a new instance of the struct from scratch.
+ ///
+ /// The text for the configuration.
+ /// The icon for the configuration.
+ public OptionNotifConfiguration(Color color, TMP_SpriteAsset asset = null!)
+ {
+ PopUpIconTmp = asset;
+ PopUpTextColor = color;
+ }
+
+ ///
+ /// Gets or sets the for the icon on the options pop-up.
+ ///
+ public TMP_SpriteAsset PopUpIconTmp { get; set; }
+
+ ///
+ /// Gets or sets the for the text on the options pop-up.
+ ///
+ [HideFromIl2Cpp]
+ public Color PopUpTextColor { get; set; }
+}
diff --git a/MiraAPI/GameOptions/OptionTypes/ModdedEnumOption.cs b/MiraAPI/GameOptions/OptionTypes/ModdedEnumOption.cs
index 48f7451..30809bd 100644
--- a/MiraAPI/GameOptions/OptionTypes/ModdedEnumOption.cs
+++ b/MiraAPI/GameOptions/OptionTypes/ModdedEnumOption.cs
@@ -11,7 +11,7 @@ using Object = UnityEngine.Object;
namespace MiraAPI.GameOptions.OptionTypes;
///
-/// An option for selecting an enum value.
+/// An option for selecting an value.
///
public class ModdedEnumOption : ModdedOption
{
@@ -25,8 +25,8 @@ public class ModdedEnumOption : ModdedOption
///
/// The title of the option.
/// The default value as an int.
- /// The Enum type.
- /// An option list of string values to use in place of the enum name.
+ /// The type.
+ /// An option list of string values to use in place of the name.
/// Whether to include this option in the preset or not.
public ModdedEnumOption(string title, int defaultValue, Type enumType, string[]? values = null, bool includeInPreset=true) : base(title, defaultValue, includeInPreset)
{
@@ -90,7 +90,13 @@ public class ModdedEnumOption : ModdedOption
///
protected override void OnValueChanged(int newValue)
{
- HudManager.Instance.Notifier.AddSettingsChangeMessage(StringName, Data.GetValueString(newValue), false);
+ ModdedOptionsManager.AddSettingsChangeMessage(
+ HudManager.Instance.Notifier,
+ StringName,
+ Data.GetValueString(newValue),
+ Configuration.PopUpTextColor,
+ Configuration.PopUpIconTmp,
+ false);
if (!OptionBehaviour)
{
return;
@@ -104,13 +110,13 @@ public class ModdedEnumOption : ModdedOption
}
///
-/// An option for selecting an enum value.
+/// An option for selecting an value.
///
-/// The enum type.
+/// The type.
public class ModdedEnumOption : ModdedOption where T : Enum
{
///
- /// Gets the string values of the enum.
+ /// Gets the string values of the .
///
public string[] Values { get; }
@@ -118,8 +124,8 @@ public class ModdedEnumOption : ModdedOption where T : Enum
/// Initializes a new instance of the class.
///
/// The title of the option.
- /// The default value as an int.
- /// An option list of string values to use in place of the enum name.
+ /// The default value as an .
+ /// An option list of string values to use in place of the name.
/// Whether to include this option in the preset or not.
public ModdedEnumOption(string title, T defaultValue, string[]? values = null, bool includeInPreset=true) : base(title, defaultValue, includeInPreset)
{
@@ -183,7 +189,13 @@ public class ModdedEnumOption : ModdedOption where T : Enum
///
protected override void OnValueChanged(T newValue)
{
- HudManager.Instance.Notifier.AddSettingsChangeMessage(StringName, Data.GetValueString(Convert.ToInt32(newValue, NumberFormatInfo.InvariantInfo)), false);
+ ModdedOptionsManager.AddSettingsChangeMessage(
+ HudManager.Instance.Notifier,
+ StringName,
+ Data.GetValueString(Convert.ToInt32(newValue, NumberFormatInfo.InvariantInfo)),
+ Configuration.PopUpTextColor,
+ Configuration.PopUpIconTmp,
+ false);
if (!OptionBehaviour)
{
return;
diff --git a/MiraAPI/GameOptions/OptionTypes/ModdedNumberOption.cs b/MiraAPI/GameOptions/OptionTypes/ModdedNumberOption.cs
index b9a1f59..87f4ca9 100644
--- a/MiraAPI/GameOptions/OptionTypes/ModdedNumberOption.cs
+++ b/MiraAPI/GameOptions/OptionTypes/ModdedNumberOption.cs
@@ -225,9 +225,12 @@ public class ModdedNumberOption : ModdedOption
protected override void OnValueChanged(float newValue)
{
Value = Mathf.Clamp(newValue, Min, Max);
- HudManager.Instance.Notifier.AddSettingsChangeMessage(
+ ModdedOptionsManager.AddSettingsChangeMessage(
+ HudManager.Instance.Notifier,
StringName,
- Data.GetValueString(Value),
+ Data.GetValueString(newValue),
+ Configuration.PopUpTextColor,
+ Configuration.PopUpIconTmp,
false);
if (OptionBehaviour is NumberOption opt)
@@ -237,7 +240,7 @@ public class ModdedNumberOption : ModdedOption
}
///
- /// Implicitly converts the option to an int.
+ /// Implicitly converts the option to an .
///
/// The option.
/// Integer value.
diff --git a/MiraAPI/GameOptions/OptionTypes/ModdedOption.cs b/MiraAPI/GameOptions/OptionTypes/ModdedOption.cs
index 9bf8ff3..1df4921 100644
--- a/MiraAPI/GameOptions/OptionTypes/ModdedOption.cs
+++ b/MiraAPI/GameOptions/OptionTypes/ModdedOption.cs
@@ -4,7 +4,6 @@ using MiraAPI.Networking;
using MiraAPI.PluginLoading;
using Reactor.Localization.Utilities;
using Reactor.Networking.Rpc;
-using Reactor.Utilities;
using UnityEngine;
namespace MiraAPI.GameOptions.OptionTypes;
@@ -190,4 +189,10 @@ public abstract class ModdedOption : IModdedOption
{
return option.Value;
}
+
+ ///
+ public AbstractOptionGroup ParentGroup { get; set; }
+
+ ///
+ public virtual OptionNotifConfiguration Configuration => new(ParentGroup);
}
diff --git a/MiraAPI/GameOptions/OptionTypes/ModdedPlayerOption.cs b/MiraAPI/GameOptions/OptionTypes/ModdedPlayerOption.cs
index dd2f772..db397bd 100644
--- a/MiraAPI/GameOptions/OptionTypes/ModdedPlayerOption.cs
+++ b/MiraAPI/GameOptions/OptionTypes/ModdedPlayerOption.cs
@@ -9,7 +9,7 @@ using Object = UnityEngine.Object;
namespace MiraAPI.GameOptions.OptionTypes;
///
-/// An option for selecting an ingame player. It returns an index of the values list, NOT A PLAYER ID. To get a player out of this, index the Values list.
+/// An option for selecting an ingame player. It returns an index of the values list, NOT A PLAYER ID. To get a player out of this, index the list.
///
public class ModdedPlayerOption : ModdedOption
{
@@ -91,9 +91,9 @@ public class ModdedPlayerOption : ModdedOption
}
///
- /// Returns a player from the value. If AllowNone is enabled and none is enabled this will return null.
+ /// Returns a player from the value. If is enabled and none is enabled this will return .
///
- /// A player or null if chosen none.
+ /// A player or if chosen none.
public NetworkedPlayerInfo? GetPlayerValue()
{
return Value < 0 ? null : Values[Value];
@@ -126,7 +126,13 @@ public class ModdedPlayerOption : ModdedOption
///
protected override void OnValueChanged(int newValue)
{
- HudManager.Instance.Notifier.AddSettingsChangeMessage(StringName, Data.GetValueString(newValue), false);
+ ModdedOptionsManager.AddSettingsChangeMessage(
+ HudManager.Instance.Notifier,
+ StringName,
+ Data.GetValueString(newValue),
+ Configuration.PopUpTextColor,
+ Configuration.PopUpIconTmp,
+ false);
if (!OptionBehaviour)
{
return;
diff --git a/MiraAPI/GameOptions/OptionTypes/ModdedToggleOption.cs b/MiraAPI/GameOptions/OptionTypes/ModdedToggleOption.cs
index 0b13f97..55b69b9 100644
--- a/MiraAPI/GameOptions/OptionTypes/ModdedToggleOption.cs
+++ b/MiraAPI/GameOptions/OptionTypes/ModdedToggleOption.cs
@@ -71,7 +71,13 @@ public class ModdedToggleOption : ModdedOption
///
protected override void OnValueChanged(bool newValue)
{
- HudManager.Instance.Notifier.AddSettingsChangeMessage(StringName, newValue ? "On" : "Off", false);
+ ModdedOptionsManager.AddSettingsChangeMessage(
+ HudManager.Instance.Notifier,
+ StringName,
+ newValue ? "On" : "Off",
+ Configuration.PopUpTextColor,
+ Configuration.PopUpIconTmp,
+ false);
if (!OptionBehaviour)
{
return;
diff --git a/MiraAPI/Hud/ButtonLocation.cs b/MiraAPI/Hud/ButtonLocation.cs
index da11737..a8045d7 100644
--- a/MiraAPI/Hud/ButtonLocation.cs
+++ b/MiraAPI/Hud/ButtonLocation.cs
@@ -1,7 +1,7 @@
namespace MiraAPI.Hud;
///
-/// The location of the custom button on the screen.
+/// The location of the on the screen.
///
public enum ButtonLocation
{
diff --git a/MiraAPI/Hud/ButtonUsesMode.cs b/MiraAPI/Hud/ButtonUsesMode.cs
index 2c43300..82558d7 100644
--- a/MiraAPI/Hud/ButtonUsesMode.cs
+++ b/MiraAPI/Hud/ButtonUsesMode.cs
@@ -1,7 +1,7 @@
namespace MiraAPI.Hud;
///
-/// The uses mode for custom buttons.
+/// The uses mode for s.
///
public enum ButtonUsesMode
{
diff --git a/MiraAPI/Hud/CustomActionButton.cs b/MiraAPI/Hud/CustomActionButton.cs
index e54c10c..4c5df0c 100644
--- a/MiraAPI/Hud/CustomActionButton.cs
+++ b/MiraAPI/Hud/CustomActionButton.cs
@@ -7,7 +7,6 @@ using MiraAPI.LocalSettings;
using MiraAPI.Patches;
using MiraAPI.Utilities;
using MiraAPI.Utilities.Assets;
-using Reactor.Utilities;
using Rewired;
using TMPro;
using UnityEngine;
@@ -18,7 +17,7 @@ using Object = UnityEngine.Object;
namespace MiraAPI.Hud;
///
-/// Class for making custom action buttons. More customizable than the default Action/Ability buttons in the base game.
+/// Class for making custom action buttons. More customizable than the default /s in the base game.
///
public abstract class CustomActionButton
{
@@ -54,7 +53,7 @@ public abstract class CustomActionButton
public virtual string CooldownTimerFormatString => "0";
///
- /// Gets a value indicating whether the button has an effect ability. By default true if is greater than 0.
+ /// Gets a value indicating whether the button has an effect ability. By default if is greater than 0.
///
public virtual bool HasEffect => EffectDuration > 0;
@@ -79,17 +78,17 @@ public abstract class CustomActionButton
public virtual ButtonUsesMode UsesMode => ButtonUsesMode.PerGame;
///
- /// Gets the keybind for this button. If null, no keybind will be added.
+ /// Gets the keybind for this button. If , no keybind will be added.
///
public virtual BaseKeybind? Keybind => null;
///
- /// Gets the button's text outline color.
+ /// Gets the button's text outline .
///
public virtual Color TextOutlineColor => Color.clear;
///
- /// Gets or sets the location of the button on the screen.
+ /// Gets or sets the on the screen.
///
public virtual ButtonLocation Location { get; set; } = ButtonLocation.BottomLeft;
@@ -119,12 +118,12 @@ public abstract class CustomActionButton
public float Timer { get; set; }
///
- /// Gets or sets the button object in game. This is created by Mira API automatically.
+ /// Gets or sets the object in game. This is created by Mira API automatically.
///
public ActionButton? Button { get; set; }
///
- /// Gets the gameObject used for the keybind icon.
+ /// Gets the used for the keybind icon.
///
public GameObject? KeybindIcon { get; private set; }
@@ -316,18 +315,18 @@ public abstract class CustomActionButton
}
///
- /// A utility function to change the outline color of the button's text.
+ /// A utility function to change the outline of the button's text.
///
- /// The new color.
+ /// The new .
public virtual void SetTextOutline(Color color)
{
Button?.buttonLabelText.SetOutlineColor(color);
}
///
- /// A utility function to override the sprite of the button.
+ /// A utility function to override the of the button.
///
- /// The new sprite to override with.
+ /// The new to override with.
public virtual void OverrideSprite(Sprite sprite)
{
if (Button != null)
@@ -415,7 +414,7 @@ public abstract class CustomActionButton
}
///
- /// A utility function that runs with the local PlayerControl's FixedUpdate if the button is enabled.
+ /// A utility function that runs with the local player's if the button is enabled.
///
/// the local PlayerControl.
protected virtual void FixedUpdate(PlayerControl playerControl)
@@ -429,10 +428,10 @@ public abstract class CustomActionButton
///
/// This method determines if the button should be active or not.
- /// True means the button is active, false means the button is disabled.
+ /// means the button is active, means the button is disabled.
///
- /// The role of the local player.
- /// True if the button is enabled, false otherwise.
+ /// The of the local player.
+ /// if the button is enabled, otherwise.
public abstract bool Enabled(RoleBehaviour? role);
///
@@ -445,7 +444,7 @@ public abstract class CustomActionButton
///
/// Returns a value indicating whether the effect can be ended early by the player.
- /// Always false by default.
+ /// Always by default.
///
/// Can the effect be canceled.
public virtual bool IsEffectCancellable() => false;
@@ -473,12 +472,12 @@ public abstract class CustomActionButton
}
///
- /// This method is called on the HudManager.SetHudActive method. It determines whether the button should be visible or not.
- /// The default behavior is to show the button if the parameter and the method return true.
+ /// This method is called on the method. It determines whether the button should be visible or not.
+ /// The default behavior is to show the button if the parameter and the method return .
/// It can be overridden for custom behavior.
///
- /// Passed in from HudManager.SetHudActive, should hud be active.
- /// Passed in from HudManager.SetHudActive, the current role of the player.
+ /// Passed in from , should hud be active.
+ /// Passed in from , the current role of the player.
public virtual void SetActive(bool visible, RoleBehaviour role)
{
Button?.ToggleVisible(visible && Enabled(role));
@@ -522,7 +521,7 @@ public abstract class CustomActionButton
}
///
- /// This method is called on the PlayerControl.FixedUpdate method. It is a wrapper for the method.
+ /// This method is called on the method. It is a wrapper for the method.
/// By default, it handles the cooldown and effect timers, and sets the button to enabled or disabled.
/// It can be overridden for custom behavior.
///
@@ -580,39 +579,39 @@ public abstract class CustomActionButton
}
///
-/// Custom action button that has a target object.
+/// Custom action button that has a target .
///
/// The type of the target object.
public abstract class CustomActionButton : CustomActionButton where T : MonoBehaviour
{
///
- /// Gets or sets the target object of the button.
+ /// Gets or sets the target of the button.
///
public T? Target { get; set; }
///
- /// Gets the distance the player must be from the target object to use the button.
+ /// Gets the distance the player must be from the target to use the button.
///
public virtual float Distance => PlayerControl.LocalPlayer.Data.Role.GetAbilityDistance();
///
- /// Determines if the target object is valid.
+ /// Determines if the target is valid.
///
- /// The target object being checked.
- /// True if the target object is valid, false otherwise.
+ /// The target being checked.
+ /// if the target is valid, otherwise.
public virtual bool IsTargetValid(T? target)
{
return target != null;
}
///
- /// The method used to get the target object.
+ /// The method used to get the target .
///
- /// The target object or null if it isn't found.
+ /// The target or if it isn't found.
public abstract T? GetTarget();
///
- /// Sets the outline of the target object.
+ /// Sets the outline of the target .
///
/// Should the outline be active.
public abstract void SetOutline(bool active);
diff --git a/MiraAPI/Hud/CustomButtonManager.cs b/MiraAPI/Hud/CustomButtonManager.cs
index 8e57c40..70ca14b 100644
--- a/MiraAPI/Hud/CustomButtonManager.cs
+++ b/MiraAPI/Hud/CustomButtonManager.cs
@@ -4,17 +4,16 @@ using System.Collections.ObjectModel;
using System.Reflection;
using MiraAPI.Events.Mira;
using MiraAPI.PluginLoading;
-using UnityEngine;
namespace MiraAPI.Hud;
///
-/// Custom button manager for handling custom buttons.
+/// Custom button manager for handling s.
///
public static class CustomButtonManager
{
///
- /// Gets a list of all registered custom buttons.
+ /// Gets a list of all registered custom s.
///
public static ReadOnlyCollection Buttons { get; internal set; } = new([]);
diff --git a/MiraAPI/Hud/CustomButtonSingleton.cs b/MiraAPI/Hud/CustomButtonSingleton.cs
index daa5467..957445b 100644
--- a/MiraAPI/Hud/CustomButtonSingleton.cs
+++ b/MiraAPI/Hud/CustomButtonSingleton.cs
@@ -4,7 +4,7 @@ using System.Linq;
namespace MiraAPI.Hud;
///
-/// A utility class to get the instance of a custom action button.
+/// A utility class to get the instance of a .
///
/// The type of the button you are trying to access.
public static class CustomButtonSingleton where T : CustomActionButton
@@ -12,7 +12,7 @@ public static class CustomButtonSingleton where T : CustomActionButton
private static T? _instance;
///
- /// Gets the instance of the button.
+ /// Gets the instance of the button.
///
[SuppressMessage("Design", "CA1000:Do not declare static members on generic types", Justification = "This is a utility class to get the instance of a custom action button.")]
public static T Instance => _instance ??= CustomButtonManager.CustomButtons.OfType().Single();
diff --git a/MiraAPI/Hud/CustomPlayerMenu.cs b/MiraAPI/Hud/CustomPlayerMenu.cs
index 56d9f0e..fb27f14 100644
--- a/MiraAPI/Hud/CustomPlayerMenu.cs
+++ b/MiraAPI/Hud/CustomPlayerMenu.cs
@@ -15,9 +15,9 @@ using UnityEngine.Events;
namespace MiraAPI.Hud;
///
-/// Custom Player Menu using the ShapeshifterPanel as a base.
+/// Custom Player Menu using the as a base.
///
-/// Used by Il2Cpp. Do not use constructor, this is a MonoBehaviour.
+/// Used by Il2Cpp. Do not use constructor, this is a .
[RegisterInIl2Cpp]
[SuppressMessage("Design", "CA1051:Do not declare visible instance fields", Justification = "Unity Convention")]
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1307:Accessible fields should begin with upper-case letter", Justification = "Unity Convention")]
@@ -34,9 +34,9 @@ public class CustomPlayerMenu(IntPtr il2CppPtr) : Minigame(il2CppPtr)
public List potentialVictims;
///
- /// Creates a CustomPlayerMenu.
+ /// Creates a .
///
- /// New CustomPlayerMenu object.
+ /// New object.
public static CustomPlayerMenu Create()
{
var shapeShifterRole = RoleManager.Instance.GetRole(RoleTypes.Shapeshifter);
@@ -84,7 +84,7 @@ public class CustomPlayerMenu(IntPtr il2CppPtr) : Minigame(il2CppPtr)
/// Begins/opens the custom player menu.
///
/// Function to determine if player should show in the custom menu.
- /// Onclick action for player.
+ /// action for player.
[HideFromIl2Cpp]
public void Begin(Func playerMatch, Action onClick)
{
@@ -96,7 +96,7 @@ public class CustomPlayerMenu(IntPtr il2CppPtr) : Minigame(il2CppPtr)
onClick(null);
}));
- DestroyableSingleton.Instance.Analytics.MinigameOpened(PlayerControl.LocalPlayer.Data, TaskType);
+ DebugAnalytics.Instance.Analytics.MinigameOpened(PlayerControl.LocalPlayer.Data, TaskType);
var list = PlayerControl.AllPlayerControls.ToArray().Where(playerMatch).ToList();
potentialVictims = [];
var list2 = new Il2CppSystem.Collections.Generic.List();
diff --git a/MiraAPI/Hud/MultiTargetButton.cs b/MiraAPI/Hud/MultiTargetButton.cs
index 8c1ae34..d52d845 100644
--- a/MiraAPI/Hud/MultiTargetButton.cs
+++ b/MiraAPI/Hud/MultiTargetButton.cs
@@ -1,12 +1,11 @@
using System.Linq;
using HarmonyLib;
-using Reactor.Utilities.Extensions;
using UnityEngine;
namespace MiraAPI.Hud;
///
-/// Custom action button that has multiple target objects.
+/// that has multiple target objects.
///
/// The type of the target objects.
public abstract class MultiTargetButton : CustomActionButton where T : MonoBehaviour
@@ -36,8 +35,11 @@ public abstract class MultiTargetButton : CustomActionButton where T : MonoBe
/// The list of target objects.
public abstract T[] GetTargets();
- ///
- /// The target object to set the oultine.
+ ///
+ /// Sets the outline of the target .
+ ///
+ /// The target to set the oultine.
+ /// Should the outline be active.
public abstract void SetOutline(T target, bool active);
///
diff --git a/MiraAPI/Keybinds/KeybindManager.cs b/MiraAPI/Keybinds/KeybindManager.cs
index c4e1cd1..042322a 100644
--- a/MiraAPI/Keybinds/KeybindManager.cs
+++ b/MiraAPI/Keybinds/KeybindManager.cs
@@ -3,18 +3,17 @@ using System.Collections.Generic;
using System.Linq;
using Il2CppInterop.Runtime.Attributes;
using MiraAPI.Utilities;
-using Reactor.Utilities;
using Rewired;
namespace MiraAPI.Keybinds;
///
-/// Lets you register and manage mod keybinds with conflict checks and rebinding support.
+/// Lets you register and manage mod s with conflict checks and rebinding support.
///
public static class KeybindManager
{
///
- /// Gets a list of all registered keybinds.
+ /// Gets a list of all registered s.
///
public static List Keybinds { get; } = new();
@@ -49,7 +48,7 @@ public static class KeybindManager
}
///
- /// Returns all conflicts where keybinds use the same key.
+ /// Returns all conflicts where s use the same key.
///
/// A list of pairs of keybinds that conflict.
public static Dictionary> GetConflicts()
@@ -77,11 +76,11 @@ public static class KeybindManager
}
///
- /// Returns all keybinds for a specified keycode.
+ /// Returns all s for a specified keycode.
///
/// The key to look for.
/// /// Should only exlusive keybinds be present.
- /// The list of keybinds.
+ /// The list of s.
public static MiraKeybind[] GetKeybindsForKey(KeyboardKeyCode keyCode, bool exclusiveCheck = false)
{
var all = new List();
diff --git a/MiraAPI/Keybinds/KeybindUtils.cs b/MiraAPI/Keybinds/KeybindUtils.cs
index f4371b3..7a316be 100644
--- a/MiraAPI/Keybinds/KeybindUtils.cs
+++ b/MiraAPI/Keybinds/KeybindUtils.cs
@@ -14,9 +14,9 @@ public static class KeybindUtils
public static InputManager_Base? RewiredInputManager { get; internal set; }
///
- /// Returns the currently assigned keycode of a keybind.
+ /// Returns the currently assigned keycode of a .
///
- /// The keybind to get the keycode from.
+ /// The to get the keycode from.
/// The currently assigned keycode.
public static KeyboardKeyCode GetKeycodeByKeybind(BaseKeybind keybind)
{
@@ -29,7 +29,7 @@ public static class KeybindUtils
}
///
- /// Gets the keycode for an action with ReInput.
+ /// Gets the keycode for an action with .
///
/// The action ID.
/// The keyboard keycode.
@@ -39,7 +39,7 @@ public static class KeybindUtils
}
///
- /// Gets a by id with ReInput.
+ /// Gets a by id with .
///
/// The action ID.
/// The keyboard keycode.
@@ -65,7 +65,7 @@ public static class KeybindUtils
/// The KeyCode to skip during the search.
///
/// The first available KeyCode not currently used by any registered keybind,
- /// or KeyCode.None if none are available.
+ /// or if none are available.
///
public static KeyboardKeyCode FindAvailableKey(KeyboardKeyCode exclude)
{
diff --git a/MiraAPI/Keybinds/MiraGlobalKeybinds.cs b/MiraAPI/Keybinds/MiraGlobalKeybinds.cs
index ab41c2c..f945ca9 100644
--- a/MiraAPI/Keybinds/MiraGlobalKeybinds.cs
+++ b/MiraAPI/Keybinds/MiraGlobalKeybinds.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.Keybinds;
///
-/// Class containing all default keybinds.
+/// Class containing all default s.
/// Recommended for cross-mod compatibility.
///
[RegisterCustomKeybinds]
diff --git a/MiraAPI/Keybinds/MiraKeybind.cs b/MiraAPI/Keybinds/MiraKeybind.cs
index 0ce47ea..d2b5847 100644
--- a/MiraAPI/Keybinds/MiraKeybind.cs
+++ b/MiraAPI/Keybinds/MiraKeybind.cs
@@ -19,8 +19,8 @@ public class MiraKeybind : BaseKeybind
public KeyboardKeyCode DefaultKey { get; }
///
- /// Gets the modifier keys assigned to this keybind.
- /// Due to Rewired limitations, there can only be 3 modifier keys.
+ /// Gets the s assigned to this keybind.
+ /// Due to Rewired limitations, there can only be 3 s.
///
public ModifierKey[] ModifierKeys { get; }
@@ -36,7 +36,7 @@ public class MiraKeybind : BaseKeybind
///
/// The name of the keybind.
/// The default keycode.
- /// Up to 3 optional modifier keys.
+ /// Up to 3 optional s.
/// Is exclusive.
public MiraKeybind(
string name,
diff --git a/MiraAPI/Keybinds/RegisterCustomKeybindsAttribute.cs b/MiraAPI/Keybinds/RegisterCustomKeybindsAttribute.cs
index 3af9f4e..088f158 100644
--- a/MiraAPI/Keybinds/RegisterCustomKeybindsAttribute.cs
+++ b/MiraAPI/Keybinds/RegisterCustomKeybindsAttribute.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.Keybinds;
///
-/// Used to mark a class for custom keybinds registration.
+/// Used to mark a class for s registration.
///
[AttributeUsage(AttributeTargets.Class)]
public class RegisterCustomKeybindsAttribute : Attribute;
diff --git a/MiraAPI/Keybinds/VanillaKeybind.cs b/MiraAPI/Keybinds/VanillaKeybind.cs
index 8911b49..5f34288 100644
--- a/MiraAPI/Keybinds/VanillaKeybind.cs
+++ b/MiraAPI/Keybinds/VanillaKeybind.cs
@@ -1,4 +1,4 @@
-using Rewired;
+using System.Globalization;
namespace MiraAPI.Keybinds;
@@ -19,6 +19,6 @@ public class VanillaKeybind : BaseKeybind
public VanillaKeybind(int id)
{
RewiredInputAction = KeybindUtils.GetInputActionById(id);
- Id = RewiredInputAction != null ? RewiredInputAction.name : id.ToString();
+ Id = RewiredInputAction != null ? RewiredInputAction.name : id.ToString(CultureInfo.InvariantCulture);
}
}
diff --git a/MiraAPI/Keybinds/VanillaKeybindSingleton.cs b/MiraAPI/Keybinds/VanillaKeybindSingleton.cs
index 980da77..5876fcb 100644
--- a/MiraAPI/Keybinds/VanillaKeybindSingleton.cs
+++ b/MiraAPI/Keybinds/VanillaKeybindSingleton.cs
@@ -1,15 +1,15 @@
namespace MiraAPI.Keybinds;
///
-/// Singleton for getting a vanilla keybind by .
+/// Singleton for getting a by .
///
-/// ActionButton type.
+/// type.
public static class VanillaKeybinding where T : ActionButton
{
private static VanillaKeybind? _instance;
///
- /// Gets the instance of the option group.
+ /// Gets the instance of the .
///
#pragma warning disable CA1000
public static VanillaKeybind Instance => _instance ??= KeybindManager.VanillaKeybinds[typeof(T)];
diff --git a/MiraAPI/LocalSettings/Attributes/LocalEnumSettingAttribute.cs b/MiraAPI/LocalSettings/Attributes/LocalEnumSettingAttribute.cs
index f114818..c0608ff 100644
--- a/MiraAPI/LocalSettings/Attributes/LocalEnumSettingAttribute.cs
+++ b/MiraAPI/LocalSettings/Attributes/LocalEnumSettingAttribute.cs
@@ -5,9 +5,9 @@ using MiraAPI.LocalSettings.SettingTypes;
namespace MiraAPI.LocalSettings.Attributes;
///
-/// Creates an enum setting for the .
+/// Creates a for the .
///
-/// Optional custom enum names.
+/// Optional custom names.
///
[AttributeUsage(AttributeTargets.Property)]
public class LocalEnumSettingAttribute(
diff --git a/MiraAPI/LocalSettings/Attributes/LocalNumberSettingAttribute.cs b/MiraAPI/LocalSettings/Attributes/LocalNumberSettingAttribute.cs
index 79d4cc7..b5d681c 100644
--- a/MiraAPI/LocalSettings/Attributes/LocalNumberSettingAttribute.cs
+++ b/MiraAPI/LocalSettings/Attributes/LocalNumberSettingAttribute.cs
@@ -6,7 +6,7 @@ using MiraAPI.Utilities;
namespace MiraAPI.LocalSettings.Attributes;
///
-/// Creates a number setting for the .
+/// Creates a for the .
///
/// Minimum range.
/// Maximum range.
diff --git a/MiraAPI/LocalSettings/Attributes/LocalSettingAttribute.cs b/MiraAPI/LocalSettings/Attributes/LocalSettingAttribute.cs
index d966cbb..5aaef81 100644
--- a/MiraAPI/LocalSettings/Attributes/LocalSettingAttribute.cs
+++ b/MiraAPI/LocalSettings/Attributes/LocalSettingAttribute.cs
@@ -15,10 +15,10 @@ public abstract class LocalSettingAttribute(
) : Attribute
{
///
- /// Returns the created setting object.
+ /// Returns the created object.
///
/// Gets the tab where the setting is located.
/// Gets the config entry the setting is attached to.
- /// The created class.
+ /// The created .
public abstract ILocalSetting CreateSetting(Type tab, ConfigEntryBase configEntryBase);
}
diff --git a/MiraAPI/LocalSettings/Attributes/LocalSettingsButtonAttribute.cs b/MiraAPI/LocalSettings/Attributes/LocalSettingsButtonAttribute.cs
index 043a81d..83a3955 100644
--- a/MiraAPI/LocalSettings/Attributes/LocalSettingsButtonAttribute.cs
+++ b/MiraAPI/LocalSettings/Attributes/LocalSettingsButtonAttribute.cs
@@ -1,5 +1,4 @@
using System;
-using BepInEx.Configuration;
namespace MiraAPI.LocalSettings.Attributes;
diff --git a/MiraAPI/LocalSettings/Attributes/LocalSliderSettingAttribute.cs b/MiraAPI/LocalSettings/Attributes/LocalSliderSettingAttribute.cs
index c8e5712..9e14a8e 100644
--- a/MiraAPI/LocalSettings/Attributes/LocalSliderSettingAttribute.cs
+++ b/MiraAPI/LocalSettings/Attributes/LocalSliderSettingAttribute.cs
@@ -6,7 +6,7 @@ using MiraAPI.Utilities;
namespace MiraAPI.LocalSettings.Attributes;
///
-/// Creates a slider setting for the .
+/// Creates a for the .
///
///
/// Minimum range.
diff --git a/MiraAPI/LocalSettings/Attributes/LocalToggleSettingAttribute.cs b/MiraAPI/LocalSettings/Attributes/LocalToggleSettingAttribute.cs
index 2d2aa14..22ca7aa 100644
--- a/MiraAPI/LocalSettings/Attributes/LocalToggleSettingAttribute.cs
+++ b/MiraAPI/LocalSettings/Attributes/LocalToggleSettingAttribute.cs
@@ -5,7 +5,7 @@ using MiraAPI.LocalSettings.SettingTypes;
namespace MiraAPI.LocalSettings.Attributes;
///
-/// Creates a toggle setting for the .
+/// Creates a for the .
///
///
[AttributeUsage(AttributeTargets.Property)]
diff --git a/MiraAPI/LocalSettings/ILocalSetting.cs b/MiraAPI/LocalSettings/ILocalSetting.cs
index a94e102..b51a13d 100644
--- a/MiraAPI/LocalSettings/ILocalSetting.cs
+++ b/MiraAPI/LocalSettings/ILocalSetting.cs
@@ -19,7 +19,7 @@ public interface ILocalSetting
string Description { get; }
///
- /// Gets the setting's gameobject.
+ /// Gets the setting's .
///
GameObject? Setting { get; }
@@ -31,12 +31,12 @@ public interface ILocalSetting
///
/// Used to create the setting.
///
- /// Toggle template.
- /// Slider template.
- /// The parent of the setting.
+ /// template.
+ /// template.
+ /// The parent of the setting.
/// The offset.
/// The order.
/// Whether it's the last on the row.
- /// The created setting.
+ /// The created setting's .
GameObject? CreateOption(ToggleButtonBehaviour toggle, SlideBar slider, Transform parent, ref float offset, ref int order, bool last);
}
diff --git a/MiraAPI/LocalSettings/LocalSettingsButton.cs b/MiraAPI/LocalSettings/LocalSettingsButton.cs
index fa0c0bf..5a1f371 100644
--- a/MiraAPI/LocalSettings/LocalSettingsButton.cs
+++ b/MiraAPI/LocalSettings/LocalSettingsButton.cs
@@ -1,6 +1,5 @@
using System;
using MiraAPI.Utilities;
-using Reactor.Localization.Utilities;
using Reactor.Utilities.Extensions;
using TMPro;
using UnityEngine;
@@ -10,7 +9,7 @@ using Object = UnityEngine.Object;
namespace MiraAPI.LocalSettings;
///
-/// Represents a local settings button.
+/// Represents a button.
///
public class LocalSettingsButton(string text, Action onClick)
{
@@ -25,7 +24,7 @@ public class LocalSettingsButton(string text, Action onClick)
public Action OnClick { get; set; } = onClick;
///
- /// Gets the tab instance this button belongs to.
+ /// Gets the instance this button belongs to.
///
public LocalSettingsTab? Tab { get; internal set; }
diff --git a/MiraAPI/LocalSettings/LocalSettingsManager.cs b/MiraAPI/LocalSettings/LocalSettingsManager.cs
index 79e15f7..aa1c217 100644
--- a/MiraAPI/LocalSettings/LocalSettingsManager.cs
+++ b/MiraAPI/LocalSettings/LocalSettingsManager.cs
@@ -2,13 +2,11 @@
using System.Collections.Generic;
using System.Reflection;
using BepInEx.Unity.IL2CPP;
-using MiraAPI.GameOptions;
-using Reactor.Utilities;
namespace MiraAPI.LocalSettings;
///
-/// Manages local settings.
+/// Manages s.
///
public static class LocalSettingsManager
{
diff --git a/MiraAPI/LocalSettings/LocalSettingsTab.cs b/MiraAPI/LocalSettings/LocalSettingsTab.cs
index 8b9ede8..074d7db 100644
--- a/MiraAPI/LocalSettings/LocalSettingsTab.cs
+++ b/MiraAPI/LocalSettings/LocalSettingsTab.cs
@@ -23,7 +23,7 @@ public abstract class LocalSettingsTab(ConfigFile config)
public abstract string TabName { get; }
///
- /// Gets the tab appearance.
+ /// Gets the tab's .
///
public virtual LocalSettingTabAppearance TabAppearance { get; } = new();
@@ -38,7 +38,7 @@ public abstract class LocalSettingsTab(ConfigFile config)
protected virtual bool ShouldCreateLabels => true;
///
- /// Gets the mod's config file. Automatically found in the plugin loader.
+ /// Gets the mod's . Automatically found in the plugin loader.
///
public ConfigFile Config { get; } = config ?? throw new ArgumentNullException(nameof(config));
@@ -48,12 +48,12 @@ public abstract class LocalSettingsTab(ConfigFile config)
public TabGroup? TabButton { get; internal set; }
///
- /// Gets the list of settings.
+ /// Gets the list of s.
///
public List Settings { get; } = [];
///
- /// Gets the list of buttons.
+ /// Gets the list of s.
///
public List Buttons { get; } = [];
diff --git a/MiraAPI/LocalSettings/LocalSettingsTabAppearance.cs b/MiraAPI/LocalSettings/LocalSettingsTabAppearance.cs
index 9692be4..34b3646 100644
--- a/MiraAPI/LocalSettings/LocalSettingsTabAppearance.cs
+++ b/MiraAPI/LocalSettings/LocalSettingsTabAppearance.cs
@@ -4,93 +4,93 @@ using UnityEngine;
namespace MiraAPI.LocalSettings;
///
-/// Struct for modifying tab appearance.
+/// Struct for modifying appearance.
/// Defines how the settings look.
///
public record struct LocalSettingTabAppearance()
{
///
- /// Gets or sets main color of the tab.
+ /// Gets or sets the main of the .
///
public Color TabColor { get; set; } = Color.white;
///
- /// Gets or sets tab button icon. No icon by default.
+ /// Gets or sets the button icon. No icon by default.
///
public LoadableAsset? TabIcon { get; set; }
///
- /// Gets or sets color of the tab button.
+ /// Gets or sets the of the button.
///
public Color TabButtonColor { get; set; } = Color.white;
///
- /// Gets or sets a value indicating whether the icon should be hidden when tab button is hovered.
+ /// Gets or sets a value indicating whether the icon should be hidden when the button is hovered.
///
public bool HideIconOnHover { get; set; } = true;
///
- /// Gets or sets hover color of the tab button.
+ /// Gets or sets the hover of the button.
///
public Color TabButtonHoverColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets active color of the tab button.
+ /// Gets or sets the active of the button.
///
public Color TabButtonActiveColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets hover color of toggles.
+ /// Gets or sets the hover of s.
///
public Color ToggleHoverColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets active color of toggles.
+ /// Gets or sets the active of s.
///
public Color ToggleActiveColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets inactive color of toggles.
+ /// Gets or sets the inactive of s.
///
public Color ToggleInactiveColor { get; set; } = Color.red;
///
- /// Gets or sets color of number buttons.
+ /// Gets or sets the of buttons.
///
public Color NumberColor { get; set; } = Color.white;
///
- /// Gets or sets hover color of number buttons.
+ /// Gets or sets the hover of buttons.
///
public Color NumberHoverColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets color of sliders.
+ /// Gets or sets the of s.
///
public Color SliderColor { get; set; } = Color.white;
///
- /// Gets or sets hover color of sliders.
+ /// Gets or sets the hover of s.
///
public Color SliderHoverColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets color of enum buttons.
+ /// Gets or sets the of buttons.
///
public Color EnumColor { get; set; } = Color.white;
///
- /// Gets or sets hover color of enum buttons.
+ /// Gets or sets the hover of buttons.
///
public Color EnumHoverColor { get; set; } = Palette.AcceptedGreen;
///
- /// Gets or sets color of buttons.
+ /// Gets or sets the of buttons.
///
public Color ButtonColor { get; set; } = Color.white;
///
- /// Gets or sets hover color of buttons.
+ /// Gets or sets the hover of buttons.
///
public Color ButtonHoverColor { get; set; } = Palette.AcceptedGreen;
}
diff --git a/MiraAPI/LocalSettings/LocalSettingsTabSingleton.cs b/MiraAPI/LocalSettings/LocalSettingsTabSingleton.cs
index eec81a2..a435fa4 100644
--- a/MiraAPI/LocalSettings/LocalSettingsTabSingleton.cs
+++ b/MiraAPI/LocalSettings/LocalSettingsTabSingleton.cs
@@ -3,7 +3,7 @@
namespace MiraAPI.LocalSettings;
///
-/// Singleton for local settings tabs.
+/// Singleton for s.
///
/// The settings tab type.
public static class LocalSettingsTabSingleton where T : LocalSettingsTab
@@ -11,7 +11,7 @@ public static class LocalSettingsTabSingleton where T : LocalSettingsTab
private static T? _instance;
///
- /// Gets the instance of the setting tab.
+ /// Gets the instance of the setting tab.
///
#pragma warning disable CA1000
public static T Instance => _instance ??= LocalSettingsManager.Tabs.OfType().Single();
diff --git a/MiraAPI/LocalSettings/SettingTypes/LocalEnumSetting.cs b/MiraAPI/LocalSettings/SettingTypes/LocalEnumSetting.cs
index 437eed1..78b0278 100644
--- a/MiraAPI/LocalSettings/SettingTypes/LocalEnumSetting.cs
+++ b/MiraAPI/LocalSettings/SettingTypes/LocalEnumSetting.cs
@@ -11,17 +11,17 @@ using Object = UnityEngine.Object;
namespace MiraAPI.LocalSettings.SettingTypes;
///
-/// Local setting class for enums.
+/// Local setting class for s.
///
public class LocalEnumSetting : LocalSettingBase
{
///
- /// Gets the enum type of the setting.
+ /// Gets the type of the setting.
///
public Type EnumType { get; }
///
- /// Gets the enum values.
+ /// Gets the values.
///
public string[] Values { get; }
@@ -29,8 +29,8 @@ public class LocalEnumSetting : LocalSettingBase
/// Initializes a new instance of the class.
///
///
- /// The enum type.
- /// The optional values array to replace the enum names.
+ /// The type.
+ /// The optional values array to replace the names.
public LocalEnumSetting(
Type tab,
ConfigEntryBase configEntry,
diff --git a/MiraAPI/LocalSettings/SettingTypes/LocalSettingBase.cs b/MiraAPI/LocalSettings/SettingTypes/LocalSettingBase.cs
index 48fd70d..d7c2c64 100644
--- a/MiraAPI/LocalSettings/SettingTypes/LocalSettingBase.cs
+++ b/MiraAPI/LocalSettings/SettingTypes/LocalSettingBase.cs
@@ -45,6 +45,12 @@ public abstract class LocalSettingBase : ILocalSetting
///
/// Creates an instance of the setting.
///
+ /// Toggle option to create.
+ /// Slider option to create.
+ /// The parent options menu.
+ /// the Y Offset for the option in the menu.
+ /// The order of the option.
+ /// Whether the option is the last in a row.
/// The created setting.
public abstract GameObject CreateOption(ToggleButtonBehaviour toggle, SlideBar slider, Transform parent, ref float offset, ref int order, bool last);
@@ -58,9 +64,9 @@ public abstract class LocalSettingBase : ILocalSetting
}
///
- /// Gets the value of the config entry, cast to the setting type.
+ /// Gets the value of the config entry, cast to .
///
- /// The value.
+ /// The value.
public virtual T GetValue()
{
return (T)ConfigEntry.BoxedValue;
diff --git a/MiraAPI/MiraApiSettings.cs b/MiraAPI/MiraApiSettings.cs
index 8e87bde..fbead71 100644
--- a/MiraAPI/MiraApiSettings.cs
+++ b/MiraAPI/MiraApiSettings.cs
@@ -9,7 +9,7 @@ using UnityEngine;
namespace MiraAPI;
///
-/// Mira API Config File Handler.
+/// Mira API Handler.
///
public class MiraApiSettings(ConfigFile config) : LocalSettingsTab(config)
{
diff --git a/MiraAPI/ModCompatibility.cs b/MiraAPI/ModCompatibility.cs
index 23744ab..073453b 100644
--- a/MiraAPI/ModCompatibility.cs
+++ b/MiraAPI/ModCompatibility.cs
@@ -17,8 +17,8 @@ public static class ModCompatibility
///
/// Checks if the Submerged mod is loaded.
///
- /// Submerged mod assembly if loaded, null otherwise.
- /// True if the Submerged mod is loaded, false otherwise.
+ /// Submerged mod assembly if loaded, otherwise.
+ /// if the Submerged mod is loaded, otherwise.
public static bool SubmergedLoaded([NotNullWhen(true)] out Assembly? submergedAssembly)
{
var result = IL2CPPChainloader.Instance.Plugins.TryGetValue(SubmergedId, out var plugin);
diff --git a/MiraAPI/Modifiers/AssignmentConfiguration.cs b/MiraAPI/Modifiers/AssignmentConfiguration.cs
index fd4f3ba..b594820 100644
--- a/MiraAPI/Modifiers/AssignmentConfiguration.cs
+++ b/MiraAPI/Modifiers/AssignmentConfiguration.cs
@@ -1,10 +1,10 @@
namespace MiraAPI.Modifiers;
///
-/// Represents the assignment configuration for a game modifier.
+/// Represents the assignment configuration for a .
///
-/// The default amount of players that can have this modifier in a game.
-/// The default chance of the modifier being assigned to a player.
-/// Whether Mira should create an amount option for the modifier.
-/// Whether Mira should create a chance option for the modifier.
+/// The default amount of players that can have this in a game.
+/// The default chance of the being assigned to a player.
+/// Whether Mira should create an amount option for the .
+/// Whether Mira should create a chance option for the .
public record struct AssignmentConfiguration(int DefaultAmount, int DefaultChance, bool CreateAmountOption, bool CreateChanceOption);
diff --git a/MiraAPI/Modifiers/BaseModifier.cs b/MiraAPI/Modifiers/BaseModifier.cs
index 0e31779..930cc29 100644
--- a/MiraAPI/Modifiers/BaseModifier.cs
+++ b/MiraAPI/Modifiers/BaseModifier.cs
@@ -12,12 +12,12 @@ namespace MiraAPI.Modifiers;
public abstract class BaseModifier : IOptionable
{
///
- /// Gets the player that the modifier is attached to.
+ /// Gets the that the modifier is attached to.
///
public PlayerControl Player { get; internal set; } = null!;
///
- /// Gets the modifier component that the modifier is attached to.
+ /// Gets the that the modifier is attached to.
///
public ModifierComponent? ModifierComponent { get; internal set; }
@@ -50,7 +50,7 @@ public abstract class BaseModifier : IOptionable
public abstract string ModifierName { get; }
///
- /// Gets the modifier icon. Useless if HideOnUi is true.
+ /// Gets the modifier icon. Useless if is .
///
public virtual LoadableAsset? ModifierIcon => null;
@@ -65,17 +65,17 @@ public abstract class BaseModifier : IOptionable
public virtual bool ShowInFreeplay => false;
///
- /// Gets a value indicating the color that should be used for the modifier within freeplay.
+ /// Gets a value indicating the that should be used for the modifier within freeplay.
///
public virtual Color FreeplayFileColor => Color.gray;
///
- /// Gets a value indicating whether the modifier is unique. If true, the player can only have one instance of this modifier.
+ /// Gets a value indicating whether the modifier is unique. If , the player can only have one instance of this modifier.
///
public virtual bool Unique => true;
///
- /// Gets the HUD description for this modifier. Does nothing if is true. Required to be visible on UI.
+ /// Gets the HUD description for this modifier. Does nothing if is . Required to be visible on UI.
///
/// The description string for the HUD.
public virtual string GetDescription() => string.Empty;
@@ -95,14 +95,14 @@ public abstract class BaseModifier : IOptionable
}
///
- /// Called when the modifier is updated. Attached to the ModifierComponent's Update method.
+ /// Called when the modifier is updated. Attached to 's method.
///
public virtual void Update()
{
}
///
- /// Called when the modifier is updated. Attached to the ModifierComponent's FixedUpdate method.
+ /// Called when the modifier is updated. Attached to 's method.
///
public virtual void FixedUpdate()
{
@@ -126,6 +126,6 @@ public abstract class BaseModifier : IOptionable
///
/// Determines whether the player can vent.
///
- /// True if the player can vent, false otherwise. Null for no effect.
+ /// if the player can vent, otherwise. for no effect.
public virtual bool? CanVent() => null;
}
diff --git a/MiraAPI/Modifiers/ModifierComponent.cs b/MiraAPI/Modifiers/ModifierComponent.cs
index d64f366..6432b18 100644
--- a/MiraAPI/Modifiers/ModifierComponent.cs
+++ b/MiraAPI/Modifiers/ModifierComponent.cs
@@ -8,20 +8,19 @@ using MiraAPI.LocalSettings;
using MiraAPI.Modifiers.ModifierDisplay;
using MiraAPI.Modifiers.Types;
using MiraAPI.Patches.Roles;
-using Reactor.Utilities;
using Reactor.Utilities.Attributes;
using UnityEngine;
namespace MiraAPI.Modifiers;
///
-/// The component for handling modifiers.
+/// The component for handling s.
///
[RegisterInIl2Cpp]
public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
{
///
- /// Gets the active modifiers on the player.
+ /// Gets the active s on the player.
///
[HideFromIl2Cpp]
public ImmutableList ActiveModifiers { get; private set; } = ImmutableList.Empty;
@@ -165,11 +164,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a collection of modifiers by type.
+ /// Gets a collection of .
///
- /// The predicate to check the modifier by.
- /// The Type of the Modifier.
- /// A collection of modifiers.
+ /// The predicate to check the by.
+ /// The Type of the e.
+ /// An of s.
[HideFromIl2Cpp]
public IEnumerable GetModifiers(Func? predicate=null) where T : BaseModifier
{
@@ -177,11 +176,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a collection of modifiers by type.
+ /// Gets a collection of s by type.
///
/// The modifier type.
- /// The predicate to check the modifier by.
- /// A collection of modifiers.
+ /// The predicate to check the by.
+ /// An of s.
[HideFromIl2Cpp]
public IEnumerable GetModifiers(Type type, Func? predicate=null)
{
@@ -189,11 +188,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a collection of modifiers by type ID.
+ /// Gets a collection of s by type ID.
///
- /// The modifier's type ID.
- /// The predicate to check the modifier by.
- /// A collection of modifiers.
+ /// The 's type ID.
+ /// The predicate to check the by.
+ /// An of s.
[HideFromIl2Cpp]
public IEnumerable GetModifiers(uint id, Func? predicate=null)
{
@@ -204,12 +203,12 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Tries to get a modifier by its type.
+ /// Tries to get a .
///
- /// The modifier or null.
- /// The predicate to check the modifier by.
- /// The Type of the Modifier.
- /// True if the modifier was found, false otherwise.
+ /// The or .
+ /// The predicate to check the by.
+ /// The Type of the .
+ /// if the was found, otherwise.
[HideFromIl2Cpp]
public bool TryGetModifier([NotNullWhen(true)] out T? modifier, Func? predicate = null) where T : BaseModifier
{
@@ -218,12 +217,12 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Tries to get a modifier by its type.
+ /// Tries to get a by its type.
///
/// The modifier type.
- /// The modifier or null.
- /// The predicate to check the modifier by.
- /// True if the modifier was found, false otherwise.
+ /// The or .
+ /// The predicate to check the by.
+ /// if the was found, otherwise.
[HideFromIl2Cpp]
public bool TryGetModifier(Type type, [NotNullWhen(true)] out BaseModifier? modifier, Func? predicate = null)
{
@@ -232,12 +231,12 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Tries to get a modifier by its type ID.
+ /// Tries to get a by its type ID.
///
- /// The modifier type ID.
- /// The modifier or null.
- /// The predicate to check the modifier by.
- /// True if the modifier was found, false otherwise.
+ /// The 's type ID.
+ /// The or .
+ /// The predicate to check the by.
+ /// if the was found, otherwise.
[HideFromIl2Cpp]
public bool TryGetModifier(uint id, [NotNullWhen(true)] out BaseModifier? modifier, Func? predicate = null)
{
@@ -246,11 +245,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Tries to get a modifier by its unique ID.
+ /// Tries to get a by its unique ID.
///
- /// The modifier unique ID.
- /// The modifier or null.
- /// True if the modifier was found, false otherwise.
+ /// The 's unique ID.
+ /// The or .
+ /// if the was found, otherwise.
[HideFromIl2Cpp]
public bool TryGetModifier(Guid modifierGuid, [NotNullWhen(true)] out BaseModifier? modifier)
{
@@ -259,11 +258,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a modifier by its type.
+ /// Gets a .
///
- /// The predicate to check the modifier by.
- /// The Type of the Modifier.
- /// The Modifier if it is found, null otherwise.
+ /// The predicate to check the by.
+ /// The Type of the .
+ /// The if it is found, otherwise.
[HideFromIl2Cpp]
public T? GetModifier(Func? predicate = null) where T : BaseModifier
{
@@ -271,11 +270,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a modifier by its type.
+ /// Gets a by its type.
///
/// The modifier type.
- /// The predicate to check the modifier by.
- /// The Modifier if it is found, null otherwise.
+ /// The predicate to check the by.
+ /// The if it is found, otherwise.
[HideFromIl2Cpp]
public BaseModifier? GetModifier(Type type, Func? predicate = null)
{
@@ -283,11 +282,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a modifier by its type ID.
+ /// Gets a by its type ID.
///
- /// The modifier ID.
- /// The predicate to check the modifier by.
- /// The Modifier if it is found, null otherwise.
+ /// The ID.
+ /// The predicate to check the by.
+ /// The if it is found, otherwise.
[HideFromIl2Cpp]
public BaseModifier? GetModifier(uint id, Func? predicate = null)
{
@@ -298,10 +297,10 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Gets a modifier by unique ID.
+ /// Gets a by unique ID.
///
- /// The modifier's unique ID.
- /// The modifier if it is found, or null.
+ /// The 's unique ID.
+ /// The if it is found, or .
[HideFromIl2Cpp]
public BaseModifier? GetModifier(Guid modifierGuid)
{
@@ -309,10 +308,10 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Removes a modifier from the player.
+ /// Removes a from the player.
///
- /// The modifier type.
- /// The predicate to check the modifier by.
+ /// The type.
+ /// The predicate to check the by.
[HideFromIl2Cpp]
public void RemoveModifier(Func? predicate = null) where T : BaseModifier
{
@@ -320,10 +319,10 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Removes a modifier from the player.
+ /// Removes a from the player.
///
/// The modifier type.
- /// The predicate to check the modifier by.
+ /// The predicate to check the by.
[HideFromIl2Cpp]
public void RemoveModifier(Type type, Func? predicate = null)
{
@@ -344,9 +343,9 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Removes a modifier from the player.
+ /// Removes a from the player.
///
- /// The modifier object.
+ /// The object.
[HideFromIl2Cpp]
public void RemoveModifier(BaseModifier modifier)
{
@@ -360,10 +359,10 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Removes a modifier from the player.
+ /// Removes a from the player.
///
- /// The modifier's type ID.
- /// The predicate to check the modifier by.
+ /// The 's type ID.
+ /// The predicate to check the by.
[HideFromIl2Cpp]
public void RemoveModifier(uint typeId, Func? predicate = null)
{
@@ -373,9 +372,9 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Removes a modifier from the player.
+ /// Removes a from the player.
///
- /// The modifier's unique ID.
+ /// The 's unique ID.
[HideFromIl2Cpp]
public void RemoveModifier(Guid uniqueId)
{
@@ -390,11 +389,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Adds a modifier to the player.
+ /// Adds a to the player.
///
- /// The arguments to initialize the modifier constructor with.
- /// The Type of the modifier.
- /// The new modifier.
+ /// The arguments to initialize the with.
+ /// The Type of the .
+ /// The new .
[HideFromIl2Cpp]
public T? AddModifier(params object[] args) where T : BaseModifier
{
@@ -402,10 +401,10 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Adds a modifier to the player.
+ /// Adds a to the player.
///
- /// The modifier to add.
- /// The modifier that was added.
+ /// The to add.
+ /// The that was added.
[HideFromIl2Cpp]
public BaseModifier? AddModifier(BaseModifier modifier)
{
@@ -439,11 +438,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Adds a modifier to the player.
+ /// Adds a to the player.
///
/// The modifier type.
- /// The arguments to initialize the modifier constructor with.
- /// The modifier that was added.
+ /// The arguments to initialize the with.
+ /// The that was added.
[HideFromIl2Cpp]
public BaseModifier? AddModifier(Type type, params object[] args)
{
@@ -465,11 +464,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Adds a modifier to the player.
+ /// Adds a to the player.
///
- /// The ID of the modifier.
- /// The arguments to initialize the modifier constructor with.
- /// The modifier if it was created, or null if it failed.
+ /// The ID of the .
+ /// The arguments to initialize the with.
+ /// The if it was created, or if it failed.
[HideFromIl2Cpp]
public BaseModifier? AddModifier(uint id, params object[] args)
{
@@ -480,11 +479,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its type.
+ /// Checks if a player has an active .
///
- /// The predicate to check the modifier.
- /// The Type of the Modifier.
- /// True if the Modifier is present, false otherwise.
+ /// The predicate to check the .
+ /// The Type of the .
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(Func? predicate=null) where T : BaseModifier
{
@@ -492,11 +491,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its type.
+ /// Checks if a player has an active by its type.
///
/// The modifier type.
- /// The predicate to check the modifier.
- /// True if the Modifier is present, false otherwise.
+ /// The predicate to check the .
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(Type type, Func? predicate=null)
{
@@ -504,11 +503,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its type ID.
+ /// Checks if a player has an active by its type ID.
///
- /// The modifier's type ID.
- /// The predicate to check the modifier.
- /// True if the modifier is present, false otherwise.
+ /// The 's type ID.
+ /// The predicate to check the .
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(uint id, Func? predicate=null)
{
@@ -519,10 +518,10 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its unique ID.
+ /// Checks if a player has an active by its unique ID.
///
- /// The modifier's guid.
- /// True if the modifier is present, false otherwise.
+ /// The 's guid.
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(Guid id)
{
@@ -530,12 +529,12 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its type.
+ /// Checks if a player has an active .
///
- /// Whether to check inactive modifiers (those pending to be added).
- /// The predicate to check the modifier.
- /// The Type of the Modifier.
- /// True if the Modifier is present, false otherwise.
+ /// Whether to check inactive s (those pending to be added).
+ /// The predicate to check the .
+ /// The Type of the .
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(bool checkInactive, Func? predicate=null) where T : BaseModifier
{
@@ -544,12 +543,12 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its type.
+ /// Checks if a player has an active by its type.
///
/// The modifier type.
- /// Whether to check inactive modifiers (those pending to be added).
- /// The predicate to check the modifier.
- /// True if the Modifier is present, false otherwise.
+ /// Whether to check inactive s (those pending to be added).
+ /// The predicate to check the .
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(Type type, bool checkInactive, Func? predicate=null)
{
@@ -558,12 +557,12 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its type ID.
+ /// Checks if a player has an active by its type ID.
///
- /// The modifier's type ID.
- /// Whether to check inactive modifiers (those pending to be added).
- /// The predicate to check the modifier.
- /// True if the modifier is present, false otherwise.
+ /// The 's type ID.
+ /// Whether to check inactive s (those pending to be added).
+ /// The predicate to check the .
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(uint id, bool checkInactive, Func? predicate=null)
{
@@ -574,11 +573,11 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Checks if a player has an active modifier by its unique ID.
+ /// Checks if a player has an active by its unique ID.
///
- /// The modifier's guid.
- /// Whether to check inactive modifiers (those pending to be added).
- /// True if the modifier is present, false otherwise.
+ /// The 's guid.
+ /// Whether to check inactive s (those pending to be added).
+ /// if the is present, otherwise.
[HideFromIl2Cpp]
public bool HasModifier(Guid id, bool checkInactive)
{
diff --git a/MiraAPI/Modifiers/ModifierDisplay/ModifierDisplayComponent.cs b/MiraAPI/Modifiers/ModifierDisplay/ModifierDisplayComponent.cs
index 2982f67..e93f477 100644
--- a/MiraAPI/Modifiers/ModifierDisplay/ModifierDisplayComponent.cs
+++ b/MiraAPI/Modifiers/ModifierDisplay/ModifierDisplayComponent.cs
@@ -15,13 +15,13 @@ using UnityEngine.UI;
namespace MiraAPI.Modifiers.ModifierDisplay;
///
-/// The code used to display Mira modifiers.
+/// The code used to display s.
///
[RegisterInIl2Cpp]
public class ModifierDisplayComponent(nint cppPtr) : MonoBehaviour(cppPtr)
{
///
- /// Gets the instance of the Modifier Display.
+ /// Gets the instance of the .
///
public static ModifierDisplayComponent? Instance { get; private set; }
@@ -41,7 +41,7 @@ public class ModifierDisplayComponent(nint cppPtr) : MonoBehaviour(cppPtr)
private readonly Dictionary _modifiers = [];
///
- /// Gets a read only dictionary of the created modifier UI components.
+ /// Gets a of the created s.
///
[HideFromIl2Cpp]
public ReadOnlyDictionary Modifiers => new(_modifiers);
@@ -108,7 +108,7 @@ public class ModifierDisplayComponent(nint cppPtr) : MonoBehaviour(cppPtr)
}
///
- /// Use this to refresh the modifiers UI. Useful if you hide modifiers uis based on options.
+ /// Use this to refresh the modifiers UI. Useful if you hide modifiers UIs based on options.
///
public void RefreshModifiers()
{
@@ -137,7 +137,7 @@ public class ModifierDisplayComponent(nint cppPtr) : MonoBehaviour(cppPtr)
internal void DestroyComponent(ModifierUiComponent component)
{
_modifiers.Remove(component.Modifier!);
- component.gameObject.DestroyImmediate();
+ component.gameObject.Destroy();
RefreshModifiers();
}
diff --git a/MiraAPI/Modifiers/ModifierDisplay/ModifierUiComponent.cs b/MiraAPI/Modifiers/ModifierDisplay/ModifierUiComponent.cs
index ef8b0bb..66ded67 100644
--- a/MiraAPI/Modifiers/ModifierDisplay/ModifierUiComponent.cs
+++ b/MiraAPI/Modifiers/ModifierDisplay/ModifierUiComponent.cs
@@ -6,13 +6,13 @@ using UnityEngine;
namespace MiraAPI.Modifiers.ModifierDisplay;
///
-/// The code placed on every Modifier HUD object. Used to handle updating.
+/// The code placed on every HUD object. Used to handle updating.
///
[RegisterInIl2Cpp]
public class ModifierUiComponent(nint cppPtr) : MonoBehaviour(cppPtr)
{
///
- /// Gets the modifier which this component is for.
+ /// Gets the which this component is for.
///
[HideFromIl2Cpp]
public BaseModifier? Modifier { get; internal set; }
diff --git a/MiraAPI/Modifiers/ModifierExtensions.cs b/MiraAPI/Modifiers/ModifierExtensions.cs
index 7a0ef23..e70a26a 100644
--- a/MiraAPI/Modifiers/ModifierExtensions.cs
+++ b/MiraAPI/Modifiers/ModifierExtensions.cs
@@ -5,26 +5,25 @@ using MiraAPI.Networking;
using MiraAPI.Networking.Modifiers;
using Reactor.Networking.Attributes;
using Reactor.Networking.Rpc;
-using Reactor.Utilities;
namespace MiraAPI.Modifiers;
///
-/// Extensions for modifiers.
+/// Extensions for s.
///
public static class ModifierExtensions
{
///
- /// Gets the dictionary to cache ModifierComponents.
+ /// Gets the to cache s.
///
public static Dictionary ModifierComponents { get; } = [];
///
- /// Remote Procedure Call to add a modifier to a player.
+ /// Remote Procedure Call to add a to a .
///
- /// The player to add the modifier to.
- /// The modifier type ID.
- /// The arguments to initialize the modifier constructor with.
+ /// The to add the to.
+ /// The type ID.
+ /// The arguments to initialize the with.
public static void RpcAddModifier(this PlayerControl target, uint typeId, params object[] args)
{
_ = ModifierManager.GetModifierType(typeId) ?? throw new InvalidOperationException(
@@ -34,11 +33,11 @@ public static class ModifierExtensions
}
///
- /// Remote Procedure Call to add a modifier to a player.
+ /// Remote Procedure Call to add a to a .
///
- /// The player to add the modifier to.
- /// The type of the modifier.
- /// The arguments to initialize the modifier constructor with.
+ /// The to add the to.
+ /// The type of the .
+ /// The arguments to initialize the with.
public static void RpcAddModifier(this PlayerControl player, Type type, params object[] args)
{
var id = ModifierManager.GetModifierTypeId(type) ?? throw new InvalidOperationException(
@@ -48,21 +47,21 @@ public static class ModifierExtensions
}
///
- /// Remote Procedure Call to add a modifier to a player.
+ /// Remote Procedure Call to add a to a .
///
- /// The player to add the modifier to.
- /// The arguments to initialize the modifier constructor with.
- /// The modifier Type.
+ /// The to add the to.
+ /// The arguments to initialize the with.
+ /// The Type.
public static void RpcAddModifier(this PlayerControl player, params object[] args) where T : BaseModifier
{
player.RpcAddModifier(typeof(T), args);
}
///
- /// Remote Procedure Call to remove a modifier from a player.
+ /// Remote Procedure Call to remove a from a .
///
- /// The player to remove the modifier from.
- /// The unique ID of the modifier.
+ /// The to remove the from.
+ /// The unique ID of the .
[MethodRpc((uint)MiraRpc.RemoveModifier)]
public static void RpcRemoveModifier(this PlayerControl target, Guid uniqueId)
{
@@ -70,11 +69,11 @@ public static class ModifierExtensions
}
///
- /// Remote Procedure Call to remove a modifier from a player by type ID.
+ /// Remote Procedure Call to remove a from a by type ID.
///
- /// The player to remove the modifier from.
- /// The type ID of the modifier.
- /// Optional predicate to filter the modifiers.
+ /// The to remove the from.
+ /// The type ID of the .
+ /// Optional predicate to filter the s.
public static void RpcRemoveModifier(
this PlayerControl target,
uint typeId,
@@ -91,11 +90,11 @@ public static class ModifierExtensions
}
///
- /// Remote Procedure Call to remove a modifier from a player.
+ /// Remote Procedure Call to remove a from a .
///
- /// The player to remove the modifier from.
- /// The type of the modifier.
- /// Optional predicate to filter the modifiers.
+ /// The to remove the from.
+ /// The type of the .
+ /// Optional predicate to filter the s.
public static void RpcRemoveModifier(
this PlayerControl player,
Type type,
@@ -108,11 +107,11 @@ public static class ModifierExtensions
}
///
- /// Remote Procedure Call to remove a modifier from a player.
+ /// Remote Procedure Call to remove a from a .
///
- /// The player to remove the modifier from.
- /// Optional predicate to filter the modifiers.
- /// The Type of the Modifier.
+ /// The to remove the from.
+ /// Optional predicate to filter the s.
+ /// The Type of the .
public static void RpcRemoveModifier(this PlayerControl player, Func? predicate = null)
where T : BaseModifier
{
@@ -120,10 +119,10 @@ public static class ModifierExtensions
}
///
- /// Gets the ModifierComponent for a player.
+ /// Gets the for a .
///
- /// The PlayerControl object.
- /// A ModifierComponent if there is one, null otherwise.
+ /// The object.
+ /// A if there is one, otherwise.
public static ModifierComponent GetModifierComponent(this PlayerControl player)
{
if (ModifierComponents.TryGetValue(player, out var component))
@@ -142,36 +141,36 @@ public static class ModifierExtensions
}
///
- /// Checks if the player has a specific modifier.
+ /// Checks if the has a specific .
///
- /// The type of the modifier.
- /// The PlayerControl instance.
- /// Optional predicate to filter the modifiers.
- /// True if the player has the modifier, false otherwise.
+ /// The type of the .
+ /// The instance.
+ /// Optional predicate to filter the s.
+ /// if the has the , otherwise.
public static bool HasModifier(this PlayerControl player, Func? predicate = null) where T : BaseModifier
{
return player.GetModifierComponent().HasModifier(predicate);
}
///
- /// Checks if the player has a specific modifier by type.
+ /// Checks if the has a specific by type.
///
- /// The PlayerControl instance.
+ /// The instance.
/// The type of the modifier.
- /// Optional predicate to filter the modifiers.
- /// True if the player has the modifier, false otherwise.
+ /// Optional predicate to filter the s.
+ /// if the has the , otherwise.
public static bool HasModifier(this PlayerControl player, Type type, Func? predicate = null)
{
return player.GetModifierComponent().HasModifier(type, predicate);
}
///
- /// Checks if the player has a specific modifier by type ID.
+ /// Checks if the has a specific by type ID.
///
- /// The PlayerControl instance.
- /// The type ID of the modifier.
- /// Optional predicate to filter the modifiers.
- /// True if the player has the modifier, false otherwise.
+ /// The instance.
+ /// The type ID of the .
+ /// Optional predicate to filter the s.
+ /// if the has the , otherwise.
public static bool HasModifier(
this PlayerControl player,
uint typeId,
@@ -181,20 +180,20 @@ public static class ModifierExtensions
}
///
- /// Checks if the player has a specific modifier by its GUID.
+ /// Checks if the has a specific modifier by its GUID.
///
- /// The PlayerControl instance.
- /// The unique ID of the modifier.
- /// True if the player has the modifier, false otherwise.
+ /// The instance.
+ /// The unique ID of the .
+ /// if the has the , otherwise.
public static bool HasModifier(this PlayerControl player, Guid uniqueId)
{
return player.GetModifierComponent().HasModifier(uniqueId);
}
///
- /// Clears all modifiers from a player.
+ /// Clears all s from the .
///
- /// The player you want to clear modifiers for.
+ /// The player you want to clear s for.
public static void ClearModifiers(this PlayerControl plr)
{
foreach (var mod in plr.GetModifierComponent().ActiveModifiers)
@@ -204,9 +203,9 @@ public static class ModifierExtensions
}
///
- /// Clears all modifiers from a player.
+ /// Clears all s from the .
///
- /// The player you want to clear modifiers for.
+ /// The player you want to clear s for.
public static void RpcClearModifiers(this PlayerControl plr)
{
foreach (var mod in plr.GetModifierComponent().ActiveModifiers)
@@ -216,75 +215,75 @@ public static class ModifierExtensions
}
///
- /// Tries to get a modifier by its type.
+ /// Tries to get a .
///
- /// The PlayerControl instance.
- /// The modifier or null.
- /// The predicate to check the modifier by.
- /// The Type of the Modifier.
- /// True if the modifier was found, false otherwise.
+ /// The instance.
+ /// The or .
+ /// The predicate to check the by.
+ /// The Type of the .
+ /// if the was found, otherwise.
public static bool TryGetModifier(this PlayerControl player, [NotNullWhen(true)] out T? modifier, Func? predicate = null) where T : BaseModifier
{
return player.GetModifierComponent().TryGetModifier(out modifier, predicate);
}
///
- /// Tries to get a modifier by its type.
+ /// Tries to get a by its type.
///
- /// The PlayerControl instance.
+ /// The instance.
/// The modifier type.
- /// The modifier or null.
- /// The predicate to check the modifier by.
- /// True if the modifier was found, false otherwise.
+ /// The or .
+ /// The predicate to check the by.
+ /// if the was found, otherwise.
public static bool TryGetModifier(this PlayerControl player, Type type, [NotNullWhen(true)] out BaseModifier? modifier, Func? predicate = null)
{
return player.GetModifierComponent().TryGetModifier(type, out modifier, predicate);
}
///
- /// Tries to get a modifier by its type ID.
+ /// Tries to get a by its type ID.
///
- /// The PlayerControl instance.
- /// The modifier type ID.
- /// The modifier or null.
- /// The predicate to check the modifier by.
- /// True if the modifier was found, false otherwise.
+ /// The instance.
+ /// The type ID.
+ /// The or .
+ /// The predicate to check the by.
+ /// if the was found, otherwise.
public static bool TryGetModifier(this PlayerControl player, uint id, [NotNullWhen(true)] out BaseModifier? modifier, Func? predicate = null)
{
return player.GetModifierComponent().TryGetModifier(id, out modifier, predicate);
}
///
- /// Tries to get a modifier by its unique ID.
+ /// Tries to get a by its unique ID.
///
- /// The PlayerControl instance.
- /// The modifier unique ID.
- /// The modifier or null.
- /// True if the modifier was found, false otherwise.
+ /// The instance.
+ /// The unique ID.
+ /// The or .
+ /// if the was found, otherwise.
public static bool TryGetModifier(this PlayerControl player, Guid modifierGuid, [NotNullWhen(true)] out BaseModifier? modifier)
{
return player.GetModifierComponent().TryGetModifier(modifierGuid, out modifier);
}
///
- /// Gets a specific modifier from the player.
+ /// Gets a specific from the .
///
- /// The type of the modifier.
- /// The PlayerControl instance.
- /// Optional predicate to filter the modifiers.
- /// The modifier if found, null otherwise.
+ /// The type of the .
+ /// The instance.
+ /// Optional predicate to filter the s.
+ /// The if found, otherwise.
public static T? GetModifier(this PlayerControl player, Func? predicate = null) where T : BaseModifier
{
return player.GetModifierComponent().GetModifier(predicate);
}
///
- /// Gets a specific modifier from the player by type.
+ /// Gets a specific from the by type.
///
- /// The PlayerControl instance.
+ /// The instance.
/// The type of the modifier.
- /// Optional predicate to filter the modifiers.
- /// The modifier if found, null otherwise.
+ /// Optional predicate to filter the s.
+ /// The if found, otherwise.
public static BaseModifier? GetModifier(
this PlayerControl player,
Type type,
@@ -294,12 +293,12 @@ public static class ModifierExtensions
}
///
- /// Gets a specific modifier from the player by its type ID.
+ /// Gets a specific from the by its type ID.
///
- /// The PlayerControl instance.
- /// The type ID of the modifier.
- /// Optional predicate to filter the modifiers.
- /// The modifier if found, null otherwise.
+ /// The instance.
+ /// The type ID of the .
+ /// Optional predicate to filter the s.
+ /// The if found, otherwise.
public static BaseModifier? GetModifier(
this PlayerControl player,
uint typeId,
@@ -309,11 +308,11 @@ public static class ModifierExtensions
}
///
- /// Gets a specific modifier from the player by its GUID.
+ /// Gets a specific from the by its GUID.
///
- /// The PlayerControl instance.
- /// The GUID of the modifier.
- /// The modifier if found, null otherwise.
+ /// The instance.
+ /// The GUID of the .
+ /// The if found, otherwise.
public static BaseModifier? GetModifier(
this PlayerControl player,
Guid uniqueId)
@@ -322,12 +321,12 @@ public static class ModifierExtensions
}
///
- /// Gets all modifiers of a specific type from the player.
+ /// Gets all s from the .
///
- /// The type of the modifiers.
- /// The PlayerControl instance.
- /// Optional predicate to filter the modifiers.
- /// A collection of modifiers.
+ /// The type of the s.
+ /// The instance.
+ /// Optional predicate to filter the s.
+ /// An of s.
public static IEnumerable GetModifiers(this PlayerControl player, Func? predicate = null)
where T : BaseModifier
{
@@ -335,12 +334,12 @@ public static class ModifierExtensions
}
///
- /// Gets all modifiers of a specific type from the player.
+ /// Gets all s of a specific type from the .
///
- /// The PlayerControl instance.
+ /// The instance.
/// The type of the modifiers.
- /// Optional predicate to filter the modifiers.
- /// A collection of modifiers.
+ /// Optional predicate to filter the s.
+ /// An of s.
public static IEnumerable GetModifiers(
this PlayerControl player,
Type type,
@@ -350,12 +349,12 @@ public static class ModifierExtensions
}
///
- /// Gets all modifiers of a specific type from the player by type ID.
+ /// Gets all s of a specific type from the by type ID.
///
- /// The PlayerControl instance.
- /// The type ID of the modifiers.
- /// Optional predicate to filter the modifiers.
- /// A collection of modifiers.
+ /// The instance.
+ /// The type ID of the s.
+ /// Optional predicate to filter the s.
+ /// An of s.
public static IEnumerable GetModifiers(
this PlayerControl player,
uint typeId,
@@ -365,21 +364,21 @@ public static class ModifierExtensions
}
///
- /// Removes a specific modifier from the player.
+ /// Removes a specific from the .
///
- /// The PlayerControl instance.
- /// The modifier to remove.
+ /// The instance.
+ /// The to remove.
public static void RemoveModifier(this PlayerControl player, BaseModifier modifier)
{
player.GetModifierComponent().RemoveModifier(modifier);
}
///
- /// Removes a specific modifier from the player.
+ /// Removes a specific from the .
///
- /// The type of the modifier.
- /// The PlayerControl instance.
- /// Optional predicate to filter the modifiers.
+ /// The type of the .
+ /// The instance.
+ /// Optional predicate to filter the s.
public static void RemoveModifier(this PlayerControl player, Func? predicate = null)
where T : BaseModifier
{
@@ -387,22 +386,22 @@ public static class ModifierExtensions
}
///
- /// Removes a specific modifier from the player by type.
+ /// Removes a specific from the by type.
///
- /// The PlayerControl instance.
+ /// The instance.
/// The type of the modifier.
- /// Optional predicate to filter the modifiers.
+ /// Optional predicate to filter the s.
public static void RemoveModifier(this PlayerControl player, Type type, Func? predicate = null)
{
player.GetModifierComponent().RemoveModifier(type, predicate);
}
///
- /// Removes a specific modifier from the player by its type ID.
+ /// Removes a specific from the by its type ID.
///
- /// The PlayerControl instance.
- /// The type ID of the modifier.
- /// Optional predicate to filter the modifiers.
+ /// The instance.
+ /// The type ID of the .
+ /// Optional predicate to filter the s.
public static void RemoveModifier(
this PlayerControl player,
uint typeId,
@@ -412,10 +411,10 @@ public static class ModifierExtensions
}
///
- /// Removes a specific modifier from the player by its GUID.
+ /// Removes a specific from the by its GUID.
///
- /// The PlayerControl instance.
- /// The GUID of the modifier.
+ /// The instance.
+ /// The GUID of the .
public static void RemoveModifier(
this PlayerControl player,
Guid uniqueId)
@@ -424,47 +423,47 @@ public static class ModifierExtensions
}
///
- /// Adds a specific modifier to the player.
+ /// Adds a specific to the .
///
- /// The type of the modifier.
- /// The PlayerControl instance.
- /// The arguments to initialize the modifier constructor with.
- /// The added modifier.
+ /// The type of the .
+ /// The instance.
+ /// The arguments to initialize the with.
+ /// The added .
public static T? AddModifier(this PlayerControl player, params object[] args) where T : BaseModifier
{
return player.GetModifierComponent().AddModifier(args);
}
///
- /// Adds a specific modifier to the player.
+ /// Adds a specific to the .
///
- /// The PlayerControl instance.
- /// The modifier to add.
- /// The added modifier.
+ /// The instance.
+ /// The to add.
+ /// The added .
public static BaseModifier? AddModifier(this PlayerControl player, BaseModifier modifier)
{
return player.GetModifierComponent().AddModifier(modifier);
}
///
- /// Adds a specific modifier to the player by type.
+ /// Adds a specific to the by type.
///
- /// The PlayerControl instance.
+ /// The instance.
/// The type of the modifier.
- /// The arguments to initialize the modifier constructor with.
- /// The added modifier.
+ /// The arguments to initialize the with.
+ /// The added .
public static BaseModifier? AddModifier(this PlayerControl player, Type type, params object[] args)
{
return player.GetModifierComponent().AddModifier(type, args);
}
///
- /// Adds a specific modifier to the player by type ID.
+ /// Adds a specific to the by type ID.
///
- /// The PlayerControl instance.
- /// The type ID of the modifier.
- /// The arguments to initialize the modifier constructor with.
- /// The added modifier.
+ /// The instance.
+ /// The type ID of the .
+ /// The arguments to initialize the with.
+ /// The added .
public static BaseModifier? AddModifier(this PlayerControl player, uint typeId, params object[] args)
{
return player.GetModifierComponent().AddModifier(typeId, args);
diff --git a/MiraAPI/Modifiers/ModifierFactory.cs b/MiraAPI/Modifiers/ModifierFactory.cs
index 4f84db0..cd3c9be 100644
--- a/MiraAPI/Modifiers/ModifierFactory.cs
+++ b/MiraAPI/Modifiers/ModifierFactory.cs
@@ -8,7 +8,7 @@ using MiraAPI.Utilities;
namespace MiraAPI.Modifiers;
///
-/// Factory for creating instances of a modifier. More efficient than using reflection.
+/// Factory for creating instances of a . More efficient than using reflection.
///
public static class ModifierFactory
{
@@ -39,11 +39,11 @@ public static class ModifierFactory
}
///
- /// Creates a modifier with the specified type and arguments.
+ /// Creates a with the specified type and arguments.
///
/// Modifier type.
/// Arguments.
- /// An instance of the modifier.
+ /// An instance of the .
public static BaseModifier CreateInstance(Type type, params object[] args)
{
var argTypes = args.Select(arg => arg.GetType()).ToArray();
@@ -60,9 +60,9 @@ public static class ModifierFactory
}
///
-/// Factory for creating instances of a modifier. More efficient than using reflection.
+/// Factory for creating instances of . More efficient than using reflection.
///
-/// The modifier type.
+/// The type.
public static class ModifierFactory where T : BaseModifier
{
private static readonly Func