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

This commit is contained in:
DrSmugleaf
2022-11-16 21:02:39 +01:00
committed by GitHub
parent a60011d612
commit 96938ca85a
10 changed files with 1 additions and 42 deletions

View File

@@ -1,8 +1,6 @@
using System.Collections.Generic;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Robust.Client.GameObjects;
@@ -13,7 +11,6 @@ namespace Robust.Client.GameObjects;
[ComponentReference(typeof(AppearanceComponent)), Access(typeof(AppearanceSystem))]
public sealed class ClientAppearanceComponent : AppearanceComponent
{
[ViewVariables]
[DataField("visuals")]
internal List<AppearanceVisualizer> Visualizers = new();

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using DrawDepthTag = Robust.Shared.GameObjects.DrawDepth;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
@@ -9,6 +8,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using DrawDepthTag = Robust.Shared.GameObjects.DrawDepth;
namespace Robust.Server.GameObjects
{
@@ -16,7 +16,6 @@ namespace Robust.Server.GameObjects
[Obsolete("Use client-side systems, or appearance data & visualizers instead")]
public sealed class SpriteComponent : SharedSpriteComponent, ISerializationHooks
{
[ViewVariables]
[DataField("layers", priority: 2, readOnly: true)]
private List<PrototypeLayerData> Layers = new();

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.IoC;
@@ -11,7 +10,6 @@ using Robust.Shared.Maths;
using Robust.Shared.Network;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Robust.Shared.Containers
{
@@ -27,7 +25,6 @@ namespace Robust.Shared.Containers
[Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly INetManager _netMan = default!;
[ViewVariables]
[DataField("containers")]
public Dictionary<string, IContainer> Containers = new();

View File

@@ -6,7 +6,6 @@ using Robust.Shared.IoC;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Robust.Shared.Containers
{
@@ -28,7 +27,6 @@ namespace Robust.Shared.Containers
}
}
[ViewVariables]
[DataField("ent")]
public EntityUid? ContainedEntity
{

View File

@@ -14,7 +14,6 @@ namespace Robust.Shared.GameObjects.Components.Localization
[NetworkedComponent()]
public sealed class GrammarComponent : Component
{
[ViewVariables]
[DataField("attributes")]
public Dictionary<string, string> Attributes { get; } = new();

View File

@@ -29,7 +29,6 @@ using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using Vector2 = Robust.Shared.Maths.Vector2;
namespace Robust.Shared.Physics.Collision.Shapes
{
@@ -44,7 +43,6 @@ namespace Robust.Shared.Physics.Collision.Shapes
/// This is public so engine code can manipulate it directly.
/// NOTE! If you wish to manipulate this then you need to update the normals and centroid yourself!
/// </summary>
[ViewVariables]
[DataField("vertices")]
public Vector2[] Vertices = Array.Empty<Vector2>();

View File

@@ -72,7 +72,6 @@ namespace Robust.Shared.Physics.Dynamics
[NonSerialized]
public int ProxyCount = 0;
[ViewVariables]
[DataField("shape")]
public IPhysShape Shape { get; private set; } = new PhysShapeAabb();

View File

@@ -81,7 +81,6 @@ namespace Robust.Shared.Physics.Dynamics.Joints
/// <summary>
/// Network identifier of this joint.
/// </summary>
[ViewVariables]
[DataField("id")]
public string ID { get; set; } = string.Empty;

View File

@@ -1,19 +1,13 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Sequence;
using Robust.Shared.Serialization.Markdown.Value;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.ViewVariables;
@@ -50,15 +44,12 @@ namespace Robust.Shared.Prototypes
/// You probably want <see cref="Name"/> instead.
/// </summary>
/// <seealso cref="Name"/>
[ViewVariables]
[DataField("name")]
public string? SetName { get; private set; }
[ViewVariables]
[DataField("description")]
public string? SetDesc { get; private set; }
[ViewVariables]
[DataField("suffix")]
public string? SetSuffix { get; private set; }
@@ -87,7 +78,6 @@ namespace Robust.Shared.Prototypes
/// <summary>
/// Fluent messageId used to lookup the entity's name and localization attributes.
/// </summary>
[ViewVariables]
[DataField("localizationId")]
public string? CustomLocalizationID { get; private set; }
@@ -129,7 +119,6 @@ namespace Robust.Shared.Prototypes
/// <summary>
/// True if this entity will be saved by the map loader.
/// </summary>
[ViewVariables]
[DataField("save")]
public bool MapSavable { get; set; } = true;

View File

@@ -1,19 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Sequence;
using Robust.Shared.Serialization.Markdown.Value;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
namespace Robust.Shared.Prototypes;
@@ -28,7 +13,6 @@ public sealed class TileAliasPrototype : IPrototype
/// <summary>
/// The target tile ID to alias to.
/// </summary>
[ViewVariables]
[DataField("target")]
public string Target { get; private set; } = default!;