Actual randomized humanoids (#11574)

This commit is contained in:
Flipp Syder
2022-10-20 06:46:05 -07:00
committed by GitHub
parent e4c67e998f
commit 0fe9f38968
8 changed files with 418 additions and 175 deletions

View File

@@ -0,0 +1,37 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
namespace Content.Shared.Humanoid.Prototypes;
/// <summary>
/// This is what is used to change a humanoid spawned by RandomHumanoidSystem in Content.Server.
/// </summary>
[Prototype("randomHumanoidSettings")]
public sealed class RandomHumanoidSettingsPrototype : IPrototype, IInheritingPrototype
{
[IdDataField] public string ID { get; } = default!;
[ParentDataField(typeof(PrototypeIdArraySerializer<RandomHumanoidSettingsPrototype>))]
public string[]? Parents { get; }
[AbstractDataField]
public bool Abstract { get; }
/// <summary>
/// Whether the humanoid's name should take from the randomized profile or not.
/// </summary>
[DataField("randomizeName")]
public bool RandomizeName { get; } = true;
/// <summary>
/// Species that will be ignored by the randomizer.
/// </summary>
[DataField("speciesBlacklist")]
public HashSet<string> SpeciesBlacklist { get; } = new();
/// <summary>
/// Extra components to add to this entity.
/// </summary>
[DataField("components")]
public EntityPrototype.ComponentRegistry? Components { get; }
}