}
// 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;
{
_consoleHost.ExecuteCommand("physics shapes");
}
-
- public void MachineLinking()
- {
- _consoleHost.ExecuteCommand("signallink");
- }
}
}
-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;
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;
private void EnsureWindow()
{
- if(_window is { Disposed: false })
+ if (_window is { Disposed: false })
return;
_window = UIManager.CreateWindow<SandboxWindow>();
+ // 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;
_window.ToggleSubfloorButton.OnPressed += _ => _sandbox.ToggleSubFloor();
_window.ShowMarkersButton.OnPressed += _ => _sandbox.ShowMarkers();
_window.ShowBbButton.OnPressed += _ => _sandbox.ShowBb();
- _window.MachineLinkingButton.OnPressed += _ => _sandbox.MachineLinking();
}
private void CheckSandboxVisibility()
{
if (_window != null)
{
- _window.Dispose();
+ _window.Close();
_window = null;
}
if (_sandbox.SandboxAllowed && _window.IsOpen != true)
{
UIManager.ClickSound();
- _window.OpenCentered();
+ _window.Open();
}
else
{
Title="{Loc sandbox-window-title}"
Resizable="False">
<BoxContainer Orientation="Vertical" SeparationOverride="4">
- <Button Name="AiOverlayButton" Access="Public" Text="{Loc sandbox-window-ai-overlay-button}" ToggleMode="True"/>
- <Button Name="RespawnButton" Access="Public" Text="{Loc sandbox-window-respawn-button}"/>
- <Button Name="SpawnEntitiesButton" Access="Public" Text="{Loc sandbox-window-spawn-entities-button}"/>
+ <Label Text="{Loc sandbox-window-map-editing-label}"/>
<Button Name="SpawnTilesButton" Access="Public" Text="{Loc sandbox-window-spawn-tiles-button}"/>
+ <Button Name="SpawnEntitiesButton" Access="Public" Text="{Loc sandbox-window-spawn-entities-button}"/>
<Button Name="SpawnDecalsButton" Access="Public" Text="{Loc sandbox-window-spawn-decals-button}"/>
- <Button Name="GiveFullAccessButton" Access="Public" Text="{Loc sandbox-window-grant-full-access-button}"/>
- <Button Name="GiveAghostButton" Access="Public" Text="{Loc sandbox-window-ghost-button}"/>
+
+ <Label Text="{Loc sandbox-window-visibility-label}"/>
<Button Name="ToggleLightButton" Access="Public" Text="{Loc sandbox-window-toggle-lights-button}" ToggleMode="True"/>
<Button Name="ToggleFovButton" Access="Public" Text="{Loc sandbox-window-toggle-fov-button}" ToggleMode="True"/>
<Button Name="ToggleShadowsButton" Access="Public" Text="{Loc sandbox-window-toggle-shadows-button}" ToggleMode="True"/>
<Button Name="ToggleSubfloorButton" Access="Public" Text="{Loc sandbox-window-toggle-subfloor-button}" ToggleMode="True"/>
- <Button Name="SuicideButton" Access="Public" Text="{Loc sandbox-window-toggle-suicide-button}" ToggleMode="True"/>
+ <Button Name="AiOverlayButton" Access="Public" Text="{Loc sandbox-window-ai-overlay-button}" ToggleMode="True"/>
<Button Name="ShowMarkersButton" Access="Public" Text="{Loc sandbox-window-show-spawns-button}" ToggleMode="True"/>
<Button Name="ShowBbButton" Access="Public" Text="{Loc sandbox-window-show-bb-button}" ToggleMode="True"/>
- <Button Name="MachineLinkingButton" Access="Public" Text="{Loc sandbox-window-link-machines-button}" ToggleMode="True"/>
+
+ <Label Text="{Loc sandbox-window-your-character-label}"/>
+ <Button Name="GiveAghostButton" Access="Public" Text="{Loc sandbox-window-ghost-button}"/>
+ <Button Name="GiveFullAccessButton" Access="Public" Text="{Loc sandbox-window-grant-full-access-button}"/>
+ <Button Name="SuicideButton" Access="Public" Text="{Loc sandbox-window-toggle-suicide-button}"/>
+ <Button Name="RespawnButton" Access="Public" Text="{Loc sandbox-window-respawn-button}"/>
</BoxContainer>
</windows:SandboxWindow>
sandbox-window-title = Sandbox Panel
+
+sandbox-window-map-editing-label = Editing
+sandbox-window-visibility-label = Visibility
+sandbox-window-your-character-label = Your Character
+
sandbox-window-ai-overlay-button = AI Overlay
sandbox-window-respawn-button = Respawn
sandbox-window-spawn-entities-button = Spawn Entities
sandbox-window-toggle-shadows-button = Toggle Shadows
sandbox-window-toggle-subfloor-button = Toggle Subfloor
sandbox-window-toggle-suicide-button = Suicide
-sandbox-window-show-spawns-button = Shows Spawns
+sandbox-window-show-spawns-button = Show Spawns
sandbox-window-show-bb-button = Show BB
sandbox-window-show-npc-button = Show NPC
-sandbox-window-link-machines-button = Link machines