diff --git a/Content.Client/Sandbox/SandboxSystem.cs b/Content.Client/Sandbox/SandboxSystem.cs index 8a4c93fa35..abc717642c 100644 --- a/Content.Client/Sandbox/SandboxSystem.cs +++ b/Content.Client/Sandbox/SandboxSystem.cs @@ -110,7 +110,7 @@ namespace Content.Client.Sandbox } // Try copy tile. - + if (!_map.TryFindGridAt(_transform.ToMapCoordinates(coords), out var gridUid, out var grid) || !_mapSystem.TryGetTileRef(gridUid, grid, coords, out var tileRef)) return false; @@ -157,10 +157,5 @@ namespace Content.Client.Sandbox { _consoleHost.ExecuteCommand("physics shapes"); } - - public void MachineLinking() - { - _consoleHost.ExecuteCommand("signallink"); - } } } diff --git a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs index 58c8a1451b..1924bf2b24 100644 --- a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs +++ b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs @@ -1,4 +1,5 @@ -using Content.Client.Administration.Managers; +using System.Numerics; +using Content.Client.Administration.Managers; using Content.Client.Gameplay; using Content.Client.Markers; using Content.Client.Sandbox; @@ -7,9 +8,7 @@ using Content.Client.UserInterface.Controls; using Content.Client.UserInterface.Systems.DecalPlacer; using Content.Client.UserInterface.Systems.Sandbox.Windows; using Content.Shared.Input; -using Content.Shared.Silicons.StationAi; using JetBrains.Annotations; -using Robust.Client.Console; using Robust.Client.Debugging; using Robust.Client.Graphics; using Robust.Client.Input; @@ -109,9 +108,13 @@ public sealed class SandboxUIController : UIController, IOnStateChanged(); + // Pre-center the window without forcing it to the center every time. + _window.OpenCentered(); + _window.Close(); + _window.OnOpen += () => { SandboxButton!.Pressed = true; }; _window.OnClose += () => { SandboxButton!.Pressed = false; }; _window.ToggleLightButton.Pressed = !_light.Enabled; @@ -149,7 +152,6 @@ public sealed class SandboxUIController : UIController, IOnStateChanged _sandbox.ToggleSubFloor(); _window.ShowMarkersButton.OnPressed += _ => _sandbox.ShowMarkers(); _window.ShowBbButton.OnPressed += _ => _sandbox.ShowBb(); - _window.MachineLinkingButton.OnPressed += _ => _sandbox.MachineLinking(); } private void CheckSandboxVisibility() @@ -164,7 +166,7 @@ public sealed class SandboxUIController : UIController, IOnStateChanged -