VoiceOverrideComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Content.Shared.Speech;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Server.Speech.Components;
  4. /// <summary>
  5. /// Will change the voice of the entity that has the component (e.g radio and speech).
  6. /// </summary>
  7. /// <remarks>
  8. /// Before using this component, please take a look at the the TransformSpeakerNameEvent (and the inventory relay version).
  9. /// Depending on what you're doing, it could be a better choice!
  10. /// </remarks>
  11. [RegisterComponent]
  12. public sealed partial class VoiceOverrideComponent : Component
  13. {
  14. /// <summary>
  15. /// The name that will be used instead of an entities default one.
  16. /// Uses the localized version of the string and if null wont do anything.
  17. /// </summary>
  18. [DataField]
  19. public string? NameOverride = null;
  20. /// <summary>
  21. /// The verb that will be used insteand of an entities default one.
  22. /// If null, the defaut will be used.
  23. /// </summary>
  24. [DataField]
  25. public ProtoId<SpeechVerbPrototype>? SpeechVerbOverride = null;
  26. /// <summary>
  27. /// If true, the override values (if they are not null) will be applied.
  28. /// </summary>
  29. [DataField]
  30. public bool Enabled = true;
  31. }