From 48c7e71853887f29de7e77d399044a713d9608c9 Mon Sep 17 00:00:00 2001 From: FN Date: Tue, 30 Apr 2024 20:54:42 +0700 Subject: [PATCH] Fix TileSystem.PryTile --- Content.Shared/Maps/ContentTileDefinition.cs | 2 ++ Content.Shared/Maps/TileSystem.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index a0c2ead1863..b925488259e 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -45,6 +45,8 @@ public sealed partial class ContentTileDefinition : IPrototype, IInheritingProto [DataField] public PrototypeFlags DeconstructTools { get; set; } = new(); + public bool CanCrowbar => DeconstructTools.Contains(PryingToolQuality); + // Delta V [DataField("canShovel")] public bool CanShovel { get; private set; } //Delta V diff --git a/Content.Shared/Maps/TileSystem.cs b/Content.Shared/Maps/TileSystem.cs index 87b2720cad5..d6006ac61a6 100644 --- a/Content.Shared/Maps/TileSystem.cs +++ b/Content.Shared/Maps/TileSystem.cs @@ -100,6 +100,9 @@ public bool PryTile(TileRef tileRef, bool pryPlating) var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.TypeId]; + if (!tileDef.CanCrowbar) + return false; + return DeconstructTile(tileRef); } // Delta V