Add warning when using the mapping command in debug mode (#3095)
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
// ReSharper disable once RedundantUsingDirective
|
||||||
|
// Used to warn the player in big red letters in debug mode
|
||||||
using System;
|
using System;
|
||||||
using Content.Client.GameObjects.Components;
|
using Content.Client.GameObjects.Components;
|
||||||
using Content.Client.GameObjects.EntitySystems;
|
using Content.Client.GameObjects.EntitySystems;
|
||||||
@@ -8,6 +10,7 @@ using Robust.Shared.Console;
|
|||||||
using Robust.Shared.GameObjects.Systems;
|
using Robust.Shared.GameObjects.Systems;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
|
|
||||||
namespace Content.Client.Commands
|
namespace Content.Client.Commands
|
||||||
{
|
{
|
||||||
@@ -93,6 +96,10 @@ namespace Content.Client.Commands
|
|||||||
return;
|
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["togglelight"].Execute(shell, string.Empty, Array.Empty<string>());
|
||||||
shell.ConsoleHost.RegisteredCommands["showsubfloorforever"].Execute(shell, string.Empty, Array.Empty<string>());
|
shell.ConsoleHost.RegisteredCommands["showsubfloorforever"].Execute(shell, string.Empty, Array.Empty<string>());
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// ReSharper disable once RedundantUsingDirective
|
||||||
|
// Used to warn the player in big red letters in debug mode
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Administration;
|
using Content.Server.Administration;
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
@@ -6,6 +8,7 @@ using Robust.Server.Interfaces.Timing;
|
|||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Robust.Shared.Interfaces.Map;
|
using Robust.Shared.Interfaces.Map;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Commands.GameTicking
|
namespace Content.Server.Commands.GameTicking
|
||||||
@@ -26,6 +29,10 @@ namespace Content.Server.Commands.GameTicking
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
shell.WriteLine("WARNING: The server is using a debug build. You are risking losing your changes.", Color.Red);
|
||||||
|
#endif
|
||||||
|
|
||||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||||
int mapId;
|
int mapId;
|
||||||
string mapName;
|
string mapName;
|
||||||
|
|||||||
Reference in New Issue
Block a user