AutoEmotePrototype.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. namespace Content.Shared.Chat.Prototypes;
  4. [Prototype]
  5. public sealed partial class AutoEmotePrototype : IPrototype
  6. {
  7. /// <inheritdoc/>
  8. [IdDataField]
  9. public string ID { get; private set; } = default!;
  10. /// <summary>
  11. /// The ID of the emote prototype.
  12. /// </summary>
  13. [DataField("emote", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EmotePrototype>))]
  14. public string EmoteId = String.Empty;
  15. /// <summary>
  16. /// How often an attempt at the emote will be made.
  17. /// </summary>
  18. [DataField("interval", required: true)]
  19. public TimeSpan Interval;
  20. /// <summary>
  21. /// Probability of performing the emote each interval.
  22. /// <summary>
  23. [DataField("chance")]
  24. public float Chance = 1;
  25. /// <summary>
  26. /// Also send the emote in chat.
  27. /// <summary>
  28. [DataField("withChat")]
  29. public bool WithChat = true;
  30. /// <summary>
  31. /// Hide the chat message from the chat window, only showing the popup.
  32. /// This does nothing if WithChat is false.
  33. /// <summary>
  34. [DataField("hiddenFromChatWindow")]
  35. public bool HiddenFromChatWindow = false;
  36. }