2020-05-24 01:47:14 +02:00
|
|
|
using Content.Client.GameObjects.EntitySystems;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Client.GameObjects;
|
2020-05-24 01:47:14 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.GameObjects.Components.Markers
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
public sealed class MarkerComponent : Component
|
|
|
|
|
{
|
|
|
|
|
public override string Name => "Marker";
|
|
|
|
|
|
|
|
|
|
protected override void Startup()
|
|
|
|
|
{
|
|
|
|
|
base.Startup();
|
|
|
|
|
|
|
|
|
|
UpdateVisibility();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateVisibility()
|
|
|
|
|
{
|
|
|
|
|
var system = EntitySystem.Get<MarkerSystem>();
|
|
|
|
|
|
2021-03-10 14:48:29 +01:00
|
|
|
if (Owner.TryGetComponent(out ISpriteComponent? sprite))
|
2020-05-24 01:47:14 +02:00
|
|
|
{
|
|
|
|
|
sprite.Visible = system.MarkersVisible;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|