Add missing DataDefinition constructors (#14603)

This commit is contained in:
Leon Friedrich
2023-03-13 12:37:24 +13:00
committed by GitHub
parent 6e4949af77
commit f0cf4e7a22
6 changed files with 45 additions and 39 deletions

View File

@@ -123,20 +123,24 @@ public sealed class FaxMachineComponent : Component
[DataDefinition]
public sealed class FaxPrintout
{
[DataField("name")]
public string Name { get; }
[DataField("name", required: true)]
public string Name { get; } = default!;
[DataField("content")]
public string Content { get; }
[DataField("content", required: true)]
public string Content { get; } = default!;
[DataField("prototypeId", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string PrototypeId { get; }
[DataField("prototypeId", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
public string PrototypeId { get; } = default!;
[DataField("stampState")]
public string? StampState { get; }
[DataField("stampedBy")]
public List<string> StampedBy { get; }
public List<string> StampedBy { get; } = new();
private FaxPrintout()
{
}
public FaxPrintout(string content, string name, string? prototypeId, string? stampState = null, List<string>? stampedBy = null)
{