Replace obsolete EntityWhitelist IsValid usages (#28465)

* Replace obsolete whitelist is valid with whitelist system

* Consistency

* Fix logic

* Bork

* I figured out how to get whitelists on the client lol

* test fail

* woops

* HELP ME FUNCTIONS

* Fix errors

* simplify

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
Plykiya
2024-06-01 20:10:24 -07:00
committed by GitHub
parent dce68e48e8
commit d6ba166d3b
31 changed files with 186 additions and 56 deletions

View File

@@ -2,6 +2,7 @@ using Content.Shared.Containers.ItemSlots;
using Content.Shared.Shuttles.BUIStates;
using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.UI.MapObjects;
using Content.Shared.Whitelist;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Collision.Shapes;
@@ -15,6 +16,7 @@ public abstract partial class SharedShuttleSystem : EntitySystem
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
[Dependency] protected readonly SharedMapSystem Maps = default!;
[Dependency] protected readonly SharedTransformSystem XformSystem = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
public const float FTLRange = 512f;
public const float FTLBufferRange = 8f;
@@ -83,7 +85,7 @@ public abstract partial class SharedShuttleSystem : EntitySystem
if (HasComp<FTLMapComponent>(mapUid))
return false;
return destination.Whitelist?.IsValid(shuttleUid, EntityManager) != false;
return _whitelistSystem.IsWhitelistPassOrNull(destination.Whitelist, shuttleUid);
}
/// <summary>