mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
Most warnings were related to EntityQuery and IPhysicsComponent. Partially fixes #1650 and fixes #1682
28 lines
707 B
C#
28 lines
707 B
C#
using Content.Client.GameObjects.Components.Markers;
|
|
using Robust.Shared.GameObjects.Systems;
|
|
|
|
namespace Content.Client.GameObjects.EntitySystems
|
|
{
|
|
public sealed class MarkerSystem : EntitySystem
|
|
{
|
|
private bool _markersVisible;
|
|
|
|
public bool MarkersVisible
|
|
{
|
|
get => _markersVisible;
|
|
set
|
|
{
|
|
_markersVisible = value;
|
|
UpdateMarkers();
|
|
}
|
|
}
|
|
|
|
private void UpdateMarkers()
|
|
{
|
|
foreach (var markerComponent in EntityManager.ComponentManager.EntityQuery<MarkerComponent>())
|
|
{
|
|
markerComponent.UpdateVisibility();
|
|
}
|
|
}
|
|
}
|
|
}
|