Align storage welders with door welders (#2393)

* Align storage welders with door welders

* Spamming the button doesn't punish you.
* Requires lit welder to start
*

* Nulla-builda-buddy

* A certain smug in a bucket

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-11-14 01:08:00 +11:00
committed by GitHub
parent 75e0667acb
commit 4704f607e6
2 changed files with 42 additions and 15 deletions

View File

@@ -2,6 +2,7 @@
using Robust.Client.GameObjects;
using Robust.Client.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Log;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
@@ -56,9 +57,9 @@ namespace Content.Client.GameObjects.Components.Storage
}
component.TryGetData(StorageVisuals.Open, out bool open);
sprite.LayerSetState(StorageVisualLayers.Door, open
? _stateOpen ?? $"{_stateBase}_open"
: _stateClosed ?? $"{_stateBase}_door");
var state = open ? _stateOpen ?? $"{_stateBase}_open" : _stateClosed ?? $"{_stateBase}_door";
sprite.LayerSetState(StorageVisualLayers.Door, state);
if (component.TryGetData(StorageVisuals.CanLock, out bool canLock) && canLock)
{