diff --git a/Content.Server/Maps/TileSystem.cs b/Content.Server/Maps/TileSystem.cs index ceaadc6773..e4ce95eaf0 100644 --- a/Content.Server/Maps/TileSystem.cs +++ b/Content.Server/Maps/TileSystem.cs @@ -26,8 +26,13 @@ public sealed class TileSystem : EntitySystem var tileRef = grid.GetTileRef(indices); return PryTile(tileRef); } + + public bool PryTile(TileRef tileRef) + { + return PryTile(tileRef, false); + } - public bool PryTile(TileRef tileRef) + public bool PryTile(TileRef tileRef, bool pryPlating) { var tile = tileRef.Tile; @@ -36,7 +41,7 @@ public sealed class TileSystem : EntitySystem var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.TypeId]; - if (!tileDef.CanCrowbar) + if (!tileDef.CanCrowbar && !(pryPlating && tileDef.CanAxe)) return false; return DeconstructTile(tileRef); diff --git a/Content.Server/Tools/Components/TilePryingComponent.cs b/Content.Server/Tools/Components/TilePryingComponent.cs index 82566e3559..d6d028252e 100644 --- a/Content.Server/Tools/Components/TilePryingComponent.cs +++ b/Content.Server/Tools/Components/TilePryingComponent.cs @@ -12,6 +12,12 @@ namespace Content.Server.Tools.Components [DataField("qualityNeeded", customTypeSerializer:typeof(PrototypeIdSerializer))] public string QualityNeeded = "Prying"; + + /// + /// Whether this tool can pry tiles with CanAxe. + /// + [DataField("advanced")] + public bool Advanced = false; [DataField("delay")] public float Delay = 1f; diff --git a/Content.Server/Tools/ToolSystem.TilePrying.cs b/Content.Server/Tools/ToolSystem.TilePrying.cs index 6637262ef0..6c524acff6 100644 --- a/Content.Server/Tools/ToolSystem.TilePrying.cs +++ b/Content.Server/Tools/ToolSystem.TilePrying.cs @@ -51,7 +51,7 @@ public sealed partial class ToolSystem $"{ToPrettyString(args.User):actor} pried {_tileDefinitionManager[tile.Tile.TypeId].Name} at {center}"); } - _tile.PryTile(tile); + _tile.PryTile(tile, component.Advanced); } private bool TryPryTile(EntityUid toolEntity, EntityUid user, TilePryingComponent component, EntityCoordinates clickLocation) @@ -71,7 +71,7 @@ public sealed partial class ToolSystem var tileDef = (ContentTileDefinition)_tileDefinitionManager[tile.Tile.TypeId]; - if (!tileDef.CanCrowbar) + if (!tileDef.CanCrowbar && !(tileDef.CanAxe && component.Advanced)) return false; var ev = new TilePryingDoAfterEvent(coordinates); diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index 6739fb2335..b672b2ec7f 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -37,6 +37,11 @@ namespace Content.Shared.Maps public string BaseTurf { get; } = string.Empty; [DataField("canCrowbar")] public bool CanCrowbar { get; private set; } + + /// + /// Whether this tile can be pried by an advanced prying tool if not pryable otherwise. + /// + [DataField("canAxe")] public bool CanAxe { get; private set; } [DataField("canWirecutter")] public bool CanWirecutter { get; private set; } diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml index 7134b51e45..9e747328f9 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml @@ -37,6 +37,7 @@ qualities: - Prying - type: TilePrying + advanced: true - type: entity id: FireAxeFlaming diff --git a/Resources/Prototypes/Tiles/plating.yml b/Resources/Prototypes/Tiles/plating.yml index e790e98c6f..9506c45e55 100644 --- a/Resources/Prototypes/Tiles/plating.yml +++ b/Resources/Prototypes/Tiles/plating.yml @@ -4,6 +4,7 @@ sprite: /Textures/Tiles/plating.png baseTurf: Lattice isSubfloor: true + canAxe: true footstepSounds: collection: FootstepPlating friction: 0.3