2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Client.GameObjects;
|
2020-05-24 01:47:14 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-12-03 14:17:01 +01:00
|
|
|
using Robust.Shared.IoC;
|
2020-05-24 01:47:14 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Client.Markers
|
2020-05-24 01:47:14 +02:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
public sealed class MarkerComponent : Component
|
|
|
|
|
{
|
|
|
|
|
protected override void Startup()
|
|
|
|
|
{
|
|
|
|
|
base.Startup();
|
|
|
|
|
|
|
|
|
|
UpdateVisibility();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateVisibility()
|
|
|
|
|
{
|
|
|
|
|
var system = EntitySystem.Get<MarkerSystem>();
|
|
|
|
|
|
2021-12-03 15:53:09 +01:00
|
|
|
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out ISpriteComponent? sprite))
|
2020-05-24 01:47:14 +02:00
|
|
|
{
|
|
|
|
|
sprite.Visible = system.MarkersVisible;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|