ReplacementAccentPrototype.cs 997 B

12345678910111213141516171819202122232425262728293031
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Server.Speech.Prototypes;
  3. [Prototype("accent")]
  4. public sealed partial class ReplacementAccentPrototype : IPrototype
  5. {
  6. /// <inheritdoc/>
  7. [ViewVariables]
  8. [IdDataField]
  9. public string ID { get; private set; } = default!;
  10. /// <summary>
  11. /// If this array is non-null, the full text of anything said will be randomly replaced with one of these words.
  12. /// </summary>
  13. [DataField]
  14. public string[]? FullReplacements;
  15. /// <summary>
  16. /// If this dictionary is non-null and <see cref="FullReplacements"/> is null, any keys surrounded by spaces
  17. /// (words) will be replaced by the value, attempting to intelligently keep capitalization.
  18. /// </summary>
  19. [DataField]
  20. public Dictionary<string, string>? WordReplacements;
  21. /// <summary>
  22. /// Allows you to substitute words, not always, but with some chance
  23. /// </summary>
  24. [DataField]
  25. public float ReplacementChance = 1f;
  26. }