From fc5d6452cdfc2cc32f06e4a096cbbcf5a09e2e46 Mon Sep 17 00:00:00 2001 From: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Date: Wed, 24 Feb 2021 20:09:27 -0400 Subject: [PATCH] Fix behaviorSet prototype error (#3407) --- Content.Client/EntryPoint.cs | 1 + Content.Server/AI/Utility/BehaviorSetPrototype.cs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index 0fbccc8342..965efc8798 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -81,6 +81,7 @@ namespace Content.Client prototypes.RegisterIgnore("objective"); prototypes.RegisterIgnore("holiday"); prototypes.RegisterIgnore("aiFaction"); + prototypes.RegisterIgnore("behaviorSet"); ClientContentIoC.Register(); diff --git a/Content.Server/AI/Utility/BehaviorSetPrototype.cs b/Content.Server/AI/Utility/BehaviorSetPrototype.cs index c4ef4d6d39..401fb620d5 100644 --- a/Content.Server/AI/Utility/BehaviorSetPrototype.cs +++ b/Content.Server/AI/Utility/BehaviorSetPrototype.cs @@ -1,3 +1,4 @@ +#nullable enable using System.Collections.Generic; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; @@ -11,16 +12,17 @@ namespace Content.Server.AI.Utility /// /// Name of the BehaviorSet. /// - public string ID { get; private set; } + public string ID { get; private set; } = default!; /// /// Actions that this BehaviorSet grants to the entity. /// - public IReadOnlyList Actions { get; private set; } + public IReadOnlyList Actions { get; private set; } = default!; public void LoadFrom(YamlMappingNode mapping) { var serializer = YamlObjectSerializer.NewReader(mapping); + serializer.DataField(this, x => x.ID, "id", string.Empty); serializer.DataField(this, x => x.Actions, "actions", new List()); }