SpeechVerbPrototype.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Shared.Speech;
  3. /// <summary>
  4. /// Handles replacing speech verbs and other conditional chat modifications like bolding or font type depending
  5. /// on punctuation or by directly overriding the prototype.
  6. /// </summary>
  7. [Prototype]
  8. public sealed partial class SpeechVerbPrototype : IPrototype
  9. {
  10. [IdDataField] public string ID { get; private set; } = default!;
  11. /// <summary>
  12. /// Loc strings to be passed to the chat wrapper. 'says', 'states', etc.
  13. /// Picks one at random if there are multiple.
  14. /// </summary>
  15. [DataField("speechVerbStrings", required: true)]
  16. public List<string> SpeechVerbStrings = default!;
  17. /// <summary>
  18. /// Should use of this speech verb bold the corresponding message?
  19. /// </summary>
  20. [DataField("bold")]
  21. public bool Bold = false;
  22. /// <summary>
  23. /// What font size should be used for the message contents?
  24. /// </summary>
  25. [DataField("fontSize")]
  26. public int FontSize = 12;
  27. /// <summary>
  28. /// What font prototype ID should be used for the message contents?
  29. /// </summary>
  30. /// font proto is client only so cant lint this lol sorry
  31. [DataField("fontId")]
  32. public string FontId = "Default";
  33. /// <summary>
  34. /// If multiple applicable speech verb protos are found (i.e. through speech suffixes) this will determine
  35. /// which one is picked. Higher = more priority.
  36. /// </summary>
  37. [DataField("priority")]
  38. public int Priority = 0;
  39. /// <summary>
  40. /// Name shown in the voicemask UI for this verb.
  41. /// </summary>
  42. [DataField(required: true)]
  43. public LocId Name = string.Empty;
  44. }