HAMTR mech (hamster mech) (needs review) (#16393)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Mech.Components;
|
||||
using Content.Server.Power.Components;
|
||||
@@ -11,6 +11,7 @@ using Content.Shared.Mech;
|
||||
using Content.Shared.Mech.Components;
|
||||
using Content.Shared.Mech.EntitySystems;
|
||||
using Content.Shared.Movement.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Wires;
|
||||
@@ -31,6 +32,7 @@ public sealed class MechSystem : SharedMechSystem
|
||||
[Dependency] private readonly IMapManager _map = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
@@ -218,6 +220,12 @@ public sealed class MechSystem : SharedMechSystem
|
||||
if (args.Cancelled || args.Handled)
|
||||
return;
|
||||
|
||||
if (component.PilotWhitelist != null && !component.PilotWhitelist.IsValid(args.User))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("mech-no-enter", ("item", uid)), args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
TryInsert(uid, args.Args.User, component);
|
||||
_actionBlocker.UpdateCanMove(uid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user