Remove field: from DataField attributes (#3932)
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Content.Shared.Construction
|
||||
[DataDefinition]
|
||||
public class ComponentConstructionGraphStep : ArbitraryInsertConstructionGraphStep
|
||||
{
|
||||
[field: DataField("component")] public string Component { get; } = string.Empty;
|
||||
[DataField("component")] public string Component { get; } = string.Empty;
|
||||
|
||||
public override bool EntityValid(IEntity entity)
|
||||
{
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace Content.Shared.Construction
|
||||
private readonly Dictionary<string, Dictionary<ConstructionGraphNode, ConstructionGraphNode?>> _pathfinding = new();
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("start")]
|
||||
[DataField("start")]
|
||||
public string? Start { get; }
|
||||
|
||||
[DataField("graph", priority: 0)]
|
||||
|
||||
@@ -15,37 +15,37 @@ namespace Content.Shared.Construction
|
||||
/// <summary>
|
||||
/// Friendly name displayed in the construction GUI.
|
||||
/// </summary>
|
||||
[field: DataField("name")]
|
||||
[DataField("name")]
|
||||
public string Name { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// "Useful" description displayed in the construction GUI.
|
||||
/// </summary>
|
||||
[field: DataField("description")]
|
||||
[DataField("description")]
|
||||
public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ConstructionGraphPrototype"/> this construction will be using.
|
||||
/// </summary>
|
||||
[field: DataField("graph")]
|
||||
[DataField("graph")]
|
||||
public string Graph { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The target <see cref="ConstructionGraphNode"/> this construction will guide the user to.
|
||||
/// </summary>
|
||||
[field: DataField("targetNode")]
|
||||
[DataField("targetNode")]
|
||||
public string TargetNode { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The starting <see cref="ConstructionGraphNode"/> this construction will start at.
|
||||
/// </summary>
|
||||
[field: DataField("startNode")]
|
||||
[DataField("startNode")]
|
||||
public string StartNode { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Texture path inside the construction GUI.
|
||||
/// </summary>
|
||||
[field: DataField("icon")]
|
||||
[DataField("icon")]
|
||||
public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid;
|
||||
|
||||
/// <summary>
|
||||
@@ -59,16 +59,16 @@ namespace Content.Shared.Construction
|
||||
[DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[field: DataField("placementMode")]
|
||||
[DataField("placementMode")]
|
||||
public string PlacementMode { get; } = "PlaceFree";
|
||||
|
||||
/// <summary>
|
||||
/// Whether this construction can be constructed rotated or not.
|
||||
/// </summary>
|
||||
[field: DataField("canRotate")]
|
||||
[DataField("canRotate")]
|
||||
public bool CanRotate { get; } = true;
|
||||
|
||||
public IReadOnlyList<IConstructionCondition> Conditions => _conditions;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Shared.Construction
|
||||
[ImplicitDataDefinitionForInheritors]
|
||||
public abstract class EntityInsertConstructionGraphStep : ConstructionGraphStep
|
||||
{
|
||||
[field: DataField("store")] public string Store { get; } = string.Empty;
|
||||
[DataField("store")] public string Store { get; } = string.Empty;
|
||||
|
||||
public abstract bool EntityValid(IEntity entity);
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ namespace Content.Shared.Construction
|
||||
{
|
||||
// TODO: Make this use the material system.
|
||||
// TODO TODO: Make the material system not shit.
|
||||
[field: DataField("material")] public string MaterialPrototypeId { get; } = "Steel";
|
||||
[DataField("material")] public string MaterialPrototypeId { get; } = "Steel";
|
||||
|
||||
[field: DataField("amount")] public int Amount { get; } = 1;
|
||||
[DataField("amount")] public int Amount { get; } = 1;
|
||||
|
||||
public StackPrototype MaterialPrototype =>
|
||||
IoCManager.Resolve<IPrototypeManager>().Index<StackPrototype>(MaterialPrototypeId);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Construction
|
||||
[DataDefinition]
|
||||
public class PrototypeConstructionGraphStep : ArbitraryInsertConstructionGraphStep
|
||||
{
|
||||
[field: DataField("prototype")] public string Prototype { get; } = string.Empty;
|
||||
[DataField("prototype")] public string Prototype { get; } = string.Empty;
|
||||
|
||||
public override bool EntityValid(IEntity entity)
|
||||
{
|
||||
|
||||
@@ -9,11 +9,11 @@ namespace Content.Shared.Construction
|
||||
[DataDefinition]
|
||||
public class ToolConstructionGraphStep : ConstructionGraphStep
|
||||
{
|
||||
[field: DataField("tool")] public ToolQuality Tool { get; } = ToolQuality.None;
|
||||
[DataField("tool")] public ToolQuality Tool { get; } = ToolQuality.None;
|
||||
|
||||
[field: DataField("fuel")] public float Fuel { get; } = 10;
|
||||
[DataField("fuel")] public float Fuel { get; } = 10;
|
||||
|
||||
[field: DataField("examine")] public string ExamineOverride { get; } = string.Empty;
|
||||
[DataField("examine")] public string ExamineOverride { get; } = string.Empty;
|
||||
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user