Add layers field to construction prototype (#14222)

This commit is contained in:
08A
2023-03-04 21:31:46 +01:00
committed by GitHub
parent 82cc8a389a
commit 83d4a787ee
4 changed files with 67 additions and 14 deletions

View File

@@ -46,6 +46,12 @@ namespace Content.Shared.Construction.Prototypes
[DataField("icon")]
public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid;
/// <summary>
/// Texture paths used for the construction ghost.
/// </summary>
[DataField("layers")]
private List<SpriteSpecifier>? _layers;
/// <summary>
/// If you can start building or complete steps on impassable terrain.
/// </summary>
@@ -70,6 +76,7 @@ namespace Content.Shared.Construction.Prototypes
public bool CanRotate { get; } = true;
public IReadOnlyList<IConstructionCondition> Conditions => _conditions;
public IReadOnlyList<SpriteSpecifier> Layers => _layers ?? new List<SpriteSpecifier>{Icon};
}
public enum ConstructionType