diff --git a/Robust.Server/GameObjects/EntitySystems/VisibilitySystem.cs b/Robust.Server/GameObjects/EntitySystems/VisibilitySystem.cs index 786df007b3..8f6e31d3e8 100644 --- a/Robust.Server/GameObjects/EntitySystems/VisibilitySystem.cs +++ b/Robust.Server/GameObjects/EntitySystems/VisibilitySystem.cs @@ -40,12 +40,6 @@ namespace Robust.Server.GameObjects EntityManager.EntityInitialized -= OnEntityInit; } - [Obsolete("Use Entity variant")] - public void AddLayer(EntityUid uid, VisibilityComponent component, int layer, bool refresh = true) - { - AddLayer((uid, component), (ushort)layer, refresh); - } - public void AddLayer(Entity ent, ushort layer, bool refresh = true) { ent.Comp ??= _visibilityQuery.CompOrNull(ent.Owner) ?? AddComp(ent.Owner); @@ -59,13 +53,6 @@ namespace Robust.Server.GameObjects RefreshVisibility(ent); } - - [Obsolete("Use Entity variant")] - public void RemoveLayer(EntityUid uid, VisibilityComponent component, int layer, bool refresh = true) - { - RemoveLayer((uid, component), (ushort)layer, refresh); - } - public void RemoveLayer(Entity ent, ushort layer, bool refresh = true) { if (!_visibilityQuery.Resolve(ent.Owner, ref ent.Comp, false)) @@ -80,12 +67,6 @@ namespace Robust.Server.GameObjects RefreshVisibility(ent); } - [Obsolete("Use Entity variant")] - public void SetLayer(EntityUid uid, VisibilityComponent component, int layer, bool refresh = true) - { - SetLayer((uid, component), (ushort)layer, refresh); - } - public void SetLayer(Entity ent, ushort layer, bool refresh = true) { ent.Comp ??= _visibilityQuery.CompOrNull(ent.Owner) ?? AddComp(ent.Owner); diff --git a/Robust.UnitTesting/Shared/GameState/VisibilityTest.cs b/Robust.UnitTesting/Shared/GameState/VisibilityTest.cs index ae67df6a85..2e65dad933 100644 --- a/Robust.UnitTesting/Shared/GameState/VisibilityTest.cs +++ b/Robust.UnitTesting/Shared/GameState/VisibilityTest.cs @@ -44,7 +44,7 @@ public sealed partial class VisibilityTest : RobustIntegrationTest metaComp[i] = server.EntMan.GetComponent(ent); visComp[i] = server.EntMan.AddComponent(ent); - vis.AddLayer(ent, visComp[i], 1 << i); + vis.AddLayer((ent, visComp[i]), (ushort)(1 << i)); if (i > 0) xforms.SetParent(ent, ents[i - 1]); } @@ -62,7 +62,7 @@ public sealed partial class VisibilityTest : RobustIntegrationTest // Adding a layer to the root entity's mask will apply it to all children var extraMask = 1 << (N + 1); mask = RequiredMask | extraMask; - vis.AddLayer(ents[0], visComp[0], extraMask); + vis.AddLayer((ents[0], visComp[0]), (ushort)extraMask); for (int i = 0; i < N; i++) { mask |= 1 << i; @@ -71,7 +71,7 @@ public sealed partial class VisibilityTest : RobustIntegrationTest } // Removing the removes it from all children. - vis.RemoveLayer(ents[0], visComp[0], extraMask); + vis.RemoveLayer((ents[0], visComp[0]), (ushort)extraMask); mask = RequiredMask; for (int i = 0; i < N; i++) { @@ -101,7 +101,7 @@ public sealed partial class VisibilityTest : RobustIntegrationTest } // Re-attaching the entity also updates the masks. - await server.WaitPost(() => xforms.SetParent(ents[split], ents[split-1])); + await server.WaitPost(() => xforms.SetParent(ents[split], ents[split - 1])); mask = RequiredMask; for (int i = 0; i < N; i++) { @@ -111,7 +111,7 @@ public sealed partial class VisibilityTest : RobustIntegrationTest } // Setting a mask on a child does not propagate upwards, only downwards - vis.AddLayer(ents[split], visComp[split], extraMask); + vis.AddLayer((ents[split], visComp[split]), (ushort)extraMask); mask = RequiredMask; for (int i = 0; i < split; i++) {