Remove redundant read-only VV from datafields (#12626)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Utility;
|
||||
@@ -13,7 +12,7 @@ namespace Content.Client.Clickable
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
[ViewVariables] [DataField("bounds")] public DirBoundData? Bounds;
|
||||
[DataField("bounds")] public DirBoundData? Bounds;
|
||||
|
||||
/// <summary>
|
||||
/// Used to check whether a click worked. Will first check if the click falls inside of some explicit bounding
|
||||
@@ -133,11 +132,11 @@ namespace Content.Client.Clickable
|
||||
[DataDefinition]
|
||||
public sealed class DirBoundData
|
||||
{
|
||||
[ViewVariables] [DataField("all")] public Box2 All;
|
||||
[ViewVariables] [DataField("north")] public Box2 North;
|
||||
[ViewVariables] [DataField("south")] public Box2 South;
|
||||
[ViewVariables] [DataField("east")] public Box2 East;
|
||||
[ViewVariables] [DataField("west")] public Box2 West;
|
||||
[DataField("all")] public Box2 All;
|
||||
[DataField("north")] public Box2 North;
|
||||
[DataField("south")] public Box2 South;
|
||||
[DataField("east")] public Box2 East;
|
||||
[DataField("west")] public Box2 West;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ public sealed class InstrumentComponent : SharedInstrumentComponent
|
||||
/// <summary>
|
||||
/// Whether this instrument is handheld or not.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("handheld")]
|
||||
public bool Handheld { get; set; } // TODO: Replace this by simply checking if the entity has an ItemComponent.
|
||||
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.Inventory;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Client.Inventory
|
||||
{
|
||||
@@ -19,7 +10,6 @@ namespace Content.Client.Inventory
|
||||
[Access(typeof(ClientInventorySystem))]
|
||||
public sealed class ClientInventoryComponent : InventoryComponent
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("speciesId")] public string? SpeciesId { get; set; }
|
||||
[ViewVariables]
|
||||
public readonly Dictionary<string, ClientInventorySystem.SlotData> SlotData = new ();
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Shared.Light.Component;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.Animations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Animations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Client.Light.Components
|
||||
{
|
||||
@@ -29,25 +21,24 @@ namespace Content.Client.Light.Components
|
||||
protected IEntityManager _entMan = default!;
|
||||
protected IRobustRandom _random = default!;
|
||||
|
||||
[DataField("id")] [ViewVariables] public string ID { get; set; } = string.Empty;
|
||||
[DataField("id")] public string ID { get; set; } = string.Empty;
|
||||
|
||||
[DataField("property")]
|
||||
[ViewVariables]
|
||||
public virtual string Property { get; protected set; } = "Radius";
|
||||
|
||||
[DataField("isLooped")] [ViewVariables] public bool IsLooped { get; set; }
|
||||
[DataField("isLooped")] public bool IsLooped { get; set; }
|
||||
|
||||
[DataField("enabled")] [ViewVariables] public bool Enabled { get; set; }
|
||||
[DataField("enabled")] public bool Enabled { get; set; }
|
||||
|
||||
[DataField("startValue")] [ViewVariables] public float StartValue { get; set; } = 0f;
|
||||
[DataField("startValue")] public float StartValue { get; set; } = 0f;
|
||||
|
||||
[DataField("endValue")] [ViewVariables] public float EndValue { get; set; } = 2f;
|
||||
[DataField("endValue")] public float EndValue { get; set; } = 2f;
|
||||
|
||||
[DataField("minDuration")] [ViewVariables] public float MinDuration { get; set; } = -1f;
|
||||
[DataField("minDuration")] public float MinDuration { get; set; } = -1f;
|
||||
|
||||
[DataField("maxDuration")] [ViewVariables] public float MaxDuration { get; set; } = 2f;
|
||||
[DataField("maxDuration")] public float MaxDuration { get; set; } = 2f;
|
||||
|
||||
[DataField("interpolate")] [ViewVariables] public AnimationInterpolationMode InterpolateMode { get; set; } = AnimationInterpolationMode.Linear;
|
||||
[DataField("interpolate")] public AnimationInterpolationMode InterpolateMode { get; set; } = AnimationInterpolationMode.Linear;
|
||||
|
||||
[ViewVariables] protected float MaxTime { get; set; }
|
||||
|
||||
@@ -182,7 +173,6 @@ namespace Content.Client.Light.Components
|
||||
/// time of the full animation, including the reverse interpolation.
|
||||
/// </summary>
|
||||
[DataField("reverseWhenFinished")]
|
||||
[ViewVariables]
|
||||
public bool ReverseWhenFinished { get; set; }
|
||||
|
||||
public override (int KeyFrameIndex, float FramePlayingTime) AdvancePlayback(
|
||||
@@ -308,7 +298,6 @@ namespace Content.Client.Light.Components
|
||||
public sealed class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks
|
||||
{
|
||||
[DataField("property")]
|
||||
[ViewVariables]
|
||||
public override string Property { get; protected set; } = "Color";
|
||||
|
||||
[DataField("colors")] public List<Color> ColorsToCycle { get; set; } = new();
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Client.Weapons.Melee.Components;
|
||||
[RegisterComponent]
|
||||
public sealed class WeaponArcVisualsComponent : Component
|
||||
{
|
||||
[ViewVariables, DataField("animation")]
|
||||
[DataField("animation")]
|
||||
public WeaponArcAnimation Animation = WeaponArcAnimation.None;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("fadeOut")]
|
||||
|
||||
Reference in New Issue
Block a user