mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 06:42:25 +02:00
Localize commands (#3374)
This commit is contained in:
@@ -165,3 +165,351 @@ cmd-hint-savebp-id = <Grid EntityID>
|
||||
cmd-flushcookies-desc = Flush CEF cookie storage to disk
|
||||
cmd-flushcookies-help = This ensure cookies are properly saved to disk in the event of unclean shutdowns.
|
||||
Note that the actual operation is asynchronous.
|
||||
|
||||
cmd-ldrsc-desc = Pre-caches a resource.
|
||||
cmd-ldrsc-help = Usage: ldrsc <path> <type>
|
||||
|
||||
cmd-rldrsc-desc = Reloads a resource.
|
||||
cmd-rldrsc-help = Usage: rldrsc <path> <type>
|
||||
|
||||
cmd-gridtc-desc = Gets the tile count of a grid.
|
||||
cmd-gridtc-help = Usage: gridtc <gridId>
|
||||
|
||||
|
||||
# Client-side commands
|
||||
cmd-guidump-desc = Dump GUI tree to /guidump.txt in user data.
|
||||
cmd-guidump-help = Usage: guidump
|
||||
|
||||
cmd-uitest-desc = Open a dummy UI testing window
|
||||
cmd-uitest-help = Usage: uitest
|
||||
|
||||
cmd-setclipboard-desc = Sets the system clipboard
|
||||
cmd-setclipboard-help = Usage: setclipboard <text>
|
||||
|
||||
cmd-getclipboard-desc = Gets the system clipboard
|
||||
cmd-getclipboard-help = Usage: Getclipboard
|
||||
|
||||
cmd-togglelight-desc = Toggles light rendering.
|
||||
cmd-togglelight-help = Usage: togglelight
|
||||
|
||||
cmd-togglefov-desc = Toggles fov for client.
|
||||
cmd-togglefov-help = Usage: togglefov
|
||||
|
||||
cmd-togglehardfov-desc = Toggles hard fov for client. (for debugging space-station-14#2353)
|
||||
cmd-togglehardfov-help = Usage: togglehardfov
|
||||
|
||||
cmd-toggleshadows-desc = Toggles shadow rendering.
|
||||
cmd-toggleshadows-help = Usage: toggleshadows
|
||||
|
||||
cmd-togglelightbuf-desc = Toggles lighting rendering. This includes shadows but not FOV.
|
||||
cmd-togglelightbuf-help = Usage: togglelightbuf
|
||||
|
||||
cmd-chunkinfo-desc = Gets info about a chunk under your mouse cursor.
|
||||
cmd-chunkinfo-help = Usage: chunkinfo
|
||||
|
||||
cmd-rldshader-desc = Reloads all shaders.
|
||||
cmd-rldshader-help = Usage: rldshader
|
||||
|
||||
cmd-cldbglyr-desc = Toggle fov and light debug layers.
|
||||
cmd-cldbglyr-help= Usage: cldbglyr <layer>: Toggle <layer>
|
||||
cldbglyr: Turn all Layers off
|
||||
|
||||
cmd-key-info-desc = Keys key info for a key.
|
||||
cmd-key-info-help = Usage: keyinfo <Key>
|
||||
|
||||
cmd-bind-desc = Binds an input key to an input command.
|
||||
cmd-bind-help = bind <KeyName> <BindMode> <InputCommand>
|
||||
|
||||
cmd-net-draw-interp-desc = Toggles the debug drawing of the network interpolation.
|
||||
cmd-net-draw-interp-help = Usage: net_draw_interp
|
||||
|
||||
cmd-net-draw-interp-desc = Toggles the debug drawing of the network interpolation.
|
||||
cmd-net-draw-interp-help = Usage: net_draw_interp
|
||||
|
||||
cmd-net-watch-ent-desc = Dumps all network updates for an EntityId to the console.
|
||||
cmd-net-watch-ent-help = Usage: net_watchent <0|EntityUid>
|
||||
|
||||
cmd-net-refresh-desc = Requests a full server state.
|
||||
cmd-net-refresh-help = Usage: net_refresh
|
||||
|
||||
cmd-net-entity-report-desc = Toggles the net entity report panel.
|
||||
cmd-net-entity-report-help = Usage: net_entityreport
|
||||
|
||||
cmd-fill-desc = Fill up the console for debugging.
|
||||
cmd-fill-help = Fills the console with some nonsense for debugging.
|
||||
|
||||
cmd-cls-desc = Clears the console.
|
||||
cmd-cls-help = Clears the debug console of all messages.
|
||||
|
||||
cmd-sendgarbage-desc = Sends garbage to the server.
|
||||
cmd-sendgarbage-help = The server will reply with 'no u'
|
||||
|
||||
cmd-loadgrid-desc = Loads a grid from a file into an existing map.
|
||||
cmd-loadgrid-help = loadgrid <MapID> <Path> [x y] [rotation] [storeUids]
|
||||
|
||||
cmd-loc-desc = Prints the absolute location of the player's entity to console.
|
||||
cmd-loc-help = loc
|
||||
|
||||
cmd-tpgrid-desc = Teleports a grid to a new location.
|
||||
cmd-tpgrid-help = tpgrid <gridId> <X> <Y> [<MapId>]
|
||||
|
||||
cmd-rmgrid-desc = Removes a grid from a map. You cannot remove the default grid.
|
||||
cmd-rmgrid-help = rmgrid <gridId>
|
||||
|
||||
cmd-mapinit-desc = Runs map init on a map.
|
||||
cmd-mapinit-help = mapinit <mapID>
|
||||
|
||||
cmd-lsmap-desc = Lists maps.
|
||||
cmd-lsmap-help = lsmap
|
||||
|
||||
cmd-lsgrid-desc = Lists grids.
|
||||
cmd-lsgrid-help = lsgrid
|
||||
|
||||
cmd-addmap-desc = Adds a new empty map to the round. If the mapID already exists, this command does nothing.
|
||||
cmd-addmap-help = addmap <mapID> [initialize]
|
||||
|
||||
cmd-rmmap-desc = Removes a map from the world. You cannot remove nullspace.
|
||||
cmd-rmmap-help = rmmap <mapId>
|
||||
|
||||
cmd-savegrid-desc = Serializes a grid to disk.
|
||||
cmd-savegrid-help = savegrid <gridID> <Path>
|
||||
|
||||
cmd-testbed-desc = Loads a physics testbed on the specified map.
|
||||
cmd-testbed-help = testbed <mapid> <test>
|
||||
|
||||
cmd-saveconfig-desc = Saves the client configuration to the config file.
|
||||
cmd-saveconfig-help = saveconfig
|
||||
|
||||
## 'flushcookies' command
|
||||
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
|
||||
|
||||
cmd-flushcookies-desc = Flush CEF cookie storage to disk
|
||||
cmd-flushcookies-help = This ensure cookies are properly saved to disk in the event of unclean shutdowns.
|
||||
Note that the actual operation is asynchronous.
|
||||
|
||||
## 'addcomp' command
|
||||
cmd-addcomp-desc = Adds a component to an entity.
|
||||
cmd-addcomp-help = addcomp <uid> <componentName>
|
||||
cmd-addcompc-desc = Adds a component to an entity on the client.
|
||||
cmd-addcompc-help = addcompc <uid> <componentName>
|
||||
|
||||
## 'rmcomp' command
|
||||
cmd-rmcomp-desc = Removes a component from an entity.
|
||||
cmd-rmcomp-help = rmcomp <uid> <componentName>
|
||||
cmd-rmcompc-desc = Removes a component from an entity on the client.
|
||||
cmd-rmcompc-help = rmcomp <uid> <componentName>
|
||||
|
||||
## 'addview' command
|
||||
cmd-addview-desc = Allows you to subscribe to an entity's view for debugging purposes.
|
||||
cmd-addview-help = addview <entityUid>
|
||||
cmd-addviewc-desc = Allows you to subscribe to an entity's view for debugging purposes.
|
||||
cmd-addviewc-help = addview <entityUid>
|
||||
|
||||
## 'removeview' command
|
||||
cmd-removeview-desc = Allows you to unsubscribe to an entity's view for debugging purposes.
|
||||
cmd-removeview-help = removeview <entityUid>
|
||||
|
||||
## 'loglevel' command
|
||||
cmd-loglevel-desc = Changes the log level for a provided sawmill.
|
||||
cmd-loglevel-help = Usage: loglevel <sawmill> <level>
|
||||
sawmill: A label prefixing log messages. This is the one you're setting the level for.
|
||||
level: The log level. Must match one of the values of the LogLevel enum.
|
||||
|
||||
cmd-testlog-desc = Writes a test log to a sawmill.
|
||||
cmd-testlog-help = Usage: testlog <sawmill> <level> <message>
|
||||
sawmill: A label prefixing the logged message.
|
||||
level: The log level. Must match one of the values of the LogLevel enum.
|
||||
message: The message to be logged. Wrap this in double quotes if you want to use spaces.
|
||||
|
||||
## 'vv' command
|
||||
cmd-vv-desc = Opens View Variables.
|
||||
cmd-vv-help = Usage: vv <entity ID|IoC interface name|SIoC interface name>
|
||||
|
||||
## 'showvelocities' command
|
||||
cmd-showvelocities-desc = Displays your angular and linear velocities.
|
||||
cmd-showvelocities-help = Usage: showvelocities
|
||||
|
||||
## 'setinputcontext' command
|
||||
cmd-setinputcontext-desc = Sets the active input context.
|
||||
cmd-setinputcontext-help = Usage: setinputcontext <context>
|
||||
|
||||
## 'forall' command
|
||||
cmd-forall-desc = Runs a command over all entities with a given component.
|
||||
cmd-forall-help = Usage: forall <bql query> do <command...>
|
||||
|
||||
## 'delete' command
|
||||
cmd-delete-desc = Deletes the entity with the specified ID.
|
||||
cmd-delete-help = delete <entity UID>
|
||||
|
||||
# System commands
|
||||
cmd-showtime-desc = Shows the server time.
|
||||
cmd-showtime-help = showtime
|
||||
|
||||
cmd-restart-desc = Gracefully restarts the server (not just the round).
|
||||
cmd-restart-help = restart
|
||||
|
||||
cmd-shutdown-desc = Gracefully shuts down the server.
|
||||
cmd-shutdown-help = shutdown
|
||||
|
||||
cmd-saveconfig-desc = Saves the server configuration to the config file.
|
||||
cmd-saveconfig-help = saveconfig
|
||||
|
||||
cmd-netaudit-desc = Prints into about NetMsg security.
|
||||
cmd-netaudit-help = netaudit
|
||||
|
||||
# Player commands
|
||||
cmd-tp-desc = Teleports a player to any location in the round.
|
||||
cmd-tp-help = tp <x> <y> [<mapID>]
|
||||
|
||||
cmd-tpto-desc = Teleports the current player or the specified players/entities to the location of last player/entity specified.d.
|
||||
cmd-tpto-help = tpto <username|uid> [username|uid]...
|
||||
|
||||
cmd-listplayers-desc = Lists all players currently connected.
|
||||
cmd-listplayers-help = listplayers
|
||||
|
||||
cmd-kick-desc = Kicks a connected player out of the server, disconnecting them.
|
||||
cmd-kick-help = kick <PlayerIndex> [<Reason>]
|
||||
|
||||
# Spin command
|
||||
cmd-spin-desc = Causes an entity to spin. Default entity is the attached player's parent.
|
||||
cmd-spin-help = spin velocity [drag] [entityUid]
|
||||
|
||||
# Localization command
|
||||
cmd-rldloc-desc = Reloads localization (client & server).
|
||||
cmd-rldloc-help = Usage: rldloc
|
||||
|
||||
# Debug entity controls
|
||||
cmd-spawn-desc = Spawns an entity with specific type.
|
||||
cmd-spawn-help = spawn <prototype> OR spawn <prototype> <relative entity ID> OR spawn <prototype> <x> <y>
|
||||
cmd-cspawn-desc = Spawns a client-side entity with specific type at your feet.
|
||||
cmd-cspawn-help = cspawn <entity type>
|
||||
|
||||
cmd-scale-desc = Increases or decreases an entity's size naively.
|
||||
cmd-scale-help = scale <entityUid> <float>
|
||||
|
||||
cmd-dumpentities-desc = Dump entity list.
|
||||
cmd-dumpentities-help = Dumps entity list of UIDs and prototype.
|
||||
|
||||
cmd-getcomponentregistration-desc = Gets component registration information.
|
||||
cmd-getcomponentregistration-help = Usage: getcomponentregistration <componentName>
|
||||
|
||||
cmd-showrays-desc = Toggles debug drawing of physics rays. An integer for <raylifetime> must be provided.
|
||||
cmd-showrays-help = Usage: showrays <raylifetime>
|
||||
|
||||
cmd-disconnect-desc = Immediately disconnect from the server and go back to the main menu.
|
||||
cmd-disconnect-help = Usage: disconnect
|
||||
|
||||
cmd-entfo-desc = Displays verbose diagnostics for an entity.
|
||||
cmd-entfo-help = Usage: entfo <entityuid>
|
||||
The entity UID can be prefixed with 'c' to convert it to a client entity UID.
|
||||
|
||||
cmd-fuck-desc = Throws an exception
|
||||
cmd-fuck-help = Throws an exception
|
||||
|
||||
cmd-showpos-desc = Enables debug drawing over all entity positions in the game.
|
||||
cmd-showpos-help = Usage: showpos
|
||||
|
||||
cmd-sggcell-desc = Lists entities on a snap grid cell.
|
||||
cmd-sggcell-help = Usage: sggcell <gridID> <vector2i>\nThat vector2i param is in the form x<int>,y<int>.
|
||||
|
||||
cmd-overrideplayername-desc = Changes the name used when attempting to connect to the server.
|
||||
cmd-overrideplayername-help = Usage: overrideplayername <name>
|
||||
|
||||
cmd-showanchored-desc = Shows anchored entities on a particular tile
|
||||
cmd-showanchored-help = Usage: showanchored
|
||||
|
||||
cmd-dmetamem-desc = Dumps a type's members in a format suitable for the sandbox configuration file.
|
||||
cmd-dmetamem-help = Usage: dmetamem <type>
|
||||
|
||||
cmd-dmetamem-desc = Displays chunk bounds for the purposes of rendering.
|
||||
cmd-dmetamem-help = Usage: showchunkbb <type>
|
||||
|
||||
cmd-launchauth-desc = Load authentication tokens from launcher data to aid in testing of live servers.
|
||||
cmd-launchauth-help = Usage: launchauth <account name>
|
||||
|
||||
cmd-lightbb-desc = Toggles whether to show light bounding boxes.
|
||||
cmd-lightbb-help = Usage: lightbb
|
||||
|
||||
cmd-monitorinfo-desc = Monitors info
|
||||
cmd-monitorinfo-help = Usage: monitorinfo <id>
|
||||
|
||||
cmd-setmonitor-desc = Set monitor
|
||||
cmd-setmonitor-help = Usage: setmonitor <id>
|
||||
|
||||
cmd-physics-desc = Shows a debug physics overlay. The arg supplied specifies the overlay.
|
||||
cmd-physics-help = Usage: physics <aabbs / com / contactnormals / contactpoints / distance / joints / shapeinfo / shapes>
|
||||
|
||||
cmd-hardquit-desc = Kills the game client instantly.
|
||||
cmd-hardquit-help = Kills the game client instantly, leaving no traces. No telling the server goodbye.
|
||||
|
||||
cmd-quit-desc = Shuts down the game client gracefully.
|
||||
cmd-quit-help = Properly shuts down the game client, notifying the connected server and such.
|
||||
|
||||
cmd-csi-desc = Opens a C# interactive console.
|
||||
cmd-csi-help = Usage: csi
|
||||
|
||||
cmd-scsi-desc = Opens a C# interactive console on the server.
|
||||
cmd-scsi-help = Usage: scsi
|
||||
|
||||
cmd-watch-desc = Opens a variable watch window.
|
||||
cmd-watch-help = Usage: watch
|
||||
|
||||
cmd-showspritebb-desc = Toggle whether sprite bounds are shown
|
||||
cmd-showspritebb-help = Usage: showspritebb
|
||||
|
||||
cmd-togglelookup-desc = Shows / hides entitylookup bounds via an overlay.
|
||||
cmd-togglelookup-help = Usage: togglelookup
|
||||
|
||||
cmd-net_entityreport-desc = Toggles the net entity report panel.
|
||||
cmd-net_entityreport-help = Usage: net_entityreport
|
||||
|
||||
cmd-net_refresh-desc = Requests a full server state.
|
||||
cmd-net_refresh-help = Usage: net_refresh
|
||||
|
||||
cmd-net_graph-desc = Toggles the net statistics pannel.
|
||||
cmd-net_graph-help = Usage: net_graph
|
||||
|
||||
cmd-net_watchent-desc = Dumps all network updates for an EntityId to the console.
|
||||
cmd-net_watchent-help = Usage: net_watchent <0|EntityUid>
|
||||
|
||||
cmd-net_draw_interp-desc = Toggles the debug drawing of the network interpolation.
|
||||
cmd-net_draw_interp-help = Usage: net_draw_interp <0|EntityUid>
|
||||
|
||||
cmd-vram-desc = Displays video memory usage statics by the game.
|
||||
cmd-vram-help = Usage: vram
|
||||
|
||||
cmd-showislands-desc = Shows the current physics bodies involved in each physics island.
|
||||
cmd-showislands-help = Usage: showislands
|
||||
|
||||
cmd-showgridnodes-desc = Shows the nodes for grid split purposes.
|
||||
cmd-showgridnodes-help = Usage: showgridnodes
|
||||
|
||||
cmd-profsnap-desc = Make a profiling snapshot.
|
||||
cmd-profsnap-help = Usage: profsnap
|
||||
|
||||
cmd-devwindow-desc = Dev Window
|
||||
cmd-devwindow-help = Usage: devwindow
|
||||
|
||||
cmd-devwindow-desc = Open file
|
||||
cmd-devwindow-help = Usage: testopenfile
|
||||
|
||||
cmd-scene-desc = Immediately changes the UI scene/state.
|
||||
cmd-scene-help = Usage: scene <className>
|
||||
|
||||
cmd-szr_stats-desc = Report serializer statistics.
|
||||
cmd-szr_stats-help = Usage: szr_stats
|
||||
|
||||
cmd-hwid-desc = Returns the current HWID (HardWare ID).
|
||||
cmd-hwid-help = Usage: hwid
|
||||
|
||||
cmd-vvread-desc = Retrieve a path's value using VV (View Variables).
|
||||
cmd-vvread-desc = Usage: vvread <path>
|
||||
|
||||
cmd-vvwrite-desc = Modify a path's value using VV (View Variables).
|
||||
cmd-vvwrite-desc = Usage: vvwrite <path>
|
||||
|
||||
cmd-vv-desc = Opens View Variables (VV).
|
||||
cmd-vv-desc = Usage: vv <path|entity ID|guihover>
|
||||
|
||||
cmd-vvinvoke-desc = Invoke/Call a path with arguments using VV.
|
||||
cmd-vvinvoke-desc = Usage: vvinvoke <path> [arguments...]
|
||||
|
||||
@@ -1 +1 @@
|
||||
midi-panic-command-description = Turns off every note for every active MIDI renderer.
|
||||
cmd-midipanic-desc = Turns off every note for every active MIDI renderer.
|
||||
|
||||
@@ -1 +1 @@
|
||||
midi-panic-command-description = Desliga cada nota para cada renderizador MIDI ativo.
|
||||
cmd-midipanic-desc = Desliga cada nota para cada renderizador MIDI ativo.
|
||||
|
||||
@@ -4,15 +4,13 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Client.Audio.Midi.Commands;
|
||||
|
||||
public sealed class MidiPanicCommand : IConsoleCommand
|
||||
public sealed class MidiPanicCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IMidiManager _midiManager = default!;
|
||||
|
||||
public string Command => "midipanic";
|
||||
public string Description => Loc.GetString("midi-panic-command-description");
|
||||
public string Help => $"{Command}";
|
||||
public override string Command => "midipanic";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
foreach (var renderer in _midiManager.Renderers)
|
||||
{
|
||||
|
||||
@@ -266,18 +266,18 @@ namespace Robust.Client.Console
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class RemoteExecCommand : IConsoleCommand
|
||||
private sealed class RemoteExecCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => ">";
|
||||
public string Description => Loc.GetString("cmd-remoteexec-desc");
|
||||
public string Help => Loc.GetString("cmd-remoteexec-help");
|
||||
public override string Command => ">";
|
||||
public override string Description => LocalizationManager.GetString("cmd-remoteexec-desc");
|
||||
public override string Help => LocalizationManager.GetString("cmd-remoteexec-help");
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
shell.RemoteExecuteCommand(argStr["> ".Length..]);
|
||||
}
|
||||
|
||||
public async ValueTask<CompletionResult> GetCompletionAsync(
|
||||
public override async ValueTask<CompletionResult> GetCompletionAsync(
|
||||
IConsoleShell shell,
|
||||
string[] args,
|
||||
CancellationToken cancel)
|
||||
|
||||
@@ -6,13 +6,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class AddCompCommand : IConsoleCommand
|
||||
internal sealed class AddCompCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "addcompc";
|
||||
public string Description => "Adds a component to an entity on the client";
|
||||
public string Help => "addcompc <uid> <componentName>";
|
||||
public override string Command => "addcompc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
|
||||
if (args.Length != 2)
|
||||
@@ -36,13 +34,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class RemoveCompCommand : IConsoleCommand
|
||||
internal sealed class RemoveCompCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "rmcompc";
|
||||
public string Description => "Removes a component from an entity.";
|
||||
public string Help => "rmcompc <uid> <componentName>";
|
||||
public override string Command => "rmcompc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
|
||||
@@ -7,13 +7,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class ClientSpawnCommand : IConsoleCommand
|
||||
internal sealed class ClientSpawnCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "cspawn";
|
||||
public string Description => "Spawns a client-side entity with specific type at your feet.";
|
||||
public string Help => "cspawn <entity type>";
|
||||
public override string Command => "cspawn";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var controlled = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity ?? EntityUid.Invalid;
|
||||
if (controlled == EntityUid.Invalid)
|
||||
|
||||
@@ -6,13 +6,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class SaveConfig : IConsoleCommand
|
||||
public sealed class SaveConfig : LocalizedCommands
|
||||
{
|
||||
public string Command => "saveconfig";
|
||||
public string Description => "Saves the client configuration to the config file";
|
||||
public string Help => "saveconfig";
|
||||
public override string Command => "saveconfig";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IConfigurationManager>().SaveToFile();
|
||||
}
|
||||
|
||||
@@ -6,25 +6,21 @@ using Robust.Shared.Console;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
sealed class ClearCommand : IConsoleCommand
|
||||
sealed class ClearCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "cls";
|
||||
public string Help => "Clears the debug console of all messages.";
|
||||
public string Description => "Clears the console.";
|
||||
public override string Command => "cls";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
shell.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
sealed class FillCommand : IConsoleCommand
|
||||
sealed class FillCommand : LocalizedCommands
|
||||
{
|
||||
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 override string Command => "fill";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
for (int x = 0; x < 50; x++)
|
||||
{
|
||||
|
||||
@@ -31,30 +31,28 @@ using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class DumpEntitiesCommand : IConsoleCommand
|
||||
internal sealed class DumpEntitiesCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "dumpentities";
|
||||
public string Help => "Dump entity list";
|
||||
public string Description => "Dumps entity list of UIDs and prototype.";
|
||||
public override string Command => "dumpentities";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
foreach (var e in entityManager.GetEntities().OrderBy(e => e))
|
||||
{
|
||||
shell.WriteLine($"entity {e}, {entityManager.GetComponent<MetaDataComponent>(e).EntityPrototype?.ID}, {entityManager.GetComponent<TransformComponent>(e).Coordinates}.");
|
||||
shell.WriteLine(
|
||||
$"entity {e}, {entityManager.GetComponent<MetaDataComponent>(e).EntityPrototype?.ID}, {entityManager.GetComponent<TransformComponent>(e).Coordinates}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GetComponentRegistrationCommand : IConsoleCommand
|
||||
internal sealed class GetComponentRegistrationCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "getcomponentregistration";
|
||||
public string Help => "Usage: getcomponentregistration <componentName>";
|
||||
public string Description => "Gets component registration information";
|
||||
public override string Command => "getcomponentregistration";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
{
|
||||
@@ -94,13 +92,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleMonitorCommand : IConsoleCommand
|
||||
internal sealed class ToggleMonitorCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "monitor";
|
||||
public override string Command => "monitor";
|
||||
|
||||
public string Description => Loc.GetString("cmd-monitor-desc");
|
||||
|
||||
public string Help
|
||||
public override string Help
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -109,7 +105,7 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var monitors = IoCManager.Resolve<IUserInterfaceManager>().DebugMonitors;
|
||||
|
||||
@@ -149,7 +145,7 @@ namespace Robust.Client.Console.Commands
|
||||
monitors.ToggleMonitor(parsedMonitor);
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
{
|
||||
@@ -167,38 +163,32 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ExceptionCommand : IConsoleCommand
|
||||
internal sealed class ExceptionCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "fuck";
|
||||
public string Help => "Throws an exception";
|
||||
public string Description => "Throws an exception";
|
||||
public override string Command => "fuck";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
throw new InvalidOperationException("Fuck");
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowPositionsCommand : IConsoleCommand
|
||||
internal sealed class ShowPositionsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showpos";
|
||||
public string Help => "";
|
||||
public string Description => "Enables debug drawing over all entity positions in the game.";
|
||||
public override string Command => "showpos";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<DebugDrawingSystem>();
|
||||
mgr.DebugPositions = !mgr.DebugPositions;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowRayCommand : IConsoleCommand
|
||||
internal sealed class ShowRayCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showrays";
|
||||
public string Help => "Usage: showrays <raylifetime>";
|
||||
public string Description => "Toggles debug drawing of physics rays. An integer for <raylifetime> must be provided";
|
||||
public override string Command => "showrays";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -219,28 +209,21 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class DisconnectCommand : IConsoleCommand
|
||||
internal sealed class DisconnectCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "disconnect";
|
||||
public string Help => "";
|
||||
public string Description => "Immediately disconnect from the server and go back to the main menu.";
|
||||
public override string Command => "disconnect";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IClientNetManager>().ClientDisconnect("Disconnect command used.");
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class EntityInfoCommand : IConsoleCommand
|
||||
internal sealed class EntityInfoCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "entfo";
|
||||
public override string Command => "entfo";
|
||||
|
||||
public string Help =>
|
||||
"entfo <entityuid>\nThe entity UID can be prefixed with 'c' to convert it to a client entity UID.";
|
||||
|
||||
public string Description => "Displays verbose diagnostics for an entity.";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -261,9 +244,11 @@ namespace Robust.Client.Console.Commands
|
||||
shell.WriteError("That entity does not exist. Sorry lad.");
|
||||
return;
|
||||
}
|
||||
|
||||
var meta = entmgr.GetComponent<MetaDataComponent>(uid);
|
||||
shell.WriteLine($"{uid}: {meta.EntityPrototype?.ID}/{meta.EntityName}");
|
||||
shell.WriteLine($"init/del/lmt: {meta.EntityInitialized}/{meta.EntityDeleted}/{meta.EntityLastModifiedTick}");
|
||||
shell.WriteLine(
|
||||
$"init/del/lmt: {meta.EntityInitialized}/{meta.EntityDeleted}/{meta.EntityLastModifiedTick}");
|
||||
foreach (var component in entmgr.GetComponents(uid))
|
||||
{
|
||||
shell.WriteLine(component.ToString() ?? "");
|
||||
@@ -283,13 +268,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SnapGridGetCell : IConsoleCommand
|
||||
internal sealed class SnapGridGetCell : LocalizedCommands
|
||||
{
|
||||
public string Command => "sggcell";
|
||||
public string Help => "sggcell <gridID> <vector2i>\nThat vector2i param is in the form x<int>,y<int>.";
|
||||
public string Description => "Lists entities on a snap grid cell.";
|
||||
public override string Command => "sggcell";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
@@ -315,8 +298,8 @@ namespace Robust.Client.Console.Commands
|
||||
if (mapMan.TryGetGrid(gridUid, out var grid))
|
||||
{
|
||||
foreach (var entity in grid.GetAnchoredEntities(new Vector2i(
|
||||
int.Parse(indices.Split(',')[0], CultureInfo.InvariantCulture),
|
||||
int.Parse(indices.Split(',')[1], CultureInfo.InvariantCulture))))
|
||||
int.Parse(indices.Split(',')[0], CultureInfo.InvariantCulture),
|
||||
int.Parse(indices.Split(',')[1], CultureInfo.InvariantCulture))))
|
||||
{
|
||||
shell.WriteLine(entity.ToString());
|
||||
}
|
||||
@@ -328,19 +311,18 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SetPlayerName : IConsoleCommand
|
||||
internal sealed class SetPlayerName : LocalizedCommands
|
||||
{
|
||||
public string Command => "overrideplayername";
|
||||
public string Description => "Changes the name used when attempting to connect to the server.";
|
||||
public string Help => Command + " <name>";
|
||||
public override string Command => "overrideplayername";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
{
|
||||
shell.WriteLine(Help);
|
||||
return;
|
||||
}
|
||||
|
||||
var client = IoCManager.Resolve<IBaseClient>();
|
||||
client.PlayerNameOverride = args[0];
|
||||
|
||||
@@ -348,19 +330,18 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class LoadResource : IConsoleCommand
|
||||
internal sealed class LoadResource : LocalizedCommands
|
||||
{
|
||||
public string Command => "ldrsc";
|
||||
public string Description => "Pre-caches a resource.";
|
||||
public string Help => "ldrsc <path> <type>";
|
||||
public override string Command => "ldrsc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2)
|
||||
{
|
||||
shell.WriteLine(Help);
|
||||
return;
|
||||
}
|
||||
|
||||
var resourceCache = IoCManager.Resolve<IResourceCache>();
|
||||
var reflection = IoCManager.Resolve<IReflectionManager>();
|
||||
Type type;
|
||||
@@ -369,7 +350,7 @@ namespace Robust.Client.Console.Commands
|
||||
{
|
||||
type = reflection.LooseGetType(args[1]);
|
||||
}
|
||||
catch(ArgumentException)
|
||||
catch (ArgumentException)
|
||||
{
|
||||
shell.WriteError("Unable to find type");
|
||||
return;
|
||||
@@ -385,19 +366,18 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ReloadResource : IConsoleCommand
|
||||
internal sealed class ReloadResource : LocalizedCommands
|
||||
{
|
||||
public string Command => "rldrsc";
|
||||
public string Description => "Reloads a resource.";
|
||||
public string Help => "rldrsc <path> <type>";
|
||||
public override string Command => "rldrsc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2)
|
||||
{
|
||||
shell.WriteLine(Help);
|
||||
return;
|
||||
}
|
||||
|
||||
var resourceCache = IoCManager.Resolve<IResourceCache>();
|
||||
var reflection = IoCManager.Resolve<IReflectionManager>();
|
||||
|
||||
@@ -406,7 +386,7 @@ namespace Robust.Client.Console.Commands
|
||||
{
|
||||
type = reflection.LooseGetType(args[1]);
|
||||
}
|
||||
catch(ArgumentException)
|
||||
catch (ArgumentException)
|
||||
{
|
||||
shell.WriteError("Unable to find type");
|
||||
return;
|
||||
@@ -419,13 +399,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GridTileCount : IConsoleCommand
|
||||
internal sealed class GridTileCount : LocalizedCommands
|
||||
{
|
||||
public string Command => "gridtc";
|
||||
public string Description => "Gets the tile count of a grid";
|
||||
public string Help => "Usage: gridtc <gridId>";
|
||||
public override string Command => "gridtc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -451,13 +429,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GuiDumpCommand : IConsoleCommand
|
||||
internal sealed class GuiDumpCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "guidump";
|
||||
public string Description => "Dump GUI tree to /guidump.txt in user data.";
|
||||
public string Help => "guidump";
|
||||
public override string Command => "guidump";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var uiMgr = IoCManager.Resolve<IUserInterfaceManager>();
|
||||
var res = IoCManager.Resolve<IResourceManager>();
|
||||
@@ -525,15 +501,13 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class UITestCommand : IConsoleCommand
|
||||
internal sealed class UITestCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "uitest";
|
||||
public string Description => "Open a dummy UI testing window";
|
||||
public string Help => "uitest";
|
||||
public override string Command => "uitest";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var window = new DefaultWindow { MinSize = (500, 400)};
|
||||
var window = new DefaultWindow { MinSize = (500, 400) };
|
||||
var tabContainer = new TabContainer();
|
||||
window.Contents.AddChild(tabContainer);
|
||||
var scroll = new ScrollContainer();
|
||||
@@ -636,18 +610,18 @@ namespace Robust.Client.Console.Commands
|
||||
{
|
||||
new PanelContainer
|
||||
{
|
||||
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Red},
|
||||
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Red },
|
||||
Children =
|
||||
{
|
||||
new Label{ Text = "FOOBARBAZ"},
|
||||
new Label { Text = "FOOBARBAZ" },
|
||||
}
|
||||
},
|
||||
new PanelContainer
|
||||
{
|
||||
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Blue},
|
||||
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Blue },
|
||||
Children =
|
||||
{
|
||||
new Label{ Text = "FOOBARBAZ"},
|
||||
new Label { Text = "FOOBARBAZ" },
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -657,39 +631,33 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SetClipboardCommand : IConsoleCommand
|
||||
internal sealed class SetClipboardCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "setclipboard";
|
||||
public string Description => "Sets the system clipboard";
|
||||
public string Help => "setclipboard <text>";
|
||||
public override string Command => "setclipboard";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<IClipboardManager>();
|
||||
mgr.SetText(args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GetClipboardCommand : IConsoleCommand
|
||||
internal sealed class GetClipboardCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "getclipboard";
|
||||
public string Description => "Gets the system clipboard";
|
||||
public string Help => "getclipboard";
|
||||
public override string Command => "getclipboard";
|
||||
|
||||
public async void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override async void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<IClipboardManager>();
|
||||
shell.WriteLine(await mgr.GetText());
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleLight : IConsoleCommand
|
||||
internal sealed class ToggleLight : LocalizedCommands
|
||||
{
|
||||
public string Command => "togglelight";
|
||||
public string Description => "Toggles light rendering.";
|
||||
public string Help => "togglelight";
|
||||
public override string Command => "togglelight";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<ILightManager>();
|
||||
if (!mgr.LockConsoleAccess)
|
||||
@@ -697,27 +665,23 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleFOV : IConsoleCommand
|
||||
internal sealed class ToggleFOV : LocalizedCommands
|
||||
{
|
||||
public string Command => "togglefov";
|
||||
public string Description => "Toggles fov for client.";
|
||||
public string Help => "togglefov";
|
||||
public override string Command => "togglefov";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<IEyeManager>();
|
||||
if (mgr.CurrentEye != null)
|
||||
mgr.CurrentEye.DrawFov = !mgr.CurrentEye.DrawFov;
|
||||
var mgr = IoCManager.Resolve<IEyeManager>();
|
||||
if (mgr.CurrentEye != null)
|
||||
mgr.CurrentEye.DrawFov = !mgr.CurrentEye.DrawFov;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleHardFOV : IConsoleCommand
|
||||
internal sealed class ToggleHardFOV : LocalizedCommands
|
||||
{
|
||||
public string Command => "togglehardfov";
|
||||
public string Description => "Toggles hard fov for client (for debugging space-station-14#2353).";
|
||||
public string Help => "togglehardfov";
|
||||
public override string Command => "togglehardfov";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<ILightManager>();
|
||||
if (!mgr.LockConsoleAccess)
|
||||
@@ -725,26 +689,23 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleShadows : IConsoleCommand
|
||||
internal sealed class ToggleShadows : LocalizedCommands
|
||||
{
|
||||
public string Command => "toggleshadows";
|
||||
public string Description => "Toggles shadow rendering.";
|
||||
public string Help => "toggleshadows";
|
||||
public override string Command => "toggleshadows";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<ILightManager>();
|
||||
if (!mgr.LockConsoleAccess)
|
||||
mgr.DrawShadows = !mgr.DrawShadows;
|
||||
}
|
||||
}
|
||||
internal sealed class ToggleLightBuf : IConsoleCommand
|
||||
{
|
||||
public string Command => "togglelightbuf";
|
||||
public string Description => "Toggles lighting rendering. This includes shadows but not FOV.";
|
||||
public string Help => "togglelightbuf";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
internal sealed class ToggleLightBuf : LocalizedCommands
|
||||
{
|
||||
public override string Command => "togglelightbuf";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<ILightManager>();
|
||||
if (!mgr.LockConsoleAccess)
|
||||
@@ -752,13 +713,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ChunkInfoCommand : IConsoleCommand
|
||||
internal sealed class ChunkInfoCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "chunkinfo";
|
||||
public string Description => "Gets info about a chunk under your mouse cursor.";
|
||||
public string Help => Command;
|
||||
public override string Command => "chunkinfo";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mapMan = IoCManager.Resolve<IMapManager>();
|
||||
var inputMan = IoCManager.Resolve<IInputManager>();
|
||||
@@ -781,20 +740,15 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ReloadShadersCommand : IConsoleCommand
|
||||
internal sealed class ReloadShadersCommand : LocalizedCommands
|
||||
{
|
||||
|
||||
public string Command => "rldshader";
|
||||
|
||||
public string Description => "Reloads all shaders";
|
||||
|
||||
public string Help => "rldshader";
|
||||
public override string Command => "rldshader";
|
||||
|
||||
public static Dictionary<string, FileSystemWatcher>? _watchers;
|
||||
|
||||
public static ConcurrentDictionary<string, bool>? _reloadShadersQueued = new();
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IResourceCacheInternal resC;
|
||||
if (args.Length == 1)
|
||||
@@ -806,12 +760,14 @@ namespace Robust.Client.Console.Commands
|
||||
shell.WriteLine("Already watching.");
|
||||
return;
|
||||
}
|
||||
|
||||
resC = IoCManager.Resolve<IResourceCacheInternal>();
|
||||
|
||||
_watchers = new Dictionary<string, FileSystemWatcher>();
|
||||
|
||||
var stringComparer = PathHelpers.IsFileSystemCaseSensitive()
|
||||
? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase;
|
||||
? StringComparer.Ordinal
|
||||
: StringComparer.OrdinalIgnoreCase;
|
||||
|
||||
var reversePathResolution = new ConcurrentDictionary<string, HashSet<ResourcePath>>(stringComparer);
|
||||
|
||||
@@ -949,16 +905,13 @@ namespace Robust.Client.Console.Commands
|
||||
|
||||
shell.WriteLine("Done.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal sealed class ClydeDebugLayerCommand : IConsoleCommand
|
||||
internal sealed class ClydeDebugLayerCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "cldbglyr";
|
||||
public string Description => "Toggle fov and light debug layers";
|
||||
public string Help => "cldbglyr <layer>: Toggle <layer>\ncldbglyr: Turn all Layers off";
|
||||
public override string Command => "cldbglyr";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var clyde = IoCManager.Resolve<IClydeInternal>();
|
||||
|
||||
@@ -977,13 +930,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GetKeyInfoCommand : IConsoleCommand
|
||||
internal sealed class GetKeyInfoCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "keyinfo";
|
||||
public string Description => "Keys key info for a key";
|
||||
public string Help => "keyinfo <Key>";
|
||||
public override string Command => "keyinfo";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -995,7 +946,7 @@ namespace Robust.Client.Console.Commands
|
||||
|
||||
if (Enum.TryParse(typeof(Keyboard.Key), args[0], true, out var parsed))
|
||||
{
|
||||
var key = (Keyboard.Key) parsed!;
|
||||
var key = (Keyboard.Key)parsed!;
|
||||
|
||||
var name = clyde.GetKeyName(key);
|
||||
|
||||
|
||||
@@ -5,12 +5,11 @@ using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class DebugAnchoredCommand : IConsoleCommand
|
||||
public sealed class DebugAnchoredCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showanchored";
|
||||
public string Description => $"Shows anchored entities on a particular tile";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "showanchored";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntitySystem.Get<DebugAnchoringSystem>().Enabled ^= true;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,11 @@ using Robust.Shared.ContentPack;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
#if DEBUG
|
||||
internal sealed class DumpMetadataMembersCommand : IConsoleCommand
|
||||
internal sealed class DumpMetadataMembersCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "dmetamem";
|
||||
public string Description => "Dumps a type's members in a format suitable for the sandbox configuration file.";
|
||||
public string Help => "Usage: dmetamem <type>";
|
||||
public override string Command => "dmetamem";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var type = Type.GetType(args[0]);
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@ using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class GridChunkBBCommand : IConsoleCommand
|
||||
public sealed class GridChunkBBCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showchunkbb";
|
||||
public string Description => "Displays chunk bounds for the purposes of rendering";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "showchunkbb";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntitySystem.Get<GridChunkBoundsDebugSystem>().Enabled ^= true;
|
||||
}
|
||||
|
||||
@@ -9,13 +9,11 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class LauncherAuthCommand : IConsoleCommand
|
||||
internal sealed class LauncherAuthCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "launchauth";
|
||||
public string Description => "Load authentication tokens from launcher data to aid in testing of live servers";
|
||||
public string Help => "launchauth [account name]";
|
||||
public override string Command => "launchauth";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var wantName = args.Length > 0 ? args[0] : null;
|
||||
|
||||
|
||||
@@ -5,12 +5,11 @@ using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class LightDebugCommand : IConsoleCommand
|
||||
internal sealed class LightDebugCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "lightbb";
|
||||
public string Description => "Toggles whether to show light bounding boxes";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "lightbb";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntitySystem.Get<DebugLightTreeSystem>().Enabled ^= true;
|
||||
}
|
||||
|
||||
@@ -7,13 +7,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class LsMonitorCommand : IConsoleCommand
|
||||
public sealed class LsMonitorCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "lsmonitor";
|
||||
public string Description => "";
|
||||
public string Help => "";
|
||||
public override string Command => "lsmonitor";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var clyde = IoCManager.Resolve<IClyde>();
|
||||
|
||||
@@ -26,13 +24,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class MonitorInfoCommand : IConsoleCommand
|
||||
public sealed class MonitorInfoCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "monitorinfo";
|
||||
public string Description => "";
|
||||
public string Help => "Usage: monitorinfo <id>";
|
||||
public override string Command => "monitorinfo";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
{
|
||||
@@ -54,13 +50,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class SetMonitorCommand : IConsoleCommand
|
||||
public sealed class SetMonitorCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "setmonitor";
|
||||
public string Description => "";
|
||||
public string Help => "Usage: setmonitor <id>";
|
||||
public override string Command => "setmonitor";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var clyde = IoCManager.Resolve<IClyde>();
|
||||
|
||||
|
||||
@@ -6,13 +6,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class PhysicsOverlayCommands : IConsoleCommand
|
||||
public sealed class PhysicsOverlayCommands : LocalizedCommands
|
||||
{
|
||||
public string Command => "physics";
|
||||
public string Description => $"Shows a debug physics overlay. The arg supplied specifies the overlay.";
|
||||
public string Help => $"{Command} <aabbs / com / contactnormals / contactpoints / distance / joints / shapeinfo / shapes>";
|
||||
public override string Command => "physics";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -56,7 +54,7 @@ namespace Robust.Client.Console.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length != 1) return CompletionResult.Empty;
|
||||
|
||||
|
||||
@@ -4,25 +4,21 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
sealed class HardQuitCommand : IConsoleCommand
|
||||
sealed class HardQuitCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "hardquit";
|
||||
public string Description => "Kills the game client instantly.";
|
||||
public string Help => "Kills the game client instantly, leaving no traces. No telling the server goodbye";
|
||||
public override string Command => "hardquit";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
sealed class QuitCommand : IConsoleCommand
|
||||
sealed class QuitCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "quit";
|
||||
public string Description => "Shuts down the game client gracefully.";
|
||||
public string Help => "Properly shuts down the game client, notifying the connected server and such.";
|
||||
public override string Command => "quit";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IGameController>().Shutdown("quit command used");
|
||||
}
|
||||
|
||||
@@ -4,13 +4,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class ReloadLocalizationsCommand : IConsoleCommand
|
||||
internal sealed class ReloadLocalizationsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "rldloc";
|
||||
public string Description => "Reloads localization (client & server)";
|
||||
public string Help => "Usage: rldloc";
|
||||
public override string Command => "rldloc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<ILocalizationManager>().ReloadLocalizations();
|
||||
|
||||
|
||||
@@ -4,38 +4,32 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
#if CLIENT_SCRIPTING
|
||||
internal sealed class ScriptCommand : IConsoleCommand
|
||||
internal sealed class ScriptCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "csi";
|
||||
public string Description => "Opens a C# interactive console.";
|
||||
public string Help => "csi";
|
||||
public override string Command => "csi";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
new ScriptConsoleClient().OpenCentered();
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class WatchCommand : IConsoleCommand
|
||||
internal sealed class WatchCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "watch";
|
||||
public string Description => "Opens a variable watch window.";
|
||||
public string Help => "watch";
|
||||
public override string Command => "watch";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
new WatchWindow().OpenCentered();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
internal sealed class ServerScriptCommand : IConsoleCommand
|
||||
internal sealed class ServerScriptCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "scsi";
|
||||
public string Description => "Opens a C# interactive console on the server.";
|
||||
public string Help => "scsi";
|
||||
public override string Command => "scsi";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<IScriptClient>();
|
||||
if (!mgr.CanScript)
|
||||
|
||||
@@ -4,13 +4,11 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class SendGarbageCommand : IConsoleCommand
|
||||
internal sealed class SendGarbageCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "sendgarbage";
|
||||
public string Description => "Sends garbage to the server.";
|
||||
public string Help => "The server will reply with 'no u'";
|
||||
public override string Command => "sendgarbage";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
// MsgStringTableEntries is registered as NetMessageAccept.Client so the server will immediately deny it.
|
||||
// And kick us.
|
||||
|
||||
@@ -6,13 +6,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class SetInputContextCommand : IConsoleCommand
|
||||
public sealed class SetInputContextCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "setinputcontext";
|
||||
public string Description => "Sets the active input context.";
|
||||
public string Help => "setinputcontext <context>";
|
||||
public override string Command => "setinputcontext";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
|
||||
@@ -5,12 +5,11 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class VelocitiesCommand : IConsoleCommand
|
||||
public sealed class VelocitiesCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showvelocities";
|
||||
public string Description => "Displays your angular and linear velocities";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "showvelocities";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<VelocityDebugSystem>().Enabled ^= true;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,11 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class ShowSpriteBBCommand : IConsoleCommand
|
||||
public sealed class ShowSpriteBBCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showspritebb";
|
||||
public string Description => "Toggle whether sprite bounds are shown";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "showspritebb";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntitySystem.Get<SpriteBoundsSystem>().Enabled ^= true;
|
||||
}
|
||||
|
||||
@@ -12,12 +12,11 @@ using Color = Robust.Shared.Maths.Color;
|
||||
|
||||
namespace Robust.Client.GameObjects;
|
||||
|
||||
public sealed class DebugEntityLookupCommand : IConsoleCommand
|
||||
public sealed class DebugEntityLookupCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "togglelookup";
|
||||
public string Description => "Shows / hides entitylookup bounds via an overlay";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "togglelookup";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntitySystem.Get<DebugEntityLookupSystem>().Enabled ^= true;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Robust.Client.GameStates
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
|
||||
private const uint TrafficHistorySize = 64; // Size of the traffic history bar in game ticks.
|
||||
private const int _maxEnts = 128; // maximum number of entities to track.
|
||||
private const int _maxEnts = 128; // maximum number of entities to track.
|
||||
|
||||
/// <inheritdoc />
|
||||
public override OverlaySpace Space => OverlaySpace.ScreenSpace;
|
||||
@@ -51,7 +51,7 @@ namespace Robust.Client.GameStates
|
||||
{
|
||||
if (msg.Tick.Value + TrafficHistorySize < _gameTiming.LastRealTick.Value)
|
||||
return;
|
||||
|
||||
|
||||
foreach (var uid in msg.Entities)
|
||||
{
|
||||
if (!_netEnts.TryGetValue(uid, out var netEnt))
|
||||
@@ -197,13 +197,11 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NetEntityReportCommand : IConsoleCommand
|
||||
private sealed class NetEntityReportCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "net_entityreport";
|
||||
public string Help => "net_entityreport";
|
||||
public string Description => "Toggles the net entity report panel.";
|
||||
public override string Command => "net_entityreport";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var overlayMan = IoCManager.Resolve<IOverlayManager>();
|
||||
|
||||
@@ -220,14 +218,12 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NetShowGraphCommand : IConsoleCommand
|
||||
private sealed class NetShowGraphCommand : LocalizedCommands
|
||||
{
|
||||
// Yeah commands should be localized, but I'm lazy and this is really just a debug command.
|
||||
public string Command => "net_refresh";
|
||||
public string Help => "net_refresh";
|
||||
public string Description => "requests a full server state";
|
||||
public override string Command => "net_refresh";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IClientGameStateManager>().RequestFullState();
|
||||
}
|
||||
|
||||
@@ -251,13 +251,11 @@ namespace Robust.Client.GameStates
|
||||
base.DisposeBehavior();
|
||||
}
|
||||
|
||||
private sealed class NetShowGraphCommand : IConsoleCommand
|
||||
private sealed class NetShowGraphCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "net_graph";
|
||||
public string Help => "net_graph";
|
||||
public string Description => "Toggles the net statistics pannel.";
|
||||
public override string Command => "net_graph";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var overlayMan = IoCManager.Resolve<IOverlayManager>();
|
||||
|
||||
@@ -274,13 +272,11 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NetWatchEntCommand : IConsoleCommand
|
||||
private sealed class NetWatchEntCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "net_watchent";
|
||||
public string Help => "net_watchent <0|EntityUid>";
|
||||
public string Description => "Dumps all network updates for an EntityId to the console.";
|
||||
public override string Command => "net_watchent";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntityUid eValue;
|
||||
if (args.Length == 0)
|
||||
|
||||
@@ -64,13 +64,11 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NetShowInterpCommand : IConsoleCommand
|
||||
private sealed class NetShowInterpCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "net_draw_interp";
|
||||
public string Help => "net_draw_interp";
|
||||
public string Description => "Toggles the debug drawing of the network interpolation.";
|
||||
public override string Command => "net_draw_interp";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var overlayMan = IoCManager.Resolve<IOverlayManager>();
|
||||
|
||||
|
||||
@@ -11,13 +11,11 @@ using static TerraFX.Interop.DirectX.DXGI;
|
||||
|
||||
namespace Robust.Client.Graphics.Clyde
|
||||
{
|
||||
public sealed class VramCommand : IConsoleCommand
|
||||
public sealed class VramCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "vram";
|
||||
public string Description => "Displays video memory usage statics by the game.";
|
||||
public string Help => "Usage: vram";
|
||||
public override string Command => "vram";
|
||||
|
||||
public unsafe void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override unsafe void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (!OperatingSystem.IsWindows())
|
||||
{
|
||||
|
||||
@@ -907,13 +907,11 @@ namespace Robust.Client.Input
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class BindCommand : IConsoleCommand
|
||||
internal sealed class BindCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "bind";
|
||||
public string Description => "Binds an input key to an input command.";
|
||||
public string Help => "bind <KeyName> <BindMode> <InputCommand>";
|
||||
public override string Command => "bind";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 3)
|
||||
{
|
||||
@@ -961,13 +959,11 @@ namespace Robust.Client.Input
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class SaveBindCommand : IConsoleCommand
|
||||
internal sealed class SaveBindCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "svbind";
|
||||
public string Description => "";
|
||||
public string Help => "";
|
||||
public override string Command => "svbind";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IInputManager>()
|
||||
.SaveToUserData();
|
||||
|
||||
@@ -11,12 +11,11 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Robust.Client.Physics
|
||||
{
|
||||
internal sealed class PhysicsIslandCommand : IConsoleCommand
|
||||
internal sealed class PhysicsIslandCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showislands";
|
||||
public string Description => "Shows the current physics bodies involved in each physics island.";
|
||||
public string Help => "showislands";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "showislands";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 0)
|
||||
{
|
||||
|
||||
@@ -4,12 +4,11 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Physics;
|
||||
|
||||
public sealed class GridSplitVisualCommand : IConsoleCommand
|
||||
public sealed class GridSplitVisualCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => SharedGridFixtureSystem.ShowGridNodesCommand;
|
||||
public string Description => "Shows the nodes for grid split purposes";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => SharedGridFixtureSystem.ShowGridNodesCommand;
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var system = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<GridFixtureSystem>();
|
||||
system.EnableDebug ^= true;
|
||||
|
||||
@@ -121,14 +121,12 @@ public sealed class ProfViewManager
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ProfSnapshotCommand : IConsoleCommand
|
||||
public sealed class ProfSnapshotCommand : LocalizedCommands
|
||||
{
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
public string Command => "profsnap";
|
||||
public string Description => "Make a profiling snapshot";
|
||||
public string Help => "";
|
||||
public override string Command => "profsnap";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var profViewManager = IoCManager.Resolve<ProfViewManager>();
|
||||
profViewManager.Snap();
|
||||
|
||||
@@ -28,13 +28,11 @@ namespace Robust.Client.UserInterface
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class TestWindowCommand : IConsoleCommand
|
||||
internal sealed class TestWindowCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "devwindow";
|
||||
public string Description => "A";
|
||||
public string Help => "A";
|
||||
public override string Command => "devwindow";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var clyde = IoCManager.Resolve<IClyde>();
|
||||
var monitor = clyde.EnumerateMonitors().First();
|
||||
|
||||
@@ -388,13 +388,11 @@ namespace Robust.Client.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class OpenFileCommand : IConsoleCommand
|
||||
public sealed class OpenFileCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "testopenfile";
|
||||
public string Description => "";
|
||||
public string Help => "";
|
||||
public override string Command => "testopenfile";
|
||||
|
||||
public async void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override async void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var stream = await IoCManager.Resolve<IFileDialogManager>().OpenFile();
|
||||
stream?.Dispose();
|
||||
|
||||
@@ -5,13 +5,10 @@ using Robust.Shared.Reflection;
|
||||
|
||||
namespace Robust.Client.UserInterface
|
||||
{
|
||||
sealed class ChangeSceneCommpand : IConsoleCommand
|
||||
sealed class ChangeSceneCommpand : LocalizedCommands
|
||||
{
|
||||
public string Command => "scene";
|
||||
public string Help => "scene <className>";
|
||||
public string Description => "Immediately changes the UI scene/state.";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "scene";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var reflection = IoCManager.Resolve<IReflectionManager>();
|
||||
var types = reflection.GetAllChildren(typeof(State.State));
|
||||
|
||||
@@ -9,13 +9,11 @@ using Robust.Shared.ViewVariables.Commands;
|
||||
namespace Robust.Client.ViewVariables
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class ViewVariablesCommand : ViewVariablesBaseCommand, IConsoleCommand
|
||||
public sealed class ViewVariablesCommand : ViewVariablesBaseCommand
|
||||
{
|
||||
[Dependency] private readonly IClientViewVariablesManager _cvvm = default!;
|
||||
|
||||
public override string Command => "vv";
|
||||
public override string Description => "Opens View Variables.";
|
||||
public override string Help => "Usage: vv <path|entity ID|guihover>";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
|
||||
@@ -7,13 +7,11 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Server.Bql
|
||||
{
|
||||
public sealed class ForAllCommand : IConsoleCommand
|
||||
public sealed class ForAllCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "forall";
|
||||
public string Description => "Runs a command over all entities with a given component";
|
||||
public string Help => "Usage: forall <bql query> do <command...>";
|
||||
public override string Command => "forall";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2)
|
||||
{
|
||||
|
||||
@@ -7,13 +7,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class AddComponentCommand : IConsoleCommand
|
||||
internal sealed class AddComponentCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "addcomp";
|
||||
public string Description => "Adds a component to an entity";
|
||||
public string Help => $"{Command} <uid> <componentName>";
|
||||
public override string Command => "addcomp";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
|
||||
@@ -5,13 +5,11 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
public sealed class DeleteCommand : IConsoleCommand
|
||||
public sealed class DeleteCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "delete";
|
||||
public string Description => "Deletes the entity with the specified ID.";
|
||||
public string Help => "delete <entity UID>";
|
||||
public override string Command => "delete";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
|
||||
@@ -13,16 +13,11 @@ using Robust.Shared.Maths;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
sealed class AddMapCommand : IConsoleCommand
|
||||
sealed class AddMapCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "addmap";
|
||||
public override string Command => "addmap";
|
||||
|
||||
public string Description =>
|
||||
"Adds a new empty map to the round. If the mapID already exists, this command does nothing.";
|
||||
|
||||
public string Help => "addmap <mapID> [initialize]";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
return;
|
||||
@@ -47,13 +42,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
sealed class RemoveMapCommand : IConsoleCommand
|
||||
sealed class RemoveMapCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "rmmap";
|
||||
public string Description => "Removes a map from the world. You cannot remove nullspace.";
|
||||
public string Help => "rmmap <mapId>";
|
||||
public override string Command => "rmmap";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -75,13 +68,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SaveGridCommand : IConsoleCommand
|
||||
public sealed class SaveGridCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "savegrid";
|
||||
public string Description => "Serializes a grid to disk.";
|
||||
public string Help => "savegrid <gridID> <Path>";
|
||||
public override string Command => "savegrid";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2)
|
||||
{
|
||||
@@ -108,7 +99,7 @@ namespace Robust.Server.Console.Commands
|
||||
shell.WriteLine("Save successful. Look in the user data directory.");
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
switch (args.Length)
|
||||
{
|
||||
@@ -123,13 +114,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class LoadGridCommand : IConsoleCommand
|
||||
public sealed class LoadGridCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "loadgrid";
|
||||
public string Description => "Loads a grid from a file into an existing map.";
|
||||
public string Help => "loadgrid <MapID> <Path> [x y] [rotation] [storeUids]";
|
||||
public override string Command => "loadgrid";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2 || args.Length == 3 || args.Length > 6)
|
||||
{
|
||||
@@ -203,19 +192,17 @@ namespace Robust.Server.Console.Commands
|
||||
mapLoader.LoadGrid(mapId, args[1], loadOptions);
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
return LoadMap.GetCompletionResult(shell, args);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SaveMap : IConsoleCommand
|
||||
public sealed class SaveMap : LocalizedCommands
|
||||
{
|
||||
public string Command => "savemap";
|
||||
public string Description => Loc.GetString("cmd-savemap-desc");
|
||||
public string Help => Loc.GetString("cmd-savemap-help");
|
||||
public override string Command => "savemap";
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
switch (args.Length)
|
||||
{
|
||||
@@ -231,7 +218,7 @@ namespace Robust.Server.Console.Commands
|
||||
return CompletionResult.Empty;
|
||||
}
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2)
|
||||
{
|
||||
@@ -271,11 +258,9 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class LoadMap : IConsoleCommand
|
||||
public sealed class LoadMap : LocalizedCommands
|
||||
{
|
||||
public string Command => "loadmap";
|
||||
public string Description => Loc.GetString("cmd-loadmap-desc");
|
||||
public string Help => Loc.GetString("cmd-loadmap-help");
|
||||
public override string Command => "loadmap";
|
||||
|
||||
public static CompletionResult GetCompletionResult(IConsoleShell shell, string[] args)
|
||||
{
|
||||
@@ -301,12 +286,12 @@ namespace Robust.Server.Console.Commands
|
||||
return CompletionResult.Empty;
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
return GetCompletionResult(shell, args);
|
||||
}
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 2 || args.Length > 6)
|
||||
{
|
||||
@@ -391,13 +376,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
sealed class LocationCommand : IConsoleCommand
|
||||
sealed class LocationCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "loc";
|
||||
public string Description => "Prints the absolute location of the player's entity to console.";
|
||||
public string Help => "loc";
|
||||
public override string Command => "loc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
var pt = player?.AttachedEntityTransform;
|
||||
@@ -412,13 +395,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
sealed class TpGridCommand : IConsoleCommand
|
||||
sealed class TpGridCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "tpgrid";
|
||||
public string Description => "Teleports a grid to a new location.";
|
||||
public string Help => "tpgrid <gridId> <X> <Y> [<MapId>]";
|
||||
public override string Command => "tpgrid";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 3 || args.Length > 4)
|
||||
{
|
||||
@@ -445,13 +426,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
sealed class RemoveGridCommand : IConsoleCommand
|
||||
sealed class RemoveGridCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "rmgrid";
|
||||
public string Description => "Removes a grid from a map. You cannot remove the default grid.";
|
||||
public string Help => "rmgrid <gridId>";
|
||||
public override string Command => "rmgrid";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -473,13 +452,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class RunMapInitCommand : IConsoleCommand
|
||||
internal sealed class RunMapInitCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "mapinit";
|
||||
public string Description => "Runs map init on a map";
|
||||
public string Help => "mapinit <mapID>";
|
||||
public override string Command => "mapinit";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
@@ -508,13 +485,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ListMapsCommand : IConsoleCommand
|
||||
internal sealed class ListMapsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "lsmap";
|
||||
public string Description => "Lists maps";
|
||||
public string Help => "lsmap";
|
||||
public override string Command => "lsmap";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
|
||||
@@ -533,13 +508,10 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ListGridsCommand : IConsoleCommand
|
||||
internal sealed class ListGridsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "lsgrid";
|
||||
public string Description => "List grids";
|
||||
public string Help => "lsgrid";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "lsgrid";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
|
||||
@@ -13,13 +13,11 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
internal sealed class TeleportCommand : IConsoleCommand
|
||||
internal sealed class TeleportCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "tp";
|
||||
public string Description => "Teleports a player to any location in the round.";
|
||||
public string Help => "tp <x> <y> [<mapID>]";
|
||||
public override string Command => "tp";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
if (player?.Status != SessionStatus.InGame)
|
||||
@@ -70,13 +68,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TeleportToCommand : IConsoleCommand
|
||||
public sealed class TeleportToCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "tpto";
|
||||
public string Description => "Teleports the current player or the specified players/entities to the location of last player/entity specified.";
|
||||
public string Help => "tpto <username|uid> [username|uid]...";
|
||||
public override string Command => "tpto";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
return;
|
||||
@@ -145,13 +141,10 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ListPlayers : IConsoleCommand
|
||||
public sealed class ListPlayers : LocalizedCommands
|
||||
{
|
||||
public string Command => "listplayers";
|
||||
public string Description => "Lists all players currently connected";
|
||||
public string Help => "listplayers";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "listplayers";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
// Player: number of people connected and their byond keys
|
||||
// Admin: read a byond variable which shows their ip, byond version, ckey, attached entity and hardware id
|
||||
@@ -177,13 +170,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class KickCommand : IConsoleCommand
|
||||
internal sealed class KickCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "kick";
|
||||
public string Description => "Kicks a connected player out of the server, disconnecting them.";
|
||||
public string Help => "kick <PlayerIndex> [<Reason>]";
|
||||
public override string Command => "kick";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var players = IoCManager.Resolve<IPlayerManager>();
|
||||
if (args.Length < 1)
|
||||
@@ -215,7 +206,7 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
{
|
||||
|
||||
@@ -4,13 +4,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
internal sealed class ReloadLocalizationsCommand : IConsoleCommand
|
||||
internal sealed class ReloadLocalizationsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "rldloc";
|
||||
public string Description => "Reloads localization (client & server)";
|
||||
public string Help => "Usage: rldloc";
|
||||
public override string Command => "rldloc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<ILocalizationManager>().ReloadLocalizations();
|
||||
}
|
||||
|
||||
@@ -7,13 +7,11 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class RemoveComponentCommand : IConsoleCommand
|
||||
internal sealed class RemoveComponentCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "rmcomp";
|
||||
public string Description => "Removes a component from an entity.";
|
||||
public string Help => $"{Command} <uid> <componentName>";
|
||||
public override string Command => "rmcomp";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
|
||||
@@ -10,12 +10,10 @@ using Robust.Shared.Physics.Systems;
|
||||
|
||||
namespace Robust.Server.Console.Commands;
|
||||
|
||||
public sealed class ScaleCommand : IConsoleCommand
|
||||
public sealed class ScaleCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "scale";
|
||||
public string Description => "Increases or decreases an entity's size naively";
|
||||
public string Help => $"{Command} <entityUid> <float>";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "scale";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
|
||||
@@ -8,13 +8,11 @@ using Robust.Shared.Map;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
public sealed class SpawnCommand : IConsoleCommand
|
||||
public sealed class SpawnCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "spawn";
|
||||
public string Description => "Spawns an entity with specific type.";
|
||||
public string Help => "spawn <prototype> OR spawn <prototype> <relative entity ID> OR spawn <prototype> <x> <y>";
|
||||
public override string Command => "spawn";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
var ent = IoCManager.Resolve<IServerEntityManager>();
|
||||
|
||||
@@ -6,13 +6,11 @@ using Robust.Shared.Physics.Components;
|
||||
|
||||
namespace Robust.Server.Console.Commands;
|
||||
|
||||
public sealed class SpinCommand : IConsoleCommand
|
||||
public sealed class SpinCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "spin";
|
||||
public string Description => "Causes an entity to spin. Default entity is the attached player's parent.";
|
||||
public string Help => $"{Command} velocity [drag] [entityUid]";
|
||||
public override string Command => "spin";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
{
|
||||
|
||||
@@ -3,54 +3,44 @@ using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
sealed class RestartCommand : IConsoleCommand
|
||||
sealed class RestartCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "restart";
|
||||
public string Description => "Gracefully restarts the server (not just the round).";
|
||||
public string Help => "restart";
|
||||
public override string Command => "restart";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IBaseServer>().Restart();
|
||||
}
|
||||
}
|
||||
|
||||
sealed class ShutdownCommand : IConsoleCommand
|
||||
sealed class ShutdownCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "shutdown";
|
||||
public string Description => "Gracefully shuts down the server.";
|
||||
public string Help => "shutdown";
|
||||
public override string Command => "shutdown";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IBaseServer>().Shutdown(null);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SaveConfig : IConsoleCommand
|
||||
public sealed class SaveConfig : LocalizedCommands
|
||||
{
|
||||
public string Command => "saveconfig";
|
||||
public string Description => "Saves the server configuration to the config file";
|
||||
public string Help => "saveconfig";
|
||||
public override string Command => "saveconfig";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
IoCManager.Resolve<IConfigurationManager>().SaveToFile();
|
||||
}
|
||||
}
|
||||
|
||||
sealed class NetworkAuditCommand : IConsoleCommand
|
||||
sealed class NetworkAuditCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "netaudit";
|
||||
public string Description => "Prints into about NetMsg security.";
|
||||
public string Help => "netaudit";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "netaudit";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var network = (NetManager) IoCManager.Resolve<INetManager>();
|
||||
|
||||
@@ -70,13 +60,11 @@ namespace Robust.Server.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
sealed class ShowTimeCommand : IConsoleCommand
|
||||
sealed class ShowTimeCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "showtime";
|
||||
public string Description => "Shows the server time.";
|
||||
public string Help => "showtime";
|
||||
public override string Command => "showtime";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var timing = IoCManager.Resolve<IGameTiming>();
|
||||
shell.WriteLine($"Paused: {timing.Paused}, CurTick: {timing.CurTick}, CurTime: {timing.CurTime}, RealTime: {timing.RealTime}");
|
||||
|
||||
@@ -46,12 +46,11 @@ namespace Robust.Server.Console.Commands
|
||||
/// <summary>
|
||||
/// Copies of Box2D's physics testbed for debugging.
|
||||
/// </summary>
|
||||
public sealed class TestbedCommand : IConsoleCommand
|
||||
public sealed class TestbedCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "testbed";
|
||||
public string Description => "Loads a physics testbed on the specified map.";
|
||||
public string Help => $"{Command} <mapid> <test>";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "testbed";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
|
||||
@@ -7,12 +7,11 @@ using Robust.Shared.Players;
|
||||
|
||||
namespace Robust.Server.Console.Commands
|
||||
{
|
||||
public sealed class AddViewSubscriberCommand : IConsoleCommand
|
||||
public sealed class AddViewSubscriberCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "addview";
|
||||
public string Description => $"Allows you to subscribe to an entity's view for debugging purposes";
|
||||
public string Help => $"{Command} <entityUid>";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "addview";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var session = shell.Player;
|
||||
|
||||
@@ -45,13 +44,11 @@ namespace Robust.Server.Console.Commands
|
||||
EntitySystem.Get<ViewSubscriberSystem>().AddViewSubscriber(uid, playerSession);
|
||||
}
|
||||
|
||||
public sealed class RemoveViewSubscriberCommand : IConsoleCommand
|
||||
public sealed class RemoveViewSubscriberCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "removeview";
|
||||
public string Description => $"Allows you to unsubscribe to an entity's view for debugging purposes";
|
||||
public string Help => $"{Command} <entityUid>";
|
||||
public override string Command => "removeview";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var session = shell.Player;
|
||||
|
||||
|
||||
@@ -9,14 +9,11 @@ using Robust.Shared.Utility;
|
||||
namespace Robust.Shared.Configuration
|
||||
{
|
||||
[SuppressMessage("ReSharper", "StringLiteralTypo")]
|
||||
internal sealed class CVarCommand : IConsoleCommand
|
||||
internal sealed class CVarCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "cvar";
|
||||
public string Description => Loc.GetString("cmd-cvar-desc");
|
||||
public override string Command => "cvar";
|
||||
|
||||
public string Help => Loc.GetString("cmd-cvar-help");
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length is < 1 or > 2)
|
||||
{
|
||||
@@ -63,7 +60,7 @@ namespace Robust.Shared.Configuration
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
var cfg = IoCManager.Resolve<IConfigurationManager>();
|
||||
if (args.Length == 1)
|
||||
|
||||
@@ -4,13 +4,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class DumpEventTablesCommand : IConsoleCommand
|
||||
internal sealed class DumpEventTablesCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "dump_event_tables";
|
||||
public string Description => Loc.GetString("cmd-dump_event_tables-desc");
|
||||
public string Help => Loc.GetString("cmd-dump_event_tables-help");
|
||||
public override string Command => "dump_event_tables";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var entMgr = IoCManager.Resolve<EntityManager>();
|
||||
var compFactory = IoCManager.Resolve<IComponentFactory>();
|
||||
@@ -46,7 +44,7 @@ internal sealed class DumpEventTablesCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
return CompletionResult.FromHint(Loc.GetString("cmd-dump_event_tables-arg-entity"));
|
||||
|
||||
@@ -4,13 +4,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class DumpNetComponentsCommand : IConsoleCommand
|
||||
internal sealed class DumpNetComponentsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "dump_net_comps";
|
||||
public string Description => Loc.GetString("cmd-dump_net_comps-desc");
|
||||
public string Help => Loc.GetString("cmd-dump_net_comps-help");
|
||||
public override string Command => "dump_net_comps";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var mgr = IoCManager.Resolve<IComponentFactory>();
|
||||
|
||||
|
||||
@@ -8,15 +8,13 @@ using Robust.Shared.Utility;
|
||||
namespace Robust.Shared.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class ExecCommand : IConsoleCommand
|
||||
internal sealed class ExecCommand : LocalizedCommands
|
||||
{
|
||||
private static readonly Regex CommentRegex = new Regex(@"^\s*#");
|
||||
|
||||
public string Command => "exec";
|
||||
public string Description => Loc.GetString("cmd-exec-desc");
|
||||
public string Help => Loc.GetString("cmd-exec-help");
|
||||
public override string Command => "exec";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var res = IoCManager.Resolve<IResourceManager>();
|
||||
|
||||
@@ -52,7 +50,7 @@ namespace Robust.Shared.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
{
|
||||
|
||||
@@ -5,13 +5,11 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class GcCommand : IConsoleCommand
|
||||
internal sealed class GcCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "gc";
|
||||
public string Description => Loc.GetString("cmd-gc-desc");
|
||||
public string Help => Loc.GetString("cmd-gc-help");
|
||||
public override string Command => "gc";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
@@ -26,7 +24,7 @@ internal sealed class GcCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
return CompletionResult.FromHint(Loc.GetString("cmd-gc-arg-generation"));
|
||||
@@ -35,28 +33,22 @@ internal sealed class GcCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GcFullCommand : IConsoleCommand
|
||||
internal sealed class GcFullCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "gcf";
|
||||
public string Description => Loc.GetString("cmd-gcf-desc");
|
||||
public string Help => Loc.GetString("cmd-gcf-help");
|
||||
public override string Command => "gcf";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
|
||||
GC.Collect(2, GCCollectionMode.Forced, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GcModeCommand : IConsoleCommand
|
||||
internal sealed class GcModeCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "gc_mode";
|
||||
public override string Command => "gc_mode";
|
||||
|
||||
public string Description => Loc.GetString("cmd-gc_mode-desc");
|
||||
|
||||
public string Help => Loc.GetString("cmd-gc_mode-help");
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var prevMode = GCSettings.LatencyMode;
|
||||
if (args.Length == 0)
|
||||
@@ -84,7 +76,7 @@ internal sealed class GcModeCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
{
|
||||
@@ -97,13 +89,11 @@ internal sealed class GcModeCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class MemCommand : IConsoleCommand
|
||||
internal sealed class MemCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "mem";
|
||||
public string Description => Loc.GetString("cmd-mem-desc");
|
||||
public string Help => Loc.GetString("cmd-mem-help");
|
||||
public override string Command => "mem";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var info = GC.GetGCMemoryInfo();
|
||||
|
||||
|
||||
@@ -3,13 +3,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class HelpCommand : IConsoleCommand
|
||||
internal sealed class HelpCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "help";
|
||||
public string Description => Loc.GetString("cmd-help-desc");
|
||||
public string Help => Loc.GetString("cmd-help-help");
|
||||
public override string Command => "help";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
switch (args.Length)
|
||||
{
|
||||
@@ -36,7 +34,7 @@ internal sealed class HelpCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
{
|
||||
|
||||
@@ -4,13 +4,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class ListAssembliesCommand : IConsoleCommand
|
||||
internal sealed class ListAssembliesCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "lsasm";
|
||||
public string Description => Loc.GetString("cmd-lsasm-desc");
|
||||
public string Help => Loc.GetString("cmd-lsasm-help");
|
||||
public override string Command => "lsasm";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var context in AssemblyLoadContext.All)
|
||||
|
||||
@@ -4,15 +4,11 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class ListCommands : IConsoleCommand
|
||||
internal sealed class ListCommands : LocalizedCommands
|
||||
{
|
||||
public string Command => "list";
|
||||
public override string Command => "list";
|
||||
|
||||
public string Description => Loc.GetString("cmd-list-desc");
|
||||
|
||||
public string Help => Loc.GetString("cmd-list-help");
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var filter = "";
|
||||
if (args.Length == 1)
|
||||
@@ -35,7 +31,7 @@ internal sealed class ListCommands : IConsoleCommand
|
||||
shell.WriteLine(message);
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 1)
|
||||
return CompletionResult.FromHint(Loc.GetString("cmd-list-arg-filter"));
|
||||
|
||||
@@ -5,16 +5,10 @@ using Robust.Shared.Log;
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class LogSetLevelCommand : IConsoleCommand
|
||||
internal sealed class LogSetLevelCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "loglevel";
|
||||
public string Description => "Changes the log level for a provided sawmill.";
|
||||
|
||||
public string Help => "Usage: loglevel <sawmill> <level>"
|
||||
+ "\n sawmill: A label prefixing log messages. This is the one you're setting the level for."
|
||||
+ "\n level: The log level. Must match one of the values of the LogLevel enum.";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override string Command => "loglevel";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
{
|
||||
@@ -43,7 +37,7 @@ internal sealed class LogSetLevelCommand : IConsoleCommand
|
||||
Logger.GetSawmill(name).Level = level;
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
var logMgr = IoCManager.Resolve<ILogManager>();
|
||||
|
||||
@@ -64,17 +58,11 @@ internal sealed class LogSetLevelCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class TestLog : IConsoleCommand
|
||||
internal sealed class TestLog : LocalizedCommands
|
||||
{
|
||||
public string Command => "testlog";
|
||||
public string Description => "Writes a test log to a sawmill.";
|
||||
public override string Command => "testlog";
|
||||
|
||||
public string Help => "Usage: testlog <sawmill> <level> <message>"
|
||||
+ "\n sawmill: A label prefixing the logged message."
|
||||
+ "\n level: The log level. Must match one of the values of the LogLevel enum."
|
||||
+ "\n message: The message to be logged. Wrap this in double quotes if you want to use spaces.";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 3)
|
||||
{
|
||||
@@ -96,7 +84,7 @@ internal sealed class TestLog : IConsoleCommand
|
||||
Logger.LogS(level, name, message);
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
{
|
||||
var logMgr = IoCManager.Resolve<ILogManager>();
|
||||
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class SerializeStatsCommand : IConsoleCommand
|
||||
internal sealed class SerializeStatsCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "szr_stats";
|
||||
public string Description => "Report serializer statistics.";
|
||||
public string Help => "szr_stats";
|
||||
public override string Command => "szr_stats";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
shell.WriteLine($"serialized: {RobustSerializer.BytesSerialized} bytes, {RobustSerializer.ObjectsSerialized} objects");
|
||||
shell.WriteLine($"largest serialized: {RobustSerializer.LargestObjectSerializedBytes} bytes, {RobustSerializer.LargestObjectSerializedType} objects");
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Shared.Console;
|
||||
|
||||
public abstract class LocalizedCommands : IConsoleCommand
|
||||
{
|
||||
[Dependency] protected readonly ILocalizationManager LocalizationManager = default!;
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract string Command { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual string Description => LocalizationManager.TryGetString($"cmd-{Command}-desc", out var val) ? val : "";
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual string Help => LocalizationManager.TryGetString($"cmd-{Command}-help", out var val) ? val : "";
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract void Execute(IConsoleShell shell, string argStr, string[] args);
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual CompletionResult GetCompletion(IConsoleShell shell, string[] args) => CompletionResult.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual ValueTask<CompletionResult> GetCompletionAsync(IConsoleShell shell, string[] args,
|
||||
CancellationToken cancel)
|
||||
{
|
||||
return ValueTask.FromResult(GetCompletion(shell, args));
|
||||
}
|
||||
}
|
||||
@@ -33,13 +33,11 @@ namespace Robust.Shared.Network
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
internal sealed class HwidCommand : IConsoleCommand
|
||||
internal sealed class HwidCommand : LocalizedCommands
|
||||
{
|
||||
public string Command => "hwid";
|
||||
public string Description => "Returns the current HWID.";
|
||||
public string Help => "Returns the current HWID.";
|
||||
public override string Command => "hwid";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
shell.WriteLine(Convert.ToBase64String(HWId.Calc(), Base64FormattingOptions.None));
|
||||
}
|
||||
|
||||
@@ -7,17 +7,12 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Shared.ViewVariables.Commands;
|
||||
|
||||
public abstract class ViewVariablesBaseCommand : IConsoleCommand
|
||||
public abstract class ViewVariablesBaseCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] protected readonly INetManager _netMan = default!;
|
||||
[Dependency] protected readonly IViewVariablesManager _vvm = default!;
|
||||
|
||||
public abstract string Command { get; }
|
||||
public abstract string Description { get; }
|
||||
public abstract string Help { get; }
|
||||
public abstract void Execute(IConsoleShell shell, string argStr, string[] args);
|
||||
|
||||
public virtual async ValueTask<CompletionResult> GetCompletionAsync(IConsoleShell shell, string[] args, CancellationToken cancel)
|
||||
public override async ValueTask<CompletionResult> GetCompletionAsync(IConsoleShell shell, string[] args, CancellationToken cancel)
|
||||
{
|
||||
if (args.Length is 0 or > 1)
|
||||
return CompletionResult.Empty;
|
||||
|
||||
@@ -3,11 +3,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Shared.ViewVariables.Commands;
|
||||
|
||||
public sealed class ViewVariablesInvokeCommand : ViewVariablesBaseCommand, IConsoleCommand
|
||||
public sealed class ViewVariablesInvokeCommand : ViewVariablesBaseCommand
|
||||
{
|
||||
public override string Command => "vvinvoke";
|
||||
public override string Description => "Invoke/Call a path with arguments using VV.";
|
||||
public override string Help => $"{Command} <path> [arguments...]";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
|
||||
@@ -2,11 +2,9 @@ using Robust.Shared.Console;
|
||||
|
||||
namespace Robust.Shared.ViewVariables.Commands;
|
||||
|
||||
public sealed class ViewVariablesReadCommand : ViewVariablesBaseCommand, IConsoleCommand
|
||||
public sealed class ViewVariablesReadCommand : ViewVariablesBaseCommand
|
||||
{
|
||||
public override string Command => "vvread";
|
||||
public override string Description => "Retrieve a path's value using VV.";
|
||||
public override string Help => $"{Command} <path>";
|
||||
|
||||
public override async void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
|
||||
@@ -2,11 +2,9 @@ using Robust.Shared.Console;
|
||||
|
||||
namespace Robust.Shared.ViewVariables.Commands;
|
||||
|
||||
public sealed class ViewVariablesWriteCommand : ViewVariablesBaseCommand, IConsoleCommand
|
||||
public sealed class ViewVariablesWriteCommand : ViewVariablesBaseCommand
|
||||
{
|
||||
public override string Command => "vvwrite";
|
||||
public override string Description => "Modify a path's value using VV.";
|
||||
public override string Help => $"{Command} <path> <value>";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user