namespacify everything

This commit is contained in:
2024-04-06 14:42:10 +03:00
parent 68b735b59c
commit 6430cc9b4d
42 changed files with 10066 additions and 10107 deletions

View File

@@ -2,48 +2,48 @@
using System.Collections.Generic;
using System.Linq;
namespace Game
namespace Game;
[AttributeUsage(AttributeTargets.All)]
public abstract class ConsoleBaseAttribute : Attribute
{
[AttributeUsage(AttributeTargets.All)]
public abstract class ConsoleBaseAttribute : Attribute
// Additional aliases for this command, these should only be used with user interaction.
// Commands such as 'cvarlist' should not list these in order to avoid clutter.
internal string[] aliases = new string[0];
internal string name;
public ConsoleBaseAttribute(string name)
{
// Additional aliases for this command, these should only be used with user interaction.
// Commands such as 'cvarlist' should not list these in order to avoid clutter.
internal string[] aliases = new string[0];
internal string name;
public ConsoleBaseAttribute(string name)
{
this.name = name.ToLowerInvariant();
}
public ConsoleBaseAttribute(params string[] names)
{
name = names[0].ToLowerInvariant();
aliases = new List<string>(names).Skip(1).Select(x => x.ToLowerInvariant()).ToArray();
}
public ConsoleFlags flags { get; private set; }
this.name = name.ToLowerInvariant();
}
[AttributeUsage(AttributeTargets.All)]
public class ConsoleVariableAttribute : ConsoleBaseAttribute
public ConsoleBaseAttribute(params string[] names)
{
public ConsoleVariableAttribute(string name) : base(name)
{
}
name = names[0].ToLowerInvariant();
aliases = new List<string>(names).Skip(1).Select(x => x.ToLowerInvariant()).ToArray();
}
[AttributeUsage(AttributeTargets.All)]
public class ConsoleCommandAttribute : ConsoleBaseAttribute
public ConsoleFlags flags { get; private set; }
}
[AttributeUsage(AttributeTargets.All)]
public class ConsoleVariableAttribute : ConsoleBaseAttribute
{
public ConsoleVariableAttribute(string name) : base(name)
{
}
}
[AttributeUsage(AttributeTargets.All)]
public class ConsoleCommandAttribute : ConsoleBaseAttribute
{
/// <summary>
/// Registers a command to Console system.
/// </summary>
/// <param name="name">Name used for calling this command.</param>
public ConsoleCommandAttribute(string name) : base(name)
{
}
{
}
/// <summary>
/// Registers a command to Console system.
@@ -53,15 +53,14 @@ namespace Game
/// names are aliases.
/// </param>
public ConsoleCommandAttribute(params string[] names) : base(names)
{
}
}
/// <summary>
/// Constructor for the subsystem, must be called first before registering console commands.
/// </summary>
[AttributeUsage(AttributeTargets.All)]
public class ConsoleSubsystemInitializer : Attribute
{
}
}
/// <summary>
/// Constructor for the subsystem, must be called first before registering console commands.
/// </summary>
[AttributeUsage(AttributeTargets.All)]
public class ConsoleSubsystemInitializer : Attribute
{
}