1
0

CluwneComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Robust.Shared.Audio;
  2. using Content.Shared.Chat.Prototypes;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  5. namespace Content.Shared.Cluwne;
  6. [RegisterComponent]
  7. [NetworkedComponent]
  8. public sealed partial class CluwneComponent : Component
  9. {
  10. /// <summary>
  11. /// timings for giggles and knocks.
  12. /// </summary>
  13. [ViewVariables(VVAccess.ReadWrite)]
  14. public TimeSpan DamageGiggleCooldown = TimeSpan.FromSeconds(2);
  15. [ViewVariables(VVAccess.ReadWrite)]
  16. public float KnockChance = 0.05f;
  17. [ViewVariables(VVAccess.ReadWrite)]
  18. public float GiggleRandomChance = 0.1f;
  19. [DataField("emoteId", customTypeSerializer: typeof(PrototypeIdSerializer<EmoteSoundsPrototype>))]
  20. public string? EmoteSoundsId = "Cluwne";
  21. /// <summary>
  22. /// Amount of time cluwne is paralyzed for when falling over.
  23. /// </summary>
  24. [ViewVariables(VVAccess.ReadWrite)]
  25. public float ParalyzeTime = 2f;
  26. /// <summary>
  27. /// Sound specifiers for honk and knock.
  28. /// </summary>
  29. [DataField("spawnsound")]
  30. public SoundSpecifier SpawnSound = new SoundPathSpecifier("/Audio/Items/bikehorn.ogg");
  31. [DataField("knocksound")]
  32. public SoundSpecifier KnockSound = new SoundPathSpecifier("/Audio/Items/airhorn.ogg");
  33. }