diff --git a/Exiled.CustomModules/API/Features/CustomAbilities/CustomAbility.cs b/Exiled.CustomModules/API/Features/CustomAbilities/CustomAbility.cs index 44b1c05405..5f96903c74 100644 --- a/Exiled.CustomModules/API/Features/CustomAbilities/CustomAbility.cs +++ b/Exiled.CustomModules/API/Features/CustomAbilities/CustomAbility.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomModules.API.Features.CustomAbilities { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Linq; using System.Reflection; @@ -128,31 +129,36 @@ public abstract class CustomAbility : CustomModule, ICustomAbility [YamlIgnore] public abstract Type BehaviourComponent { get; } - /// - /// Gets the ability's settings. - /// - public virtual AbilitySettings Settings { get; } = AbilitySettings.Default; - /// /// Gets or sets the 's name. /// + [Description("The name of the custom ability.")] public override string Name { get; set; } /// /// Gets or sets the 's id. /// + [Description("The id of the custom ability.")] public override uint Id { get; set; } /// /// Gets or sets a value indicating whether the ability is enabled. /// + [Description("Indicates whether the ability is enabled.")] public override bool IsEnabled { get; set; } /// /// Gets or sets the description of the ability. /// + [Description("The description of the custom ability.")] public virtual string Description { get; set; } + /// + /// Gets the ability's settings. + /// + [Description("The settings for the custom ability.")] + public virtual AbilitySettings Settings { get; } = AbilitySettings.Default; + /// /// Gets the reflected generic type. /// diff --git a/Exiled.CustomModules/API/Features/CustomEscapes/CustomEscape.cs b/Exiled.CustomModules/API/Features/CustomEscapes/CustomEscape.cs index d944ea5e07..0c2ddb65ab 100644 --- a/Exiled.CustomModules/API/Features/CustomEscapes/CustomEscape.cs +++ b/Exiled.CustomModules/API/Features/CustomEscapes/CustomEscape.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomModules.API.Features.CustomEscapes { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Linq; using System.Reflection; @@ -63,35 +64,40 @@ public abstract class CustomEscape : CustomModule, IAdditiveBehaviour [YamlIgnore] public override ModulePointer Config { get; set; } + /// + /// Gets the 's . + /// + [YamlIgnore] + public virtual Type BehaviourComponent { get; } + /// /// Gets or sets the 's name. /// + [Description("The name of the custom escape.")] public override string Name { get; set; } /// - /// Gets or sets or sets the 's id. + /// Gets or sets the 's id. /// + [Description("The id of the custom escape.")] public override uint Id { get; set; } /// /// Gets or sets a value indicating whether the is enabled. /// + [Description("Indicates whether the custom escape is enabled.")] public override bool IsEnabled { get; set; } /// - /// Gets the 's . - /// - [YamlIgnore] - public virtual Type BehaviourComponent { get; } - - /// - /// Gets or sets all 's to be displayed based on the relative . + /// Gets or sets all s to be displayed based on the relative . /// + [Description("A dictionary of hints to be displayed based on the scenario type.")] public virtual Dictionary Scenarios { get; set; } = new(); /// /// Gets or sets a of containing all escape settings. /// + [Description("A list of escape settings, including the default settings.")] public virtual List Settings { get; set; } = new() { EscapeSettings.Default, }; /// diff --git a/Exiled.CustomModules/API/Features/CustomGamemodes/CustomGameMode.cs b/Exiled.CustomModules/API/Features/CustomGamemodes/CustomGameMode.cs index 924d9f3d34..11a39471b7 100644 --- a/Exiled.CustomModules/API/Features/CustomGamemodes/CustomGameMode.cs +++ b/Exiled.CustomModules/API/Features/CustomGamemodes/CustomGameMode.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomModules.API.Features.CustomGameModes { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Linq; using System.Reflection; @@ -74,18 +75,28 @@ public abstract class CustomGameMode : CustomModule, IAdditiveBehaviours [YamlIgnore] public static IEnumerable List => Registered; - /// + /// + /// Gets or sets the name. + /// + [Description("The name of the game mode.")] public override string Name { get; set; } - /// + /// + /// Gets or sets the 's id. + /// + [Description("The id of the game mode.")] public override uint Id { get; set; } - /// + /// + /// Gets or sets a value indicating whether the is enabled. + /// + [Description("Indicates whether the game mode is enabled.")] public override bool IsEnabled { get; set; } /// /// Gets or sets the . /// + [Description("The settings for the game mode.")] public virtual GameModeSettings Settings { get; set; } /// diff --git a/Exiled.CustomModules/API/Features/CustomItems/CustomItem.cs b/Exiled.CustomModules/API/Features/CustomItems/CustomItem.cs index 6e5600a504..bde381789f 100644 --- a/Exiled.CustomModules/API/Features/CustomItems/CustomItem.cs +++ b/Exiled.CustomModules/API/Features/CustomItems/CustomItem.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomModules.API.Features.CustomItems { using System; using System.Collections.Generic; + using System.ComponentModel; using System.IO; using System.Linq; using System.Reflection; @@ -88,36 +89,43 @@ public abstract class CustomItem : CustomModule, IAdditiveBehaviour /// /// Gets or sets the 's name. /// + [Description("The name of the custom item.")] public override string Name { get; set; } /// /// Gets or sets the 's id. /// + [Description("The id of the custom item.")] public override uint Id { get; set; } /// - /// Gets or sets a value indicating whether the is enabled. + /// Gets or sets the 's description. /// - public override bool IsEnabled { get; set; } + [Description("The description of the custom item.")] + public virtual string Description { get; set; } /// - /// Gets or sets the 's description. + /// Gets or sets a value indicating whether the is enabled. /// - public virtual string Description { get; set; } + [Description("Indicates whether the custom item is enabled.")] + public override bool IsEnabled { get; set; } /// /// Gets or sets the 's . /// + [Description("The type of the custom item.")] public virtual ItemType ItemType { get; set; } /// /// Gets or sets the 's . /// + [Description("The category of the custom item.")] public virtual ItemCategory ItemCategory { get; set; } /// /// Gets or sets the . /// + [Description("The settings of the custom item.")] public virtual SettingsBase Settings { get; set; } /// diff --git a/Exiled.CustomModules/API/Features/CustomRoles/CustomRole.cs b/Exiled.CustomModules/API/Features/CustomRoles/CustomRole.cs index 9d85a95b89..a48e8f4391 100644 --- a/Exiled.CustomModules/API/Features/CustomRoles/CustomRole.cs +++ b/Exiled.CustomModules/API/Features/CustomRoles/CustomRole.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomModules.API.Features.CustomRoles { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Linq; using System.Reflection; @@ -91,31 +92,37 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// Gets or sets the 's name. /// + [Description("The name of the custom role.")] public override string Name { get; set; } /// /// Gets or sets the 's id. /// + [Description("The id of the custom role.")] public override uint Id { get; set; } /// /// Gets or sets the 's description. /// + [Description("The description of the custom role.")] public virtual string Description { get; set; } /// /// Gets or sets a value indicating whether the is enabled. /// + [Description("Indicates whether the custom role is enabled.")] public override bool IsEnabled { get; set; } /// /// Gets or sets the 's . /// + [Description("The custom role's RoleTypeId.")] public virtual RoleTypeId Role { get; set; } /// /// Gets or sets the relative spawn chance of the . /// + [Description("The custom role's spawn chance.")] public virtual int Probability { get; set; } /// @@ -124,6 +131,7 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// This property specifies the required alive team to be eligible for spawning in the . /// + [Description("The custom role's required team to spawn.")] public virtual Team RequiredTeamToSpawn { get; set; } = Team.Dead; /// @@ -132,6 +140,7 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// This property specifies the required role type for players to be eligible for spawning in the . /// + [Description("The custom role's required RoleTypeId to spawn.")] public virtual RoleTypeId RequiredRoleToSpawn { get; set; } = RoleTypeId.None; /// @@ -140,6 +149,7 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// This property specifies the required alive custom team to be eligible for spawning in the . /// + [Description("The custom role's required custom team to spawn.")] public virtual uint RequiredCustomTeamToSpawn { get; set; } /// @@ -148,21 +158,19 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// This property specifies the required custom role for players to be eligible for spawning in the . /// + [Description("The custom role's required custom role to spawn.")] public virtual uint RequiredCustomRoleToSpawn { get; set; } - /// - /// Gets or sets the . - /// - public virtual RoleSettings Settings { get; set; } = RoleSettings.Default; - /// /// Gets or sets the . /// + [Description("The escape settings for the custom role.")] public virtual List EscapeSettings { get; set; } = new(); /// /// Gets or sets a value representing the maximum instances of the that can be automatically assigned. /// + [Description("The maximum number of instances for the custom role.")] public virtual int MaxInstances { get; set; } /// @@ -171,31 +179,43 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// This property specifies the teams the belongs to. /// + [Description("The required teams for the custom role to win.")] public virtual Team[] TeamsOwnership { get; set; } = { }; /// /// Gets or sets the from which to retrieve players for assigning the . /// + [Description("The spawnable team type for assigning players to the custom role.")] public virtual SpawnableTeamType AssignFromTeam { get; set; } = SpawnableTeamType.None; /// /// Gets or sets the from which to retrieve players for assigning the . /// + [Description("The role type ID for assigning players to the custom role.")] public virtual RoleTypeId AssignFromRole { get; set; } /// - /// Gets or sets all roles to override, preventing the specified roles to spawn. + /// Gets or sets all roles to override, preventing the specified roles from spawning. /// + [Description("All roles to override and prevent from spawning.")] public virtual RoleTypeId[] OverrideScps { get; set; } /// /// Gets or sets a value indicating whether the should be treated as a separate team unit. /// + [Description("Indicates whether the custom role should be treated as a separate team unit.")] public virtual bool IsTeamUnit { get; set; } + /// + /// Gets or sets the . + /// + [Description("The role settings associated with the custom role.")] + public virtual RoleSettings Settings { get; set; } = RoleSettings.Default; + /// /// Gets or sets a value indicating whether the should be considered an SCP. /// + [Description("Indicates whether the custom role should be considered an SCP.")] public virtual bool IsScp { get; set; } /// @@ -214,6 +234,7 @@ public abstract class CustomRole : CustomModule, IAdditiveBehaviour /// /// Gets all the instances of this in the global context. /// + [YamlIgnore] public int GlobalInstances { get; private set; } /// diff --git a/Exiled.CustomModules/API/Features/CustomRoles/CustomTeam.cs b/Exiled.CustomModules/API/Features/CustomRoles/CustomTeam.cs index 328eb31439..2fe3660473 100644 --- a/Exiled.CustomModules/API/Features/CustomRoles/CustomTeam.cs +++ b/Exiled.CustomModules/API/Features/CustomRoles/CustomTeam.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomModules.API.Features.CustomRoles { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Linq; using System.Reflection; @@ -68,16 +69,19 @@ public abstract class CustomTeam : CustomModule /// /// Gets or sets the name of the . /// + [Description("The name of the custom team.")] public override string Name { get; set; } /// /// Gets or sets the 's id. /// + [Description("The custom team's id.")] public override uint Id { get; set; } /// /// Gets or sets a value indicating whether the is enabled. /// + [Description("Indicates whether the custom team is enabled.")] public override bool IsEnabled { get; set; } /// @@ -86,6 +90,7 @@ public abstract class CustomTeam : CustomModule /// /// The display name is used to represent the in user interfaces and other visual contexts. /// + [Description("The display name of the custom team.")] public virtual string DisplayName { get; set; } /// @@ -94,6 +99,7 @@ public abstract class CustomTeam : CustomModule /// /// The display color is the visual representation of the name color in user interfaces and other visual contexts. /// + [Description("The display color of the custom team's name.")] public virtual string DisplayColor { get; set; } /// @@ -102,88 +108,79 @@ public abstract class CustomTeam : CustomModule /// /// The size indicates the maximum number of players that can be part of this . /// + [Description("The maximum size of the custom team.")] public virtual int Size { get; set; } /// /// Gets or sets a collection of ids representing all custom roles offered as units. /// - /// - /// This property provides access to a curated collection of objects, encapsulating all available custom role within the context of units. - ///
The collection is designed to be both queried and modified as needed to accommodate dynamic scenarios within the game architecture. - ///
+ [Description("The collection of custom role ids offered as units.")] public virtual IEnumerable Units { get; set; } = new uint[] { }; /// - /// Gets or sets the minimum amount time after which any team will be allowed to spawn. + /// Gets or sets the minimum amount of time after which any team will be allowed to spawn. /// + [Description("The minimum time before the team can spawn.")] public virtual float MinNextSequenceTime { get; set; } = GameCore.ConfigFile.ServerConfig.GetFloat("minimum_MTF_time_to_spawn", 280f); /// - /// Gets or sets the maximum amount time after which any team will be spawned. + /// Gets or sets the maximum amount of time after which any team will be spawned. /// + [Description("The maximum time before the team can spawn.")] public virtual float MaxNextSequenceTime { get; set; } = GameCore.ConfigFile.ServerConfig.GetFloat("maximum_MTF_time_to_spawn", 350f); /// /// Gets or sets the relative spawn probability of the . /// + [Description("The spawn probability of the custom team.")] public virtual int Probability { get; set; } /// /// Gets or sets the which is being spawned from. /// + [Description("The spawnable team types from which the custom team can be spawned.")] public virtual SpawnableTeamType[] SpawnableFromTeams { get; set; } /// /// Gets or sets a value indicating whether the is configured to use respawn tickets. /// - /// - /// If set to true, the utilizes a ticket system for player respawns. - /// + [Description("Indicates whether the custom team uses respawn tickets.")] public virtual bool UseTickets { get; set; } /// /// Gets or sets the current number of respawn tickets available for the . /// - /// - /// This property represents the remaining number of respawn tickets that can be used by the . - /// + [Description("The number of respawn tickets available for the custom team.")] public virtual uint Tickets { get; set; } /// /// Gets or sets the required that players must belong to in order to allow the to spawn. /// - /// - /// This property specifies the required alive team to be eligible for spawning in the . - /// + [Description("The required team for spawning the custom team.")] public virtual Team RequiredTeamToSpawn { get; set; } = Team.Dead; /// /// Gets or sets the required that players must have to allow the to spawn. /// - /// - /// This property specifies the required role type for players to be eligible for spawning in the . - /// + [Description("The required role type for spawning the custom team.")] public virtual RoleTypeId RequiredRoleToSpawn { get; set; } = RoleTypeId.None; /// /// Gets or sets the required custom team that players must belong to in order to allow the to spawn. /// - /// - /// This property specifies the required alive custom team to be eligible for spawning in the . - /// + [Description("The required custom team for spawning the custom team.")] public virtual uint RequiredCustomTeamToSpawn { get; set; } /// /// Gets or sets the required that players must have to allow the to spawn. /// - /// - /// This property specifies the required custom role for players to be eligible for spawning in the . - /// + [Description("The required custom role for spawning the custom team.")] public virtual uint RequiredCustomRoleToSpawn { get; set; } /// /// Gets or sets the teams the belongs to. /// + [Description("The teams that the custom team belongs to.")] public virtual Team[] TeamsOwnership { get; set; } = { }; ///