Replace obsolete EntityWhitelist IsValid usages part 2 (#28506)
This commit is contained in:
@@ -22,6 +22,7 @@ using Robust.Server.Containers;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using Content.Shared.Whitelist;
|
||||
|
||||
namespace Content.Server.Mech.Systems;
|
||||
|
||||
@@ -36,6 +37,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
||||
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
[Dependency] private readonly SharedToolSystem _toolSystem = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -224,7 +226,7 @@ public sealed partial class MechSystem : SharedMechSystem
|
||||
if (args.Cancelled || args.Handled)
|
||||
return;
|
||||
|
||||
if (component.PilotWhitelist != null && !component.PilotWhitelist.IsValid(args.User))
|
||||
if (_whitelistSystem.IsWhitelistFail(component.PilotWhitelist, args.User))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("mech-no-enter", ("item", uid)), args.User);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user