Minor appearance changes (#2370)

* Minor appearance changes

* Remove that redundant deleted property

* Fixes and remove redundant checks

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2020-11-14 00:42:35 +11:00
committed by GitHub
parent 4f03c81ddc
commit 02f827f063
14 changed files with 28 additions and 60 deletions

View File

@@ -9,15 +9,16 @@ namespace Content.Client.GameObjects.Components.Wires
public override void OnChangeData(AppearanceComponent component)
{
base.OnChangeData(component);
if (component.Owner.Deleted)
return;
var sprite = component.Owner.GetComponent<ISpriteComponent>();
if (component.TryGetData<bool>(WiresVisuals.MaintenancePanelState, out var state))
{
sprite.LayerSetVisible(WiresVisualLayers.MaintenancePanel, state);
}
// Mainly for spawn window
else
{
sprite.LayerSetVisible(WiresVisualLayers.MaintenancePanel, false);
}
}
public enum WiresVisualLayers