]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
prevent from prying blast doors (#16077)
authorSlava0135 <40753025+Slava0135@users.noreply.github.com>
Fri, 5 May 2023 13:16:23 +0000 (16:16 +0300)
committerGitHub <noreply@github.com>
Fri, 5 May 2023 13:16:23 +0000 (23:16 +1000)
Content.Server/Doors/Systems/DoorSystem.cs
Content.Shared/Doors/Components/DoorComponent.cs
Resources/Prototypes/Entities/Structures/Doors/Shutter/blast_door.yml

index e35ef5c9da48b2c3d7603301f72916ed5ff19991..7b34a3c08be968ad174b2e3e4dbdcc25edf33e18 100644 (file)
@@ -185,7 +185,7 @@ public sealed class DoorSystem : SharedDoorSystem
             var canEv = new BeforeDoorPryEvent(user, tool);
             RaiseLocalEvent(target, canEv, false);
 
-            if (canEv.Cancelled)
+            if (!door.CanPry || canEv.Cancelled)
                 // mark handled, as airlock component will cancel after generating a pop-up & you don't want to pry a tile
                 // under a windoor.
                 return true;
index 242d8f243db6a5e9c9c4706ee02f8560d9a91195..2be28ab5c4585aa3641c37b62ac42af4c793b418 100644 (file)
@@ -262,13 +262,16 @@ public sealed class DoorComponent : Component
     }
     #endregion
 
+    [DataField("canPry"), ViewVariables(VVAccess.ReadWrite)]
+    public bool CanPry = true;
+
     [DataField("pryingQuality", customTypeSerializer: typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
     public string PryingQuality = "Prying";
 
     /// <summary>
     /// Default time that the door should take to pry open.
     /// </summary>
-    [DataField("pryTime")]
+    [DataField("pryTime"), ViewVariables(VVAccess.ReadWrite)]
     public float PryTime = 1.5f;
 
     [DataField("changeAirtight")]
index b43222016fd2685490dc5e429bb4ce10f43731ca..02259ebcaa5cd1bc3d599a3284c3bb487e125b74 100644 (file)
@@ -17,7 +17,7 @@
     openTimeTwo: 0.4
     openingAnimationTime: 1.0
     closingAnimationTime: 1.0
-    pryTime: -1
+    canPry: false
     crushDamage:
       types:
         Blunt: 25 # yowch