makes prototypeinheritance opt in

This commit is contained in:
Paul
2021-03-05 11:13:00 +01:00
parent 14f2deb47f
commit 73cef00aeb
38 changed files with 7 additions and 156 deletions

View File

@@ -16,10 +16,6 @@ namespace Content.Server.AI.Utility
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Actions that this BehaviorSet grants to the entity.
/// </summary>

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using Content.Server.Interfaces;
@@ -30,10 +30,6 @@ namespace Content.Server.Atmos.Reactions
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Minimum gas amount requirements.
/// </summary>

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
@@ -79,10 +79,6 @@ namespace Content.Server.Botany
[field: DataField("id", required: true)]
public string ID { get; private init; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Unique identifier of this seed. Do NOT set this.
/// </summary>

View File

@@ -15,10 +15,6 @@ namespace Content.Server.GameObjects.Components.AI
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("hostile")]
public IReadOnlyList<string> Hostile { get; private set; } = new List<string>();
}

View File

@@ -16,9 +16,6 @@ namespace Content.Server.GameObjects.Components.BarSign
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("icon")] public string Icon { get; private set; } = "";

View File

@@ -19,10 +19,6 @@ namespace Content.Server.Holiday
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[ViewVariables]
[DataField("beginDay")]
public byte BeginDay { get; set; } = 1;

View File

@@ -16,10 +16,6 @@ namespace Content.Server.Objectives
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown";
[ViewVariables] [DataField("prob")] public float Probability { get; private set; } = 0.3f;

View File

@@ -16,10 +16,6 @@ namespace Content.Shared.Access
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// The player-visible name of the access level, in the ID card console and such.
/// </summary>

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using Robust.Shared.Log;
@@ -18,10 +18,6 @@ namespace Content.Shared.Actions
{
public abstract string ID { get; }
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Icon representing this action in the UI.
/// </summary>

View File

@@ -19,10 +19,6 @@ namespace Content.Shared.Alert
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("order")] private readonly List<(string type, string alert)> _order = new();
private readonly Dictionary<AlertType, int> _typeToIdx = new();

View File

@@ -20,10 +20,6 @@ namespace Content.Shared.Alert
[ViewVariables]
string IPrototype.ID => AlertType.ToString();
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Type of alert, no 2 alert prototypes should have the same one.
/// </summary>

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -17,10 +17,6 @@ namespace Content.Shared.Atmos
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Specific heat for gas.
/// </summary>

View File

@@ -13,10 +13,6 @@ namespace Content.Shared.Audio
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("files")] public List<string> PickFiles { get; } = new();
}
}

View File

@@ -23,10 +23,6 @@ namespace Content.Shared.Chemistry
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("name")]
public string Name { get; } = string.Empty;

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using Content.Shared.Interfaces.Chemistry;
@@ -32,10 +32,6 @@ namespace Content.Shared.Chemistry
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("name")]
public string Name { get; } = string.Empty;

View File

@@ -19,8 +19,6 @@ namespace Content.Shared.Construction
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[field: DataField("parent")] public string Parent { get; }
[ViewVariables]
[field: DataField("start")]
public string Start { get; }

View File

@@ -62,10 +62,6 @@ namespace Content.Shared.Construction
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("placementMode")]
public string PlacementMode { get; } = "PlaceFree";

View File

@@ -28,10 +28,6 @@ namespace Content.Shared.Damage.DamageContainer
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
void ISerializationHooks.AfterDeserialization()
{
if (_supportAll)

View File

@@ -30,10 +30,6 @@ namespace Content.Shared.Damage.ResistanceSet
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
void ISerializationHooks.AfterDeserialization()
{
Resistances = new Dictionary<DamageType, ResistanceSetSettings>();

View File

@@ -20,10 +20,6 @@ namespace Content.Shared.GameObjects.Components.Body.Preset
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("partIDs")]
private Dictionary<string, string> _partIDs = new();

View File

@@ -32,10 +32,6 @@ namespace Content.Shared.GameObjects.Components.Body.Template
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[ViewVariables]
[field: DataField("name")]
public string Name { get; } = string.Empty;

View File

@@ -24,10 +24,6 @@ namespace Content.Shared.GameObjects.Components.Chemistry.ReagentDispenser
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
public List<string> Inventory => _inventory;
}
}

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
@@ -81,10 +81,6 @@ namespace Content.Shared.GameObjects.Components
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("spritePath")] public string SpritePath { get; } = string.Empty;
[field: DataField("decals")] public List<string> Decals { get; } = new();

View File

@@ -14,10 +14,6 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[ViewVariables]
[field: DataField("state")]
public string State { get; } = string.Empty;

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.Collections.Generic;
using JetBrains.Annotations;
using Robust.Shared.Map;
@@ -15,10 +15,6 @@ namespace Content.Shared.Maps
[ViewVariables]
string IPrototype.ID => Name;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("name", required: true)] public string Name { get; } = string.Empty;
public ushort TileId { get; private set; }

View File

@@ -19,10 +19,6 @@ namespace Content.Shared.Materials
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("name")] public string Name { get; private set; } = "unobtanium";
[DataField("color")] public Color Color { get; private set; } = Color.Gray;

View File

@@ -20,10 +20,6 @@ namespace Content.Shared.Prototypes.Cargo
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// Product name.
/// </summary>

View File

@@ -13,10 +13,6 @@ namespace Content.Shared.Prototypes
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("values")] public IReadOnlyList<string> Values { get; } = new List<string>();
}
}

View File

@@ -17,10 +17,6 @@ namespace Content.Shared.Prototypes.Kitchen
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("name")]
private string _name = string.Empty;

View File

@@ -13,10 +13,6 @@ namespace Content.Shared.Prototypes.PDA
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("itemId")]
public string ItemId { get; } = string.Empty;

View File

@@ -16,9 +16,5 @@ namespace Content.Shared.Prototypes.Tag
[ViewVariables]
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
}
}

View File

@@ -17,10 +17,6 @@ namespace Content.Shared.Research
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[DataField("name")]
private string _name = string.Empty;

View File

@@ -19,10 +19,6 @@ namespace Content.Shared.Research
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// The name this technology will have on user interfaces.
/// </summary>

View File

@@ -16,10 +16,6 @@ namespace Content.Shared.Roles
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// The name of this antag as displayed to players.
/// </summary>

View File

@@ -19,10 +19,6 @@ namespace Content.Shared.Roles
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
/// <summary>
/// The name of this job as displayed to players.
/// </summary>

View File

@@ -36,10 +36,6 @@ namespace Content.Shared.Roles
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
public string GetGear(Slots slot, HumanoidCharacterProfile? profile)
{
if (profile != null)

View File

@@ -13,10 +13,6 @@ namespace Content.Shared.Stacks
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("name")]
public string Name { get; } = string.Empty;

View File

@@ -15,10 +15,6 @@ namespace Content.Shared.VendingMachines
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[ViewVariables]
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("name")]
public string Name { get; } = string.Empty;