Add warning when using the mapping command in debug mode (#3095)

This commit is contained in:
DrSmugleaf
2021-02-07 06:36:34 +01:00
committed by GitHub
parent 59e72697cb
commit f63a89f816
2 changed files with 14 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
// ReSharper disable once RedundantUsingDirective
// Used to warn the player in big red letters in debug mode
using System;
using Content.Client.GameObjects.Components;
using Content.Client.GameObjects.EntitySystems;
@@ -8,6 +10,7 @@ using Robust.Shared.Console;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
namespace Content.Client.Commands
{
@@ -93,6 +96,10 @@ namespace Content.Client.Commands
return;
}
#if DEBUG
shell.WriteLine("WARNING: The client is using a debug build. You are risking losing your changes.", Color.Red);
#endif
shell.ConsoleHost.RegisteredCommands["togglelight"].Execute(shell, string.Empty, Array.Empty<string>());
shell.ConsoleHost.RegisteredCommands["showsubfloorforever"].Execute(shell, string.Empty, Array.Empty<string>());