Decal Placer + add new decals for mapping (#6548)

* abomination

* okay its less unabashedly garbage now

* other UI changes

* its britney bitch

* proper greyscale full/half/quarter tiles

* misc cleanup

* rsi

* Add a palette system. It's Kara's problem now.

* oops

* a

* Departmental palette alpha tweaks

* oopy

* so true

* Update Content.Shared/Decals/ColorPalettePrototype.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* fixes for that

* neutral light color and new warning lines

* dirt

* checkerboards

* oop

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
mirrorcult
2022-02-08 13:54:41 -07:00
committed by GitHub
parent 2d5c082eba
commit 31769edf5f
80 changed files with 1223 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Content.Client.Decals.UI;
using Content.Client.HUD;
using Content.Client.Markers;
using Content.Shared.Input;
@@ -29,6 +30,7 @@ namespace Content.Client.Sandbox
public readonly Button RespawnButton;
public readonly Button SpawnEntitiesButton;
public readonly Button SpawnTilesButton;
public readonly Button SpawnDecalsButton;
public readonly Button GiveFullAccessButton; //A button that just puts a captain's ID in your hands.
public readonly Button GiveAghostButton;
public readonly Button ToggleLightButton;
@@ -64,6 +66,9 @@ namespace Content.Client.Sandbox
SpawnTilesButton = new Button { Text = Loc.GetString("sandbox-window-spawn-tiles-button") };
vBox.AddChild(SpawnTilesButton);
SpawnDecalsButton = new Button { Text = Loc.GetString("sandbox-window-spawn-decals-button") };
vBox.AddChild(SpawnDecalsButton);
GiveFullAccessButton = new Button { Text = Loc.GetString("sandbox-window-grant-full-access-button") };
vBox.AddChild(GiveFullAccessButton);
@@ -128,6 +133,7 @@ namespace Content.Client.Sandbox
private SandboxWindow? _window;
private EntitySpawnWindow? _spawnWindow;
private TileSpawnWindow? _tilesSpawnWindow;
private DecalPlacerWindow? _decalSpawnWindow;
private bool _sandboxWindowToggled;
public void Initialize()
@@ -150,6 +156,8 @@ namespace Content.Client.Sandbox
InputCmdHandler.FromDelegate(session => ToggleSandboxWindow()));
_inputManager.SetInputCommand(ContentKeyFunctions.OpenTileSpawnWindow,
InputCmdHandler.FromDelegate(session => ToggleTilesWindow()));
_inputManager.SetInputCommand(ContentKeyFunctions.OpenDecalSpawnWindow,
InputCmdHandler.FromDelegate(session => ToggleDecalsWindow()));
}
private void SandboxButtonPressed(bool newValue)
@@ -205,6 +213,7 @@ namespace Content.Client.Sandbox
_window.RespawnButton.OnPressed += OnRespawnButtonOnOnPressed;
_window.SpawnTilesButton.OnPressed += OnSpawnTilesButtonClicked;
_window.SpawnEntitiesButton.OnPressed += OnSpawnEntitiesButtonClicked;
_window.SpawnDecalsButton.OnPressed += OnSpawnDecalsButtonClicked;
_window.GiveFullAccessButton.OnPressed += OnGiveAdminAccessButtonClicked;
_window.GiveAghostButton.OnPressed += OnGiveAghostButtonClicked;
_window.ToggleLightButton.OnToggled += OnToggleLightButtonClicked;
@@ -240,6 +249,11 @@ namespace Content.Client.Sandbox
ToggleTilesWindow();
}
private void OnSpawnDecalsButtonClicked(BaseButton.ButtonEventArgs obj)
{
ToggleDecalsWindow();
}
private void OnToggleLightButtonClicked(BaseButton.ButtonEventArgs args)
{
ToggleLight();
@@ -327,6 +341,25 @@ namespace Content.Client.Sandbox
}
}
private void ToggleDecalsWindow()
{
if (_decalSpawnWindow == null)
{
_decalSpawnWindow = new DecalPlacerWindow(_prototypeManager);
_decalSpawnWindow.OpenToLeft();
return;
}
if (_decalSpawnWindow.IsOpen)
{
_decalSpawnWindow.Close();
}
else
{
_decalSpawnWindow.Open();
}
}
private void ToggleLight()
{
_consoleHost.ExecuteCommand("togglelight");