AddAccentClothingComponent.cs 1015 B

1234567891011121314151617181920212223242526272829
  1. using Content.Server.Speech.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. namespace Content.Server.Speech.Components;
  4. /// <summary>
  5. /// Applies accent to user while they wear entity as a clothing.
  6. /// </summary>
  7. [RegisterComponent]
  8. public sealed partial class AddAccentClothingComponent : Component
  9. {
  10. /// <summary>
  11. /// Component name for accent that will be applied.
  12. /// </summary>
  13. [DataField("accent", required: true)]
  14. public string Accent = default!;
  15. /// <summary>
  16. /// What <see cref="ReplacementAccentPrototype"/> to use.
  17. /// Will be applied only with <see cref="ReplacementAccentComponent"/>.
  18. /// </summary>
  19. [DataField("replacement", customTypeSerializer: typeof(PrototypeIdSerializer<ReplacementAccentPrototype>))]
  20. public string? ReplacementPrototype;
  21. /// <summary>
  22. /// Is that clothing is worn and affecting someones accent?
  23. /// </summary>
  24. public bool IsActive = false;
  25. }