Add Whitelist.Components yaml valiation (#40916)

* Add Whitelist.Components yaml valiation

* poke_tests

* fix linter

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2025-11-24 10:09:41 +13:00
committed by GitHub
parent f22efef2d3
commit c8514c8122
3 changed files with 14 additions and 27 deletions

View File

@@ -2,6 +2,8 @@ using Content.Shared.Item;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Generic;
namespace Content.Shared.Whitelist;
@@ -32,8 +34,8 @@ public sealed partial class EntityWhitelist
/// <summary>
/// Component names that are allowed in the whitelist.
/// </summary>
[DataField] public string[]? Components;
// TODO yaml validation
[DataField(customTypeSerializer:typeof(CustomArraySerializer<string, ComponentNameSerializer>))]
public string[]? Components;
/// <summary>
/// Item sizes that are allowed in the whitelist.