SpeciesPrototype.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. namespace Content.Shared.Humanoid.Prototypes;
  4. [Prototype]
  5. public sealed partial class SpeciesPrototype : IPrototype
  6. {
  7. /// <summary>
  8. /// Prototype ID of the species.
  9. /// </summary>
  10. [IdDataField]
  11. public string ID { get; private set; } = default!;
  12. /// <summary>
  13. /// User visible name of the species.
  14. /// </summary>
  15. [DataField(required: true)]
  16. public string Name { get; private set; } = default!;
  17. /// <summary>
  18. /// Descriptor. Unused...? This is intended
  19. /// for an eventual integration into IdentitySystem
  20. /// (i.e., young human person, young lizard person, etc.)
  21. /// </summary>
  22. [DataField]
  23. public string Descriptor { get; private set; } = "humanoid";
  24. /// <summary>
  25. /// Whether the species is available "at round start" (In the character editor)
  26. /// </summary>
  27. [DataField(required: true)]
  28. public bool RoundStart { get; private set; } = false;
  29. // The below two are to avoid fetching information about the species from the entity
  30. // prototype.
  31. // This one here is a utility field, and is meant to *avoid* having to duplicate
  32. // the massive SpriteComponent found in every species.
  33. // Species implementors can just override SpriteComponent if they want a custom
  34. // sprite layout, and leave this null. Keep in mind that this will disable
  35. // sprite accessories.
  36. [DataField("sprites")]
  37. public string SpriteSet { get; private set; } = default!;
  38. /// <summary>
  39. /// Default skin tone for this species. This applies for non-human skin tones.
  40. /// </summary>
  41. [DataField]
  42. public Color DefaultSkinTone { get; private set; } = Color.White;
  43. /// <summary>
  44. /// Default human skin tone for this species. This applies for human skin tones.
  45. /// See <see cref="SkinColor.HumanSkinTone"/> for the valid range of skin tones.
  46. /// </summary>
  47. [DataField]
  48. public int DefaultHumanSkinTone { get; private set; } = 20;
  49. /// <summary>
  50. /// The limit of body markings that you can place on this species.
  51. /// </summary>
  52. [DataField("markingLimits")]
  53. public string MarkingPoints { get; private set; } = default!;
  54. /// <summary>
  55. /// Humanoid species variant used by this entity.
  56. /// </summary>
  57. [DataField(required: true)]
  58. public EntProtoId Prototype { get; private set; } = default!;
  59. /// <summary>
  60. /// Prototype used by the species for the dress-up doll in various menus.
  61. /// </summary>
  62. [DataField(required: true)]
  63. public EntProtoId DollPrototype { get; private set; } = default!;
  64. /// <summary>
  65. /// Method of skin coloration used by the species.
  66. /// </summary>
  67. [DataField(required: true)]
  68. public HumanoidSkinColor SkinColoration { get; private set; }
  69. [DataField]
  70. public string MaleFirstNames { get; private set; } = "NamesFirstMale";
  71. [DataField]
  72. public string FemaleFirstNames { get; private set; } = "NamesFirstFemale";
  73. [DataField]
  74. public string LastNames { get; private set; } = "NamesLast";
  75. [DataField]
  76. public SpeciesNaming Naming { get; private set; } = SpeciesNaming.FirstLast;
  77. [DataField]
  78. public List<Sex> Sexes { get; private set; } = new() { Sex.Male, Sex.Female };
  79. /// <summary>
  80. /// Characters younger than this are too young to be hired by Nanotrasen.
  81. /// </summary>
  82. [DataField]
  83. public int MinAge = 18;
  84. /// <summary>
  85. /// Characters younger than this appear young.
  86. /// </summary>
  87. [DataField]
  88. public int YoungAge = 30;
  89. /// <summary>
  90. /// Characters older than this appear old. Characters in between young and old age appear middle aged.
  91. /// </summary>
  92. [DataField]
  93. public int OldAge = 60;
  94. /// <summary>
  95. /// Characters cannot be older than this. Only used for restrictions...
  96. /// although imagine if ghosts could age people WYCI...
  97. /// </summary>
  98. [DataField]
  99. public int MaxAge = 120;
  100. }
  101. public enum SpeciesNaming : byte
  102. {
  103. First,
  104. FirstLast,
  105. FirstDashFirst,
  106. TheFirstofLast,
  107. }