Console Unify API Changes (#3059)
* Remove unused IChatCommand. * Lots of refactoring into a shared context. * Removed ICommonSession from server concmd Execute. * Added argStr parameter to concmd execute. * The execute function of client concmds now returns void, use the new shell.RemoteExecuteCommand function to forward commands. * Finally move shells and commands into shared. * Console commands can now be registered directly without a class in a shared context. * Engine API Changes. * Repair rebase damage. * Update Submodule.
This commit is contained in:
@@ -9,7 +9,6 @@ using Content.Shared.Access;
|
||||
using Content.Shared.Sandbox;
|
||||
using Robust.Server.Console;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Interfaces.Console;
|
||||
using Robust.Server.Interfaces.Placement;
|
||||
using Robust.Server.Interfaces.Player;
|
||||
using Robust.Server.Player;
|
||||
@@ -31,7 +30,7 @@ namespace Content.Server.Sandbox
|
||||
[Dependency] private readonly IPlacementManager _placementManager = default!;
|
||||
[Dependency] private readonly IConGroupController _conGroupController = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IConsoleShell _shell = default!;
|
||||
[Dependency] private readonly IServerConsoleHost _host = default!;
|
||||
|
||||
private bool _isSandboxEnabled;
|
||||
|
||||
@@ -183,7 +182,7 @@ namespace Content.Server.Sandbox
|
||||
|
||||
var player = _playerManager.GetSessionByChannel(message.MsgChannel);
|
||||
|
||||
_shell.ExecuteCommand(player, _conGroupController.CanCommand(player, "aghost") ? "aghost" : "ghost");
|
||||
_host.ExecuteCommand(player, _conGroupController.CanCommand(player, "aghost") ? "aghost" : "ghost");
|
||||
}
|
||||
|
||||
private void SandboxSuicideReceived(MsgSandboxSuicide message)
|
||||
@@ -194,7 +193,7 @@ namespace Content.Server.Sandbox
|
||||
}
|
||||
|
||||
var player = _playerManager.GetSessionByChannel(message.MsgChannel);
|
||||
_shell.ExecuteCommand(player, "suicide");
|
||||
_host.ExecuteCommand(player, "suicide");
|
||||
}
|
||||
|
||||
private void UpdateSandboxStatusForAll()
|
||||
|
||||
Reference in New Issue
Block a user