ConGroups are gone. Long live admin flags in content.
This commit is contained in:
27
Content.Server/Administration/AdminCommandAttribute.cs
Normal file
27
Content.Server/Administration/AdminCommandAttribute.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Content.Shared.Administration;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.Interfaces.Console;
|
||||
|
||||
namespace Content.Server.Administration
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies that a command can only be executed by an admin with the specified flags.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If this attribute is used multiple times, either attribute's flag sets can be used to get access.
|
||||
/// </remarks>
|
||||
/// <seealso cref="AnyCommandAttribute"/>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
[BaseTypeRequired(typeof(IClientCommand))]
|
||||
[MeansImplicitUse]
|
||||
public sealed class AdminCommandAttribute : Attribute
|
||||
{
|
||||
public AdminCommandAttribute(AdminFlags flags)
|
||||
{
|
||||
Flags = flags;
|
||||
}
|
||||
|
||||
public AdminFlags Flags { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user