using Content.Shared.Item;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Whitelist;
///
/// Used to determine whether an entity fits a certain whitelist.
/// Does not whitelist by prototypes, since that is undesirable; you're better off just adding a tag to all
/// entity prototypes that need to be whitelisted, and checking for that.
///
///
/// whitelist:
/// tags:
/// - Cigarette
/// - FirelockElectronics
/// components:
/// - Buckle
/// - AsteroidRock
/// sizes:
/// - Tiny
/// - Large
///
[DataDefinition]
[Serializable, NetSerializable]
public sealed partial class EntityWhitelist
{
///
/// Component names that are allowed in the whitelist.
///
[DataField] public string[]? Components;
// TODO yaml validation
///
/// Mind Role Prototype names that are allowed in the whitelist.
///
[DataField] public string[]? MindRoles;
// TODO yaml validation
///
/// Item sizes that are allowed in the whitelist.
///
[DataField]
public List>? Sizes;
[NonSerialized, Access(typeof(EntityWhitelistSystem))]
public List? Registrations;
///
/// Tags that are allowed in the whitelist.
///
[DataField]
public List>? Tags;
///
/// If false, an entity only requires one of these components or tags to pass the whitelist. If true, an
/// entity requires to have ALL of these components and tags to pass.
/// The "Sizes" criteria will ignores this, since an item can only have one size.
///
[DataField]
public bool RequireAll;
}