From 370f4e140dbc06818d2d1c68866fb3f358f045ea Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 13 Oct 2019 16:56:43 +0200 Subject: [PATCH] Using crowbar on powered airlock returns true on attackby. Fixes #388 --- .../GameObjects/Components/Doors/AirlockComponent.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs index 400ac3f4a9..653aa71a7f 100644 --- a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Interactable.Tools; using Content.Server.GameObjects.Components.Power; using Content.Server.GameObjects.Components.VendingMachines; using Content.Server.GameObjects.EntitySystems; +using Content.Server.Interfaces; using Content.Shared.GameObjects.Components.Doors; using Robust.Server.GameObjects; using Robust.Server.Interfaces.GameObjects; @@ -194,8 +195,15 @@ namespace Content.Server.GameObjects.Components.Doors public bool AttackBy(AttackByEventArgs eventArgs) { - if (eventArgs.AttackWith.HasComponent() && !IsPowered()) + if (eventArgs.AttackWith.HasComponent()) { + if (IsPowered()) + { + var notify = IoCManager.Resolve(); + notify.PopupMessage(Owner, eventArgs.User, "The powered motors block your efforts!"); + return true; + } + if (State == DoorState.Closed) { Open();