Remove redundant read-only VV from datafields (#12626)

This commit is contained in:
DrSmugleaf
2022-11-16 20:22:11 +01:00
committed by GitHub
parent fb892cb374
commit 7fbc2608e8
179 changed files with 171 additions and 462 deletions

View File

@@ -1,7 +1,7 @@
using JetBrains.Annotations;
using System.Threading;
using Content.Server.Nutrition.EntitySystems;
using Content.Shared.FixedPoint;
using System.Threading;
using JetBrains.Annotations;
using Robust.Shared.Audio;
namespace Content.Server.Nutrition.Components
@@ -14,11 +14,9 @@ namespace Content.Server.Nutrition.Components
public string SolutionName { get; set; } = DefaultSolutionName;
public const string DefaultSolutionName = "drink";
[ViewVariables]
[DataField("useSound")]
public SoundSpecifier UseSound = new SoundPathSpecifier("/Audio/Items/drink.ogg");
[ViewVariables]
[DataField("isOpen")]
internal bool DefaultToOpened;

View File

@@ -14,15 +14,12 @@ namespace Content.Server.Nutrition.Components
[DataField("solution")]
public string SolutionName { get; set; } = "food";
[ViewVariables]
[DataField("useSound")]
public SoundSpecifier UseSound { get; set; } = new SoundPathSpecifier("/Audio/Items/eatfood.ogg");
[ViewVariables]
[DataField("trash", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? TrashPrototype { get; set; }
[ViewVariables]
[DataField("transferAmount")]
public FixedPoint2? TransferAmount { get; set; } = FixedPoint2.New(5);

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Nutrition.Components
/// <summary>
/// The name of the solution of which to check emptiness
/// </summary>
[ViewVariables] [DataField("solution")]
[DataField("solution")]
public string Solution { get; set; } = string.Empty;
}
}

View File

@@ -26,14 +26,12 @@ namespace Content.Server.Nutrition.Components
/// The chance that the utensil has to break with each use.
/// A value of 0 means that it is unbreakable.
/// </summary>
[ViewVariables]
[DataField("breakChance")]
public float BreakChance;
/// <summary>
/// The sound to be played if the utensil breaks.
/// </summary>
[ViewVariables]
[DataField("breakSound")]
public SoundSpecifier BreakSound = new SoundPathSpecifier("/Audio/Items/snap.ogg");
}