#nullable enable using System.Collections.Generic; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Utility; using Robust.Shared.ViewVariables; namespace Content.Shared.Construction { [Prototype("construction")] public class ConstructionPrototype : IPrototype { [DataField("conditions")] private List _conditions = new(); /// /// Friendly name displayed in the construction GUI. /// [DataField("name")] public string Name { get; } = string.Empty; /// /// "Useful" description displayed in the construction GUI. /// [DataField("description")] public string Description { get; } = string.Empty; /// /// The this construction will be using. /// [DataField("graph")] public string Graph { get; } = string.Empty; /// /// The target this construction will guide the user to. /// [DataField("targetNode")] public string TargetNode { get; } = string.Empty; /// /// The starting this construction will start at. /// [DataField("startNode")] public string StartNode { get; } = string.Empty; /// /// Texture path inside the construction GUI. /// [DataField("icon")] public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid; /// /// If you can start building or complete steps on impassable terrain. /// [DataField("canBuildInImpassable")] public bool CanBuildInImpassable { get; private set; } [DataField("category")] public string Category { get; private set; } = string.Empty; [DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure; [ViewVariables] [DataField("id", required: true)] public string ID { get; } = default!; [DataField("placementMode")] public string PlacementMode { get; } = "PlaceFree"; /// /// Whether this construction can be constructed rotated or not. /// [DataField("canRotate")] public bool CanRotate { get; } = true; public IReadOnlyList Conditions => _conditions; } public enum ConstructionType { Structure, Item, } }