]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Generalize tile prying to any tool quality (#24432)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Tue, 23 Jan 2024 07:45:40 +0000 (02:45 -0500)
committerGitHub <noreply@github.com>
Tue, 23 Jan 2024 07:45:40 +0000 (23:45 -0800)
* Generalize tile prying to any tool quality

* ballin

22 files changed:
Content.Server/Interaction/TilePryCommand.cs
Content.Server/Tools/Components/LatticeCuttingComponent.cs [deleted file]
Content.Server/Tools/ToolSystem.LatticeCutting.cs [deleted file]
Content.Server/Tools/ToolSystem.Welder.cs
Content.Server/Tools/ToolSystem.cs
Content.Shared/Maps/ContentTileDefinition.cs
Content.Shared/Maps/TileSystem.cs
Content.Shared/Tools/Components/TilePryingComponent.cs [deleted file]
Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs [new file with mode: 0644]
Content.Shared/Tools/Systems/SharedToolSystem.MultipleTool.cs
Content.Shared/Tools/Systems/SharedToolSystem.Tile.cs [new file with mode: 0644]
Content.Shared/Tools/Systems/SharedToolSystem.TilePrying.cs [deleted file]
Content.Shared/Tools/Systems/SharedToolSystem.cs
Resources/Prototypes/Entities/Debugging/spanisharmyknife.yml
Resources/Prototypes/Entities/Objects/Tools/cowtools.yml
Resources/Prototypes/Entities/Objects/Tools/jaws_of_life.yml
Resources/Prototypes/Entities/Objects/Tools/tools.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml
Resources/Prototypes/Tiles/floors.yml
Resources/Prototypes/Tiles/planet.yml
Resources/Prototypes/Tiles/plating.yml
Resources/Prototypes/XenoArch/Effects/utility_effects.yml

index fa75b6d9e4777b4d259d8577eaabd123ae3539be..57b07e8181b201a835fa8232714d570d8b0cb58e 100644 (file)
@@ -7,9 +7,6 @@ using Robust.Shared.Map;
 
 namespace Content.Server.Interaction
 {
-    /// <summary>
-    /// <see cref="Shared.Tools.Components.TilePryingComponent.TryPryTile"/>
-    /// </summary>
     [AdminCommand(AdminFlags.Debug)]
     sealed class TilePryCommand : IConsoleCommand
     {
diff --git a/Content.Server/Tools/Components/LatticeCuttingComponent.cs b/Content.Server/Tools/Components/LatticeCuttingComponent.cs
deleted file mode 100644 (file)
index 077d64c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-using Content.Shared.Tools;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
-
-namespace Content.Server.Tools.Components;
-
-[RegisterComponent]
-public sealed partial class LatticeCuttingComponent : Component
-{
-    [DataField("qualityNeeded", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
-    public string QualityNeeded = "Cutting";
-
-    [DataField("delay")]
-    public float Delay = 1f;
-
-    [DataField("vacuumDelay")]
-    public float VacuumDelay = 1.75f;
-}
diff --git a/Content.Server/Tools/ToolSystem.LatticeCutting.cs b/Content.Server/Tools/ToolSystem.LatticeCutting.cs
deleted file mode 100644 (file)
index ab289c1..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-using Content.Server.Administration.Logs;
-using Content.Server.Maps;
-using Content.Server.Tools.Components;
-using Content.Shared.Database;
-using Content.Shared.DoAfter;
-using Content.Shared.Interaction;
-using Content.Shared.Maps;
-using Content.Shared.Tools.Components;
-using Robust.Shared.Map;
-
-namespace Content.Server.Tools;
-
-public sealed partial class ToolSystem
-{
-    [Dependency] private readonly IAdminLogManager _adminLogger = default!;
-    [Dependency] private readonly TileSystem _tile = default!;
-
-    private void InitializeLatticeCutting()
-    {
-        SubscribeLocalEvent<LatticeCuttingComponent, AfterInteractEvent>(OnLatticeCuttingAfterInteract);
-        SubscribeLocalEvent<LatticeCuttingComponent, LatticeCuttingCompleteEvent>(OnLatticeCutComplete);
-    }
-
-    private void OnLatticeCutComplete(EntityUid uid, LatticeCuttingComponent component, LatticeCuttingCompleteEvent args)
-    {
-        if (args.Cancelled)
-            return;
-
-        var coords = GetCoordinates(args.Coordinates);
-        var gridUid = coords.GetGridUid(EntityManager);
-        if (gridUid == null)
-            return;
-        var grid = _mapManager.GetGrid(gridUid.Value);
-        var tile = grid.GetTileRef(coords);
-
-        if (_tileDefinitionManager[tile.Tile.TypeId] is not ContentTileDefinition tileDef
-            || !tileDef.CanWirecutter
-            || string.IsNullOrEmpty(tileDef.BaseTurf)
-            || tile.IsBlockedTurf(true))
-            return;
-
-        _tile.CutTile(tile);
-        _adminLogger.Add(LogType.LatticeCut, LogImpact.Medium, $"{ToPrettyString(args.User):user} cut the lattice at {args.Coordinates:target}");
-    }
-
-    private void OnLatticeCuttingAfterInteract(EntityUid uid, LatticeCuttingComponent component,
-        AfterInteractEvent args)
-    {
-        if (args.Handled || !args.CanReach || args.Target != null)
-            return;
-
-        if (TryCut(uid, args.User, component, args.ClickLocation))
-            args.Handled = true;
-    }
-
-    private bool TryCut(EntityUid toolEntity, EntityUid user, LatticeCuttingComponent component, EntityCoordinates clickLocation)
-    {
-        if (!_mapManager.TryFindGridAt(clickLocation.ToMap(EntityManager, _transformSystem), out _, out var mapGrid))
-            return false;
-
-        var tile = mapGrid.GetTileRef(clickLocation);
-
-        var coordinates = mapGrid.GridTileToLocal(tile.GridIndices);
-
-        if (!InteractionSystem.InRangeUnobstructed(user, coordinates, popup: false))
-            return false;
-
-        if (_tileDefinitionManager[tile.Tile.TypeId] is not ContentTileDefinition tileDef
-            || !tileDef.CanWirecutter
-            || string.IsNullOrEmpty(tileDef.BaseTurf)
-            || _tileDefinitionManager[tileDef.BaseTurf] is not ContentTileDefinition ||
-            tile.IsBlockedTurf(true))
-        {
-            return false;
-        }
-
-        var ev = new LatticeCuttingCompleteEvent(GetNetCoordinates(coordinates));
-        return UseTool(toolEntity, user, toolEntity, component.Delay, component.QualityNeeded, ev);
-    }
-}
-
index 6f8fb54d721c48ba5341e5892ade2ef3c98764e0..98e29c763a80192978e10e595d185c94c3dce371 100644 (file)
@@ -70,7 +70,7 @@ namespace Content.Server.Tools
             _solutionContainer.RemoveReagent(entity.Comp.FuelSolution.Value, entity.Comp.FuelReagent, entity.Comp.FuelLitCost);
 
             // Logging
-            _adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(entity.Owner):welder} on");
+            AdminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(entity.Owner):welder} on");
 
             _ignitionSource.SetIgnited(entity.Owner);
 
@@ -88,7 +88,7 @@ namespace Content.Server.Tools
         public void TurnOff(Entity<WelderComponent> entity, ref ItemToggleDeactivateAttemptEvent args)
         {
             // Logging
-            _adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(entity.Owner):welder} off");
+            AdminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(entity.Owner):welder} off");
 
             _ignitionSource.SetIgnited(entity.Owner, false);
 
index 6153b579a1bc8e3440ff3eef33c3a2ee2f994ce3..7bae177892336da5d23f1ed9d9029f79a16eef95 100644 (file)
@@ -4,7 +4,6 @@ using Content.Server.Popups;
 using Content.Server.Tools.Components;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio.Systems;
-using Robust.Shared.Map;
 
 using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
 
@@ -13,13 +12,9 @@ namespace Content.Server.Tools
     // TODO move tool system to shared, and make it a friend of Tool Component.
     public sealed partial class ToolSystem : SharedToolSystem
     {
-        [Dependency] private readonly IMapManager _mapManager = default!;
-        [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
-        [Dependency] private readonly AppearanceSystem _appearanceSystem = default!;
         [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
         [Dependency] private readonly PopupSystem _popup = default!;
         [Dependency] private readonly SharedAudioSystem _audio = default!;
-        [Dependency] private readonly SharedPointLightSystem _light = default!;
         [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
         [Dependency] private readonly TransformSystem _transformSystem = default!;
 
@@ -27,7 +22,6 @@ namespace Content.Server.Tools
         {
             base.Initialize();
 
-            InitializeLatticeCutting();
             InitializeWelders();
         }
 
index f3a26a359f9d8a8194c96999471601dd1ac9ead6..40f337b129820dae3adc4a61b02258b61d5f5515 100644 (file)
@@ -1,5 +1,6 @@
 using Content.Shared.Atmos;
 using Content.Shared.Movement.Systems;
+using Content.Shared.Tools;
 using Robust.Shared.Audio;
 using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
@@ -12,6 +13,9 @@ namespace Content.Shared.Maps
     [Prototype("tile")]
     public sealed partial class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
     {
+        [ValidatePrototypeId<ToolQualityPrototype>]
+        public const string PryingToolQuality = "Prying";
+
         public const string SpaceID = "Space";
 
         [ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<ContentTileDefinition>))]
@@ -38,14 +42,13 @@ namespace Content.Shared.Maps
         [DataField("baseTurf")]
         public string BaseTurf { get; private set; } = string.Empty;
 
-        [DataField("canCrowbar")] public bool CanCrowbar { get; private set; }
-
-        /// <summary>
-        /// Whether this tile can be pried by an advanced prying tool if not pryable otherwise.
-        /// </summary>
-        [DataField("canAxe")] public bool CanAxe { get; private set; }
+        [DataField]
+        public PrototypeFlags<ToolQualityPrototype> DeconstructTools { get; set; } = new();
 
-        [DataField("canWirecutter")] public bool CanWirecutter { get; private set; }
+        /// <remarks>
+        /// Legacy AF but nice to have.
+        /// </remarks>
+        public bool CanCrowbar => DeconstructTools.Contains(PryingToolQuality);
 
         /// <summary>
         /// These play when the mob has shoes on.
index 2c09375d593cb743409f13cc4fec143f3a8fbbc1..51a5d4b85ab5cac17838b92d9f379fbd03965daf 100644 (file)
@@ -65,22 +65,7 @@ public sealed class TileSystem : EntitySystem
 
         var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.TypeId];
 
-        if (!tileDef.CanCrowbar && !(pryPlating && tileDef.CanAxe))
-            return false;
-
-        return DeconstructTile(tileRef);
-    }
-
-    public bool CutTile(TileRef tileRef)
-    {
-        var tile = tileRef.Tile;
-
-        if (tile.IsEmpty)
-            return false;
-
-        var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.TypeId];
-
-        if (!tileDef.CanWirecutter)
+        if (!tileDef.CanCrowbar)
             return false;
 
         return DeconstructTile(tileRef);
@@ -112,7 +97,7 @@ public sealed class TileSystem : EntitySystem
         return true;
     }
 
-    private bool DeconstructTile(TileRef tileRef)
+    public bool DeconstructTile(TileRef tileRef)
     {
         if (tileRef.Tile.IsEmpty)
             return false;
diff --git a/Content.Shared/Tools/Components/TilePryingComponent.cs b/Content.Shared/Tools/Components/TilePryingComponent.cs
deleted file mode 100644 (file)
index 4c123ca..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-using Robust.Shared.GameStates;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
-
-namespace Content.Shared.Tools.Components;
-
-/// <summary>
-/// Allows prying tiles up on a grid.
-/// </summary>
-[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
-public sealed partial class TilePryingComponent : Component
-{
-    [DataField("toolComponentNeeded"), AutoNetworkedField]
-    public bool ToolComponentNeeded = true;
-
-    [DataField("qualityNeeded", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>)), AutoNetworkedField]
-    public string QualityNeeded = "Prying";
-
-    /// <summary>
-    /// Whether this tool can pry tiles with CanAxe.
-    /// </summary>
-    [DataField("advanced"), AutoNetworkedField]
-    public bool Advanced = false;
-
-    [DataField("delay"), AutoNetworkedField]
-    public float Delay = 1f;
-}
diff --git a/Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs b/Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs
new file mode 100644 (file)
index 0000000..caac41a
--- /dev/null
@@ -0,0 +1,44 @@
+using Content.Shared.DoAfter;
+using Content.Shared.Tools.Systems;
+using Robust.Shared.GameStates;
+using Robust.Shared.Map;
+using Robust.Shared.Serialization;
+
+namespace Content.Shared.Tools.Components;
+
+/// <summary>
+/// This is used for entities with <see cref="ToolComponent"/> that are additionally
+/// able to modify tiles.
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+[Access(typeof(SharedToolSystem))]
+public sealed partial class ToolTileCompatibleComponent : Component
+{
+    /// <summary>
+    /// The time it takes to modify the tile.
+    /// </summary>
+    [DataField, ViewVariables(VVAccess.ReadWrite)]
+    public TimeSpan Delay = TimeSpan.FromSeconds(1);
+
+    /// <summary>
+    /// Whether or not the tile being modified must be unobstructed
+    /// </summary>
+    [DataField, ViewVariables(VVAccess.ReadWrite)]
+    public bool RequiresUnobstructed = true;
+}
+
+[Serializable, NetSerializable]
+public sealed partial class TileToolDoAfterEvent : DoAfterEvent
+{
+    public NetCoordinates Coordinates;
+
+    public TileToolDoAfterEvent(NetCoordinates coordinates)
+    {
+        Coordinates = coordinates;
+    }
+
+    public override DoAfterEvent Clone()
+    {
+        return this;
+    }
+}
index cb8830060a2d1223a5c4af8bb7585cd9a7b16c80..9114c62adeed9b60da66eabd603e92f78756fe79 100644 (file)
@@ -5,7 +5,7 @@ using Content.Shared.Tools.Components;
 
 namespace Content.Shared.Tools.Systems;
 
-public abstract partial class SharedToolSystem : EntitySystem
+public abstract partial class SharedToolSystem
 {
     public void InitializeMultipleTool()
     {
@@ -57,7 +57,7 @@ public abstract partial class SharedToolSystem : EntitySystem
         if (!Resolve(uid, ref multiple, ref tool))
             return;
 
-        Dirty(multiple);
+        Dirty(uid, multiple);
 
         if (multiple.Entries.Length <= multiple.CurrentEntry)
         {
diff --git a/Content.Shared/Tools/Systems/SharedToolSystem.Tile.cs b/Content.Shared/Tools/Systems/SharedToolSystem.Tile.cs
new file mode 100644 (file)
index 0000000..4ccdb2e
--- /dev/null
@@ -0,0 +1,103 @@
+using Content.Shared.Database;
+using Content.Shared.Fluids.Components;
+using Content.Shared.Interaction;
+using Content.Shared.Maps;
+using Content.Shared.Physics;
+using Content.Shared.Tools.Components;
+using Robust.Shared.Map;
+using Robust.Shared.Map.Components;
+using Robust.Shared.Network;
+using Robust.Shared.Utility;
+
+namespace Content.Shared.Tools.Systems;
+
+public abstract partial class SharedToolSystem
+{
+    [Dependency] private readonly INetManager _net = default!;
+
+    public void InitializeTile()
+    {
+        SubscribeLocalEvent<ToolTileCompatibleComponent, AfterInteractEvent>(OnToolTileAfterInteract);
+        SubscribeLocalEvent<ToolTileCompatibleComponent, TileToolDoAfterEvent>(OnToolTileComplete);
+    }
+
+    private void OnToolTileAfterInteract(Entity<ToolTileCompatibleComponent> ent, ref AfterInteractEvent args)
+    {
+        if (args.Handled || args.Target != null && !HasComp<PuddleComponent>(args.Target))
+            return;
+
+        args.Handled = UseToolOnTile((ent, ent, null), args.User, args.ClickLocation);
+    }
+
+    private void OnToolTileComplete(Entity<ToolTileCompatibleComponent> ent, ref TileToolDoAfterEvent args)
+    {
+        var comp = ent.Comp;
+        if (args.Handled || args.Cancelled)
+            return;
+
+        if (!TryComp<ToolComponent>(ent, out var tool))
+            return;
+        var coordinates = GetCoordinates(args.Coordinates);
+
+        var gridUid = coordinates.GetGridUid(EntityManager);
+        if (!TryComp<MapGridComponent>(gridUid, out var grid))
+        {
+            Log.Error("Attempted use tool on a non-existent grid?");
+            return;
+        }
+
+        var tileRef = _maps.GetTileRef(gridUid.Value, grid, coordinates);
+        if (comp.RequiresUnobstructed && _turfs.IsTileBlocked(gridUid.Value, tileRef.GridIndices, CollisionGroup.MobMask))
+            return;
+
+        if (!TryDeconstructWithToolQualities(tileRef, tool.Qualities))
+            return;
+
+        AdminLogger.Add(LogType.LatticeCut, LogImpact.Medium,
+                $"{ToPrettyString(args.User):player} used {ToPrettyString(ent)} to edit the tile at {args.Coordinates}");
+        args.Handled = true;
+    }
+
+    private bool UseToolOnTile(Entity<ToolTileCompatibleComponent?, ToolComponent?> ent, EntityUid user, EntityCoordinates clickLocation)
+    {
+        if (!Resolve(ent, ref ent.Comp1, ref ent.Comp2, false))
+            return false;
+
+        var comp = ent.Comp1!;
+        var tool = ent.Comp2!;
+
+        if (!_mapManager.TryFindGridAt(clickLocation.ToMap(EntityManager, _transformSystem), out var gridUid, out var mapGrid))
+            return false;
+
+        var tileRef = _maps.GetTileRef(gridUid, mapGrid, clickLocation);
+        var tileDef = (ContentTileDefinition) _tileDefManager[tileRef.Tile.TypeId];
+
+        if (!tool.Qualities.ContainsAny(tileDef.DeconstructTools))
+            return false;
+
+        if (string.IsNullOrWhiteSpace(tileDef.BaseTurf))
+            return false;
+
+        if (comp.RequiresUnobstructed && _turfs.IsTileBlocked(gridUid, tileRef.GridIndices, CollisionGroup.MobMask))
+            return false;
+
+        var coordinates = _maps.GridTileToLocal(gridUid, mapGrid, tileRef.GridIndices);
+        if (!InteractionSystem.InRangeUnobstructed(user, coordinates, popup: false))
+            return false;
+
+        var args = new TileToolDoAfterEvent(GetNetCoordinates(coordinates));
+        UseTool(ent, user, ent, comp.Delay, tool.Qualities, args, out _, toolComponent: tool);
+        return true;
+    }
+
+    public bool TryDeconstructWithToolQualities(TileRef tileRef, PrototypeFlags<ToolQualityPrototype> withToolQualities)
+    {
+        var tileDef = (ContentTileDefinition) _tileDefManager[tileRef.Tile.TypeId];
+        if (withToolQualities.ContainsAny(tileDef.DeconstructTools))
+        {
+            // don't do this on the client or else the tile entity spawn mispredicts and looks horrible
+            return _net.IsClient || _tiles.DeconstructTile(tileRef);
+        }
+        return false;
+    }
+}
diff --git a/Content.Shared/Tools/Systems/SharedToolSystem.TilePrying.cs b/Content.Shared/Tools/Systems/SharedToolSystem.TilePrying.cs
deleted file mode 100644 (file)
index 81592f5..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-using Content.Shared.Database;
-using Content.Shared.Fluids.Components;
-using Content.Shared.Interaction;
-using Content.Shared.Maps;
-using Content.Shared.Tools.Components;
-using Robust.Shared.Map;
-using Robust.Shared.Map.Components;
-
-namespace Content.Shared.Tools.Systems;
-
-public abstract partial class SharedToolSystem
-{
-    private void InitializeTilePrying()
-    {
-        SubscribeLocalEvent<TilePryingComponent, AfterInteractEvent>(OnTilePryingAfterInteract);
-        SubscribeLocalEvent<TilePryingComponent, TilePryingDoAfterEvent>(OnTilePryComplete);
-    }
-
-    private void OnTilePryingAfterInteract(EntityUid uid, TilePryingComponent component, AfterInteractEvent args)
-    {
-        if (args.Handled || !args.CanReach || args.Target != null && !HasComp<PuddleComponent>(args.Target))
-            return;
-
-        if (TryPryTile(uid, args.User, component, args.ClickLocation))
-            args.Handled = true;
-    }
-
-    private void OnTilePryComplete(EntityUid uid, TilePryingComponent component, TilePryingDoAfterEvent args)
-    {
-        if (args.Cancelled)
-            return;
-
-        var coords = GetCoordinates(args.Coordinates);
-        var gridUid = coords.GetGridUid(EntityManager);
-        if (!TryComp(gridUid, out MapGridComponent? grid))
-        {
-            Log.Error("Attempted to pry from a non-existent grid?");
-            return;
-        }
-
-        var tile = _maps.GetTileRef(gridUid.Value, grid, coords);
-        var center = _turfs.GetTileCenter(tile);
-
-        if (args.Used != null)
-        {
-            _adminLogger.Add(LogType.Tile, LogImpact.Low,
-                $"{ToPrettyString(args.User):actor} used {ToPrettyString(args.Used.Value):tool} to pry {_tileDefManager[tile.Tile.TypeId].Name} at {center}");
-        }
-        else
-        {
-            _adminLogger.Add(LogType.Tile, LogImpact.Low,
-                $"{ToPrettyString(args.User):actor} pried {_tileDefManager[tile.Tile.TypeId].Name} at {center}");
-        }
-
-        if (_netManager.IsServer)
-            _tiles.PryTile(tile, component.Advanced);
-    }
-
-    private bool TryPryTile(EntityUid toolEntity, EntityUid user, TilePryingComponent component, EntityCoordinates clickLocation)
-    {
-        if (!TryComp<ToolComponent>(toolEntity, out var tool) && component.ToolComponentNeeded)
-            return false;
-
-        if (!_mapManager.TryFindGridAt(clickLocation.ToMap(EntityManager, _transformSystem), out var gridUid, out var mapGrid))
-            return false;
-
-        var tile = _maps.GetTileRef(gridUid, mapGrid, clickLocation);
-        var coordinates = _maps.GridTileToLocal(gridUid, mapGrid, tile.GridIndices);
-
-        if (!InteractionSystem.InRangeUnobstructed(user, coordinates, popup: false))
-            return false;
-
-        var tileDef = (ContentTileDefinition) _tileDefManager[tile.Tile.TypeId];
-
-        if (!tileDef.CanCrowbar && !(tileDef.CanAxe && component.Advanced))
-            return false;
-
-        var ev = new TilePryingDoAfterEvent(GetNetCoordinates(coordinates));
-
-        return UseTool(toolEntity, user, toolEntity, component.Delay, component.QualityNeeded, ev, toolComponent: tool);
-    }
-}
index 91984d29e340f41358bc99b4dc6f937f252cccf4..a4f21ff466e9f36d8200ab3c763baeed43898274 100644 (file)
@@ -3,10 +3,8 @@ using Content.Shared.DoAfter;
 using Content.Shared.Interaction;
 using Content.Shared.Maps;
 using Content.Shared.Tools.Components;
-using Robust.Shared.Audio;
 using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
-using Robust.Shared.Network;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization;
 using Robust.Shared.Utility;
@@ -16,9 +14,8 @@ namespace Content.Shared.Tools.Systems;
 public abstract partial class SharedToolSystem : EntitySystem
 {
     [Dependency] private   readonly IMapManager _mapManager = default!;
-    [Dependency] private   readonly INetManager _netManager = default!;
     [Dependency] private   readonly IPrototypeManager _protoMan = default!;
-    [Dependency] private   readonly ISharedAdminLogManager _adminLogger = default!;
+    [Dependency] protected   readonly ISharedAdminLogManager AdminLogger = default!;
     [Dependency] private   readonly ITileDefinitionManager _tileDefManager = default!;
     [Dependency] private   readonly SharedAudioSystem _audioSystem = default!;
     [Dependency] private   readonly SharedDoAfterSystem _doAfterSystem = default!;
@@ -31,7 +28,7 @@ public abstract partial class SharedToolSystem : EntitySystem
     public override void Initialize()
     {
         InitializeMultipleTool();
-        InitializeTilePrying();
+        InitializeTile();
         SubscribeLocalEvent<ToolComponent, ToolDoAfterEvent>(OnDoAfter);
     }
 
@@ -151,8 +148,6 @@ public abstract partial class SharedToolSystem : EntitySystem
     /// <param name="toolQualityNeeded">The quality needed for this tool to work.</param>
     /// <param name="doAfterEv">The event that will be raised when the tool has finished (including cancellation). Event
     /// will be directed at the tool target.</param>
-    /// <param name="id">The id of the DoAfter that was created. This may be null even if the function returns true in
-    /// the event that this tool-use cancelled an existing DoAfter</param>
     /// <param name="toolComponent">The tool component.</param>
     /// <returns>Returns true if any interaction takes place.</returns>
     public bool UseTool(
index 94464f2535debeeac79e464da0bd87135e7212ec..b7fb1188ccd6d8f681438596f761645b48c9a8d1 100644 (file)
@@ -20,7 +20,7 @@
     damage:
       types:
         Slash: 10
-  - type: TilePrying
+  - type: ToolTileCompatible
   - type: Tool
     qualities:
       - Prying
index 05a80043e81d8e6bcb724398899c44756b3a2e0f..286078ae87f917010706040d7391b6b8df18c84f 100644 (file)
@@ -93,7 +93,7 @@
     useSound:
       path: /Audio/Items/crowbar.ogg
     speed: 0.05
-  - type: TilePrying
+  - type: ToolTileCompatible
   - type: Prying
 
 - type: entity
index 2a35e4dc07e667d7c260264fc49aee3913cad8ae..2c644591715af3d6a3dfa49638a74219a7226100 100644 (file)
@@ -17,8 +17,7 @@
     quickEquip: false
     slots:
       - Belt
-  - type: TilePrying
-  - type: LatticeCutting
+  - type: ToolTileCompatible
   - type: Tool
     qualities:
       - Prying
index 216deefcd02d30e253c6953d190f0cc9a55f02b0..619324a2f2c0ff54244200734ca40ae953389abc 100644 (file)
@@ -37,7 +37,7 @@
   - type: Item
     sprite: Objects/Tools/wirecutters.rsi
     storedRotation: -90
-  - type: LatticeCutting
+  - type: ToolTileCompatible
   - type: PhysicalComposition
     materialComposition:
       Steel: 100
       - Prying
     useSound:
       path: /Audio/Items/crowbar.ogg
-  - type: TilePrying
+  - type: ToolTileCompatible
   - type: PhysicalComposition
     materialComposition:
       Steel: 100
   - type: Tag
     tags:
     - Multitool
-  - type: TilePrying
   - type: Prying
     enabled: false
   - type: Tool
       - Screwing
     speed: 1.2 # Kept for future adjustments. Currently 1.2x for balance
     useSound: /Audio/Items/drill_use.ogg
-  - type: LatticeCutting
+  - type: ToolTileCompatible
   - type: MultipleTool
     statusShowBehavior: true
     entries:
index 7384ae487b051a9547af30ce9b223261adfd8ff5..b46ee096336039820b600a998bcd1c770b6eb33e 100644 (file)
@@ -37,7 +37,7 @@
   - type: Tool
     qualities:
       - Prying
-  - type: TilePrying
+  - type: ToolTileCompatible
   - type: Prying
   - type: UseDelay
     delay: 1
index 3a80bdddc4eeef8f06d380c7fd1de0287d3ffe63..d265aa843d55c28f905769fbf3ab53f47c91ce53 100644 (file)
@@ -10,7 +10,7 @@
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel
@@ -28,7 +28,7 @@
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteelCheckerLight
@@ -46,7 +46,7 @@
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteelCheckerDark
@@ -64,7 +64,7 @@
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel
@@ -82,7 +82,7 @@
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel
   sprite: /Textures/Tiles/steel_offset.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepWood
   barestepSounds:
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   sprite: /Textures/Tiles/white_offset.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemWhite
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   sprite: /Textures/Tiles/dark_offset.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemDark
   sprite: /Textures/Tiles/tech_maint.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemTechmaint
   sprite: /Textures/Tiles/reinforced.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemReinforced
   sprite: /Textures/Tiles/mono.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemMono
   sprite: /Textures/Tiles/lino.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemLino
   sprite: /Textures/Tiles/steel_dirty.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepPlating
   itemDrop: FloorTileItemDirty
   sprite: /Textures/Tiles/elevator_shaft.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemElevatorShaft
   sprite: /Textures/Tiles/metaldiamond.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemMetalDiamond
   sprite: /Textures/Tiles/rock_vault.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepAsteroid
   itemDrop: FloorTileItemRockVault
   sprite: /Textures/Tiles/blue.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemBlue
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemLime
   sprite: /Textures/Tiles/mining_floor.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemMining
   sprite: /Textures/Tiles/mining_floor_dark.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemMiningDark
   sprite: /Textures/Tiles/mining_floor_light.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemMiningLight
   sprite: /Textures/Tiles/freezer.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemFreezer
   sprite: /Textures/Tiles/showroom.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemShowroom
   sprite: /Textures/Tiles/hydro.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemHydro
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemBar
   sprite: /Textures/Tiles/clown.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemClown
   sprite: /Textures/Tiles/mime.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemMime
   sprite: /Textures/Tiles/kitchen.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemKitchen
   sprite: /Textures/Tiles/laundry.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemLaundry
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel #This should probably be made null when it becomes possible to make it such, in SS13 prying destroyed tiles wouldn't give you anything.
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemSteel #Same case as FloorSteelDamaged, make it null when possible
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemGrayConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemGrayConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemGrayConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemOldConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemOldConcrete
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemOldConcrete
   sprite: /Textures/Tiles/arcadeblue.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   sprite: /Textures/Tiles/arcadeblue2.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   sprite: /Textures/Tiles/arcadered.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   sprite: /Textures/Tiles/eighties.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   sprite: /Textures/Tiles/carpetclown.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   sprite: /Textures/Tiles/carpetoffice.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   friction: 0.25
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   friction: 0.25
   sprite: /Textures/Tiles/shuttlewhite.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemShuttleWhite
   sprite: /Textures/Tiles/shuttleblue.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemShuttleBlue
   sprite: /Textures/Tiles/shuttleorange.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemShuttleOrange
   sprite: /Textures/Tiles/shuttlepurple.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemShuttlePurple
   sprite: /Textures/Tiles/shuttlered.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepFloor
   itemDrop: FloorTileItemShuttleRed
   sprite: /Textures/Tiles/gold.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemGold
   sprite: /Textures/Tiles/silver.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: FloorTileItemSilver
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: SheetGlass1
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepTile
   itemDrop: SheetRGlass1
   sprite: /Textures/Tiles/green_circuit.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemGCircuit
   sprite: /Textures/Tiles/blue_circuit.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemBCircuit
   - 1.0
   baseTurf: FloorDirt
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepTile
   heatCapacity: 10000
   sprite: /Textures/Tiles/grass.png
   baseTurf: FloorDirt
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepGrass
   itemDrop: FloorTileItemGrass
   sprite: /Textures/Tiles/grassjungle.png
   baseTurf: FloorDirt
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepGrass
   itemDrop: FloorTileItemGrassJungle
   - 1.0
   baseTurf: FloorDirt
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepGrass
   heatCapacity: 10000
   - 1.0
   baseTurf: FloorDirt
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepGrass
   heatCapacity: 10000
   - 1.0
   baseTurf: Plating
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   - 0.0116
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   sprite: /Textures/Tiles/Asteroid/asteroid_dug.png
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   - 0.0116
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   sprite: /Textures/Tiles/Asteroid/asteroid_tile.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   - 1.0
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   sprite: /Textures/Tiles/Asteroid/asteroid0.png
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   sprite: /Textures/Tiles/Asteroid/ironsand0.png
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   - 1.0
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   - 1.0
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepBlood
   itemDrop: FloorTileItemFlesh
   sprite: /Textures/Tiles/steel_maint.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemSteelMaint
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemGratingMaint
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepWood
   barestepSounds:
   - 1.0
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepWood
   barestepSounds:
   sprite: /Textures/Tiles/Misc/Web/web_tile.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepCarpet
   barestepSounds:
   - 1.0
   baseTurf: Space
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
   sprite: /Textures/Tiles/hull.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: false
-  canAxe: false #You can't RCD these in SS13 apparently, so this is probably the next best thing
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemSteel #probably should not be normally obtainable, but the game shits itself and dies when you try to put null here
   sprite: /Textures/Tiles/hull_reinforced.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: false
-  canAxe: false
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemSteel
   sprite: /Textures/Tiles/super_reinforced.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: false
-  canAxe: false
   footstepSounds:
     collection: FootstepHull
   itemDrop: FloorTileItemReinforced #same case as FloorHull
     West: /Textures/Tiles/Planet/Grass/double_edge.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   footstepSounds:
     collection: FootstepGrass
   itemDrop: FloorTileItemAstroGrass
   sprite: /Textures/Tiles/Planet/Snow/ice.png
   baseTurf: Plating
   isSubfloor: false
-  canCrowbar: true
+  deconstructTools: [ Prying ]
   friction: 0.05
   heatCapacity: 10000
   mobFriction: 0.5
index c5095eb5d0a26efc0b60aa90f632c0db7bdf1f66..5a158bdcfc84231fe35a3448043b5eb5ba8bdb0f 100644 (file)
@@ -3,7 +3,6 @@
   name: tiles-dirt-floor
   sprite: /Textures/Tiles/Planet/dirt.rsi/dirt.png
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
@@ -24,7 +23,6 @@
   - 1.0
   - 1.0
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
@@ -44,7 +42,6 @@
   - 1.0
   - 1.0
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
@@ -74,7 +71,6 @@
     West: /Textures/Tiles/Planet/Grass/double_edge.png
   baseTurf: FloorPlanetDirt
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepGrass
   itemDrop: FloorTileItemGrass
@@ -88,7 +84,6 @@
   name: tiles-basalt-floor
   sprite: /Textures/Tiles/Planet/basalt.png
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepAsteroid
   heatCapacity: 10000
     North: /Textures/Tiles/Planet/Snow/snow_double_edge_north.png
     West: /Textures/Tiles/Planet/Snow/snow_double_edge_west.png
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepSnow
   heatCapacity: 10000
   name: tiles-ice
   sprite: /Textures/Tiles/Planet/Snow/ice.png
   isSubfloor: true
-  canCrowbar: false
   friction: 0.05
   heatCapacity: 10000
   weather: true
     North: /Textures/Tiles/Planet/Snow/snow_dug_double_edge_north.png
     West: /Textures/Tiles/Planet/Snow/snow_dug_double_edge_west.png
   isSubfloor: true
-  canCrowbar: false
   footstepSounds:
     collection: FootstepSnow
   heatCapacity: 10000
index 7cf841eec092b2522385d63a4ef6ecebe8d55eac..3164e77fd22bd51454d9e31eaa1fe54b4764eedc 100644 (file)
@@ -4,7 +4,6 @@
   sprite: /Textures/Tiles/plating.png
   baseTurf: Lattice
   isSubfloor: true
-  canAxe: true
   footstepSounds:
     collection: FootstepPlating
   friction: 0.3
@@ -21,7 +20,6 @@
   - 1.0
   baseTurf: Lattice
   isSubfloor: true
-  canAxe: true
   footstepSounds:
     collection: FootstepPlating
   friction: 0.3
@@ -33,7 +31,6 @@
   sprite: /Textures/Tiles/plating_burnt.png
   baseTurf: Lattice
   isSubfloor: true
-  canAxe: true
   footstepSounds:
     collection: FootstepPlating
   friction: 0.3
@@ -45,7 +42,6 @@
   sprite: /Textures/Tiles/Asteroid/asteroid_plating.png
   baseTurf: Lattice
   isSubfloor: true
-  canAxe: true
   footstepSounds:
     collection: FootstepPlating
   friction: 0.3
@@ -57,7 +53,6 @@
   sprite: /Textures/Tiles/snow_plating.png #Not in the snow planet RSI because it doesn't have any metadata. Should probably be moved to its own folder later.
   baseTurf: Lattice
   isSubfloor: true
-  canAxe: true
   footstepSounds:
     collection: FootstepPlating
   friction: 0.15 #a little less then actual snow
@@ -69,7 +64,7 @@
   sprite: /Textures/Tiles/lattice.png
   baseTurf: Space
   isSubfloor: true
-  canWirecutter: true
+  deconstructTools: [ Cutting ]
   weather: true
   footstepSounds:
     collection: FootstepPlating
index 65ebcab94472a949faff450b21b0fa25709fd402..9bcbfe44773d597d2dae6cf972cef7de5d918374 100644 (file)
     components:
     - Item
   permanentComponents:
-  - type: TilePrying
   - type: UserInterface
     interfaces:
       - key: enum.SignalLinkerUiKey.Key
         type: SignalPortSelectorBoundUserInterface
-  - type: LatticeCutting
+  - type: ToolTileCompatible
   - type: Tool
     qualities:
     - Screwing