* Engine namespace changes.
* Automated remove redundant using statements.
* Simplified Graphics namespace.
* Apparently the container system stores full type names in the map file.😞 This updates those names.
* API Changes to LocalizationManager.LoadCulture.
* Update submodule to v0.3.2
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using Content.Shared.GameObjects.Components;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.GameObjects.Components
|
|
{
|
|
[UsedImplicitly]
|
|
public class ExtinguisherCabinetVisualizer : AppearanceVisualizer
|
|
{
|
|
public override void OnChangeData(AppearanceComponent component)
|
|
{
|
|
base.OnChangeData(component);
|
|
|
|
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
|
|
|
if (component.TryGetData(ExtinguisherCabinetVisuals.IsOpen, out bool isOpen))
|
|
{
|
|
if (isOpen)
|
|
{
|
|
if (component.TryGetData(ExtinguisherCabinetVisuals.ContainsExtinguisher, out bool contains))
|
|
{
|
|
if (contains)
|
|
{
|
|
sprite.LayerSetState(0, "extinguisher_full");
|
|
}
|
|
else
|
|
{
|
|
sprite.LayerSetState(0, "extinguisher_empty");
|
|
}
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
sprite.LayerSetState(0, "extinguisher_closed");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|