Make TagComponent use PrototypeIdSerializer (#3810)

* Make TagComponent use PrototypeIdSerializer

* Fix not specifying the prototype to check for

* haha oops
This commit is contained in:
DrSmugleaf
2021-04-06 13:38:27 +02:00
committed by GitHub
parent febd6d1ab4
commit f7cda52528

View File

@@ -8,6 +8,7 @@ using Robust.Shared.Players;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
using Robust.Shared.ViewVariables;
namespace Content.Shared.GameObjects.Components.Tag
@@ -18,7 +19,7 @@ namespace Content.Shared.GameObjects.Components.Tag
public override string Name => "Tag";
[ViewVariables]
[DataField("tags")]
[DataField("tags", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<TagPrototype>))]
private readonly HashSet<string> _tags = new();
public IReadOnlySet<string> Tags => _tags;