mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
// This file is for commands that do something to the console itself.
|
|
// Not some generic console command type.
|
|
// Couldn't think of a better name sorry.
|
|
|
|
using SS14.Client.Interfaces.Console;
|
|
using SS14.Client.Interfaces.UserInterface;
|
|
using SS14.Shared.IoC;
|
|
using System;
|
|
|
|
namespace SS14.Client.Console
|
|
{
|
|
[IoCTarget]
|
|
class ClearCommand : IConsoleCommand
|
|
{
|
|
public string Command => "cls";
|
|
public string Help => "Clears the debug console of all messages.";
|
|
public string Description => "Clears the console.";
|
|
|
|
public bool Execute(IDebugConsole console, params string[] args)
|
|
{
|
|
console.Clear();
|
|
return false;
|
|
}
|
|
}
|
|
|
|
[IoCTarget]
|
|
class FillCommand : IConsoleCommand
|
|
{
|
|
public string Command => "fill";
|
|
public string Help => "Fills the console with some nonsense for debugging.";
|
|
public string Description => "Fill up the console for debugging.";
|
|
|
|
public bool Execute(IDebugConsole console, params string[] args)
|
|
{
|
|
SFML.Graphics.Color[] colors = { SFML.Graphics.Color.Green, SFML.Graphics.Color.Blue, SFML.Graphics.Color.Red };
|
|
Random random = new Random();
|
|
for (int x = 0; x < 50; x++)
|
|
{
|
|
console.AddLine("filling...", colors[random.Next(0, colors.Length)]);
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|