diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index 6cc6018966..26f420fae0 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -17,7 +17,6 @@ using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Player; -using Content.Shared.Hands.Components; using System.Linq; using Content.Shared.Tools.Components; @@ -294,6 +293,9 @@ public sealed class DoorSystem : SharedDoorSystem { if(TryComp(uid, out var airlockComponent)) { + if (airlockComponent.BoltsDown || !airlockComponent.IsPowered()) + return; + if (door.State == DoorState.Closed) { SetState(uid, DoorState.Emagging, door); diff --git a/Content.Server/Emag/EmagSystem.cs b/Content.Server/Emag/EmagSystem.cs index 5752fe01e4..8cb0a90139 100644 --- a/Content.Server/Emag/EmagSystem.cs +++ b/Content.Server/Emag/EmagSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Emag.Components; using Content.Shared.Emag.Systems; using Content.Shared.Interaction; using Content.Shared.Popups; +using Content.Shared.Tag; using Robust.Shared.Player; namespace Content.Server.Emag @@ -13,6 +14,8 @@ namespace Content.Server.Emag [Dependency] private readonly SharedPopupSystem _popupSystem = default!; [Dependency] private readonly SharedAdminLogSystem _adminLog = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; + public override void Initialize() { base.Initialize(); @@ -49,6 +52,9 @@ namespace Content.Server.Emag if (!args.CanReach || args.Target == null) return; + if (_tagSystem.HasTag(args.Target.Value, "EmagImmune")) + return; + if (component.Charges <= 0) { _popupSystem.PopupEntity(Loc.GetString("emag-no-charges"), args.User, Filter.Entities(args.User)); diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml index 8826d10649..f7f5da7de9 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml @@ -222,6 +222,9 @@ radius: 1.5 energy: 1.6 color: "#3c5eb5" + - type: Tag + tags: + - EmagImmune - type: entity parent: ComputerBase diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 4edcb7aa4f..b3163bd049 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -129,6 +129,9 @@ - type: Tag id: Egg +- type: Tag + id: EmagImmune + - type: Tag id: EmitterBolt