Add MeansDataDefinition support to DataDefinitionAnalyzer (#5699)

* Add MeansDataDefinition support to DataDefinitionAnalyzer

* Poke tests

* Fix violations in engine

* Fix more lacking partials

* Fix tests

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
This commit is contained in:
Tayrtahn
2025-12-17 13:47:30 -05:00
committed by GitHub
parent d7abbad717
commit dd86bf980d
8 changed files with 36 additions and 21 deletions

View File

@@ -13,7 +13,7 @@ namespace Robust.Shared.Audio;
public sealed partial class AudioPresetPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
/// <summary>
/// Should the engine automatically create an auxiliary audio effect slot for this.

View File

@@ -14,7 +14,7 @@ namespace Robust.Shared.Map
/// A set of coordinates relative to another entity.
/// </summary>
[PublicAPI, DataRecord]
public readonly record struct EntityCoordinates : ISpanFormattable
public readonly partial record struct EntityCoordinates : ISpanFormattable
{
public static readonly EntityCoordinates Invalid = new(EntityUid.Invalid, Vector2.Zero);

View File

@@ -13,7 +13,7 @@ namespace Robust.Shared.Map
/// </summary>
[PublicAPI, DataRecord]
[Serializable, NetSerializable]
public readonly record struct MapCoordinates : ISpanFormattable
public readonly partial record struct MapCoordinates : ISpanFormattable
{
public static readonly MapCoordinates Nullspace = new(Vector2.Zero, MapId.Nullspace);

View File

@@ -141,19 +141,19 @@ namespace Robust.Shared.Prototypes
/// </summary>
[ViewVariables]
[ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<EntityPrototype>))]
public string[]? Parents { get; }
public string[]? Parents { get; private set; }
[ViewVariables]
[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; }
public bool Abstract { get; private set; }
/// <summary>
/// A dictionary mapping the component type list to the YAML mapping containing their settings.
/// </summary>
[DataField("components")]
[AlwaysPushInheritance]
public ComponentRegistry Components { get; } = new();
public ComponentRegistry Components = new();
public EntityPrototype()
{
@@ -286,7 +286,7 @@ namespace Robust.Shared.Prototypes
}
[DataRecord]
public record ComponentRegistryEntry(IComponent Component, MappingDataNode Mapping);
public partial record ComponentRegistryEntry(IComponent Component, MappingDataNode Mapping);
[DataDefinition]
public sealed partial class EntityPlacementProperties