Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Fix TileSystem.PryTile
Browse files Browse the repository at this point in the history
  • Loading branch information
FireNameFN committed Apr 30, 2024
1 parent 090fcd3 commit 48c7e71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Content.Shared/Maps/ContentTileDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public sealed partial class ContentTileDefinition : IPrototype, IInheritingProto
[DataField]
public PrototypeFlags<ToolQualityPrototype> DeconstructTools { get; set; } = new();

public bool CanCrowbar => DeconstructTools.Contains(PryingToolQuality);

// Delta V
[DataField("canShovel")] public bool CanShovel { get; private set; }
//Delta V
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Maps/TileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48c7e71

Please sign in to comment.