RandomHumanoidSettingsPrototype.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
  3. namespace Content.Shared.Humanoid.Prototypes;
  4. /// <summary>
  5. /// This is what is used to change a humanoid spawned by RandomHumanoidSystem in Content.Server.
  6. /// </summary>
  7. [Prototype]
  8. public sealed partial class RandomHumanoidSettingsPrototype : IPrototype, IInheritingPrototype
  9. {
  10. [IdDataField] public string ID { get; private set; } = default!;
  11. [ParentDataField(typeof(PrototypeIdArraySerializer<RandomHumanoidSettingsPrototype>))]
  12. public string[]? Parents { get; private set; }
  13. [AbstractDataField]
  14. [NeverPushInheritance]
  15. public bool Abstract { get; private set; }
  16. /// <summary>
  17. /// Whether the humanoid's name should take from the randomized profile or not.
  18. /// </summary>
  19. [DataField("randomizeName")]
  20. public bool RandomizeName { get; private set; } = true;
  21. /// <summary>
  22. /// Species that will be ignored by the randomizer.
  23. /// </summary>
  24. [DataField("speciesBlacklist")]
  25. public HashSet<string> SpeciesBlacklist { get; private set; } = new();
  26. /// <summary>
  27. /// Extra components to add to this entity.
  28. /// </summary>
  29. [DataField]
  30. [AlwaysPushInheritance]
  31. public ComponentRegistry? Components { get; private set; }
  32. }