Remove field: from DataField attributes (#3932)

This commit is contained in:
DrSmugleaf
2021-05-04 15:37:16 +02:00
committed by GitHub
parent 85f3871536
commit ad3b7fe97d
84 changed files with 228 additions and 242 deletions

View File

@@ -1,8 +1,6 @@
#nullable enable
using System.Collections.Generic;
using Content.Shared.Interfaces;
using Content.Shared.Interfaces.Chemistry;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -20,10 +18,10 @@ namespace Content.Shared.Chemistry
[DataField("effects", serverOnly: true)] private List<IReactionEffect> _effects = new();
[ViewVariables]
[field: DataField("id", required: true)]
[DataField("id", required: true)]
public string ID { get; } = default!;
[field: DataField("name")]
[DataField("name")]
public string Name { get; } = string.Empty;
/// <summary>

View File

@@ -1,5 +1,4 @@
using System;
using Content.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -17,15 +16,15 @@ namespace Content.Shared.Chemistry
public abstract class ReagentEntityReaction
{
[ViewVariables]
[field: DataField("touch")]
[DataField("touch")]
public bool Touch { get; } = false;
[ViewVariables]
[field: DataField("injection")]
[DataField("injection")]
public bool Injection { get; } = false;
[ViewVariables]
[field: DataField("ingestion")]
[DataField("ingestion")]
public bool Ingestion { get; } = false;
public void React(ReactionMethod method, IEntity entity, ReagentPrototype reagent, ReagentUnit volume, Solution? source)

View File

@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
using Content.Shared.Interfaces.Chemistry;
using Content.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Maths;
@@ -29,34 +28,34 @@ namespace Content.Shared.Chemistry
private readonly float _customPlantMetabolism = 1f;
[ViewVariables]
[field: DataField("id", required: true)]
[DataField("id", required: true)]
public string ID { get; } = default!;
[field: DataField("name")]
[DataField("name")]
public string Name { get; } = string.Empty;
[field: DataField("desc")]
[DataField("desc")]
public string Description { get; } = string.Empty;
[field: DataField("physicalDesc")]
[DataField("physicalDesc")]
public string PhysicalDescription { get; } = string.Empty;
[field: DataField("color")]
[DataField("color")]
public Color SubstanceColor { get; } = Color.White;
[field: DataField("toxin")]
[DataField("toxin")]
public bool Toxin { get; }
[field: DataField("boozePower")]
[DataField("boozePower")]
public int BoozePower { get; }
[field: DataField("boilingPoint")]
[DataField("boilingPoint")]
public float? BoilingPoint { get; }
[field: DataField("meltingPoint")]
[DataField("meltingPoint")]
public float? MeltingPoint { get; }
[field: DataField("spritePath")]
[DataField("spritePath")]
public string SpriteReplacementPath { get; } = string.Empty;
//List of metabolism effects this reagent has, should really only be used server-side.