fire axe plating (#18087)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -12,6 +12,12 @@ namespace Content.Server.Tools.Components
|
||||
|
||||
[DataField("qualityNeeded", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
|
||||
public string QualityNeeded = "Prying";
|
||||
|
||||
/// <summary>
|
||||
/// Whether this tool can pry tiles with CanAxe.
|
||||
/// </summary>
|
||||
[DataField("advanced")]
|
||||
public bool Advanced = false;
|
||||
|
||||
[DataField("delay")]
|
||||
public float Delay = 1f;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -37,6 +37,11 @@ namespace Content.Shared.Maps
|
||||
public string BaseTurf { get; } = 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("canWirecutter")] public bool CanWirecutter { get; private set; }
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
qualities:
|
||||
- Prying
|
||||
- type: TilePrying
|
||||
advanced: true
|
||||
|
||||
- type: entity
|
||||
id: FireAxeFlaming
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
sprite: /Textures/Tiles/plating.png
|
||||
baseTurf: Lattice
|
||||
isSubfloor: true
|
||||
canAxe: true
|
||||
footstepSounds:
|
||||
collection: FootstepPlating
|
||||
friction: 0.3
|
||||
|
||||
Reference in New Issue
Block a user