VoiceMaskComponent.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Content.Shared.Speech;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Server.VoiceMask;
  4. /// <summary>
  5. /// This component is for voice mask items! Adding this component to clothing will give the the voice mask UI
  6. /// and allow the wearer to change their voice and verb at will.
  7. /// </summary>
  8. /// <remarks>
  9. /// DO NOT use this if you do not want the interface.
  10. /// The VoiceOverrideSystem is probably what your looking for (Or you might have to make something similar)!
  11. /// </remarks>
  12. [RegisterComponent]
  13. public sealed partial class VoiceMaskComponent : Component
  14. {
  15. /// <summary>
  16. /// The name that will override an entities default name. If null, it will use the default override.
  17. /// </summary>
  18. [DataField]
  19. public string? VoiceMaskName = null;
  20. /// <summary>
  21. /// The speech verb that will override an entities default one. If null, it will use the entities default verb.
  22. /// </summary>
  23. [DataField]
  24. public ProtoId<SpeechVerbPrototype>? VoiceMaskSpeechVerb;
  25. /// <summary>
  26. /// The action that gets displayed when the voice mask is equipped.
  27. /// </summary>
  28. [DataField]
  29. public EntProtoId Action = "ActionChangeVoiceMask";
  30. /// <summary>
  31. /// Reference to the action.
  32. /// </summary>
  33. [DataField]
  34. public EntityUid? ActionEntity;
  35. }