1
0

ImmovableRodComponent.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Content.Shared.Damage;
  2. using Robust.Shared.Audio;
  3. namespace Content.Server.ImmovableRod;
  4. [RegisterComponent]
  5. public sealed partial class ImmovableRodComponent : Component
  6. {
  7. public int MobCount = 0;
  8. [DataField("hitSound")]
  9. public SoundSpecifier Sound = new SoundCollectionSpecifier("MetalSlam");
  10. [DataField("hitSoundProbability")]
  11. public float HitSoundProbability = 0.1f;
  12. [DataField("minSpeed")]
  13. public float MinSpeed = 10f;
  14. [DataField("maxSpeed")]
  15. public float MaxSpeed = 35f;
  16. /// <remarks>
  17. /// Stuff like wizard rods might want to set this to false, so that they can set the velocity themselves.
  18. /// </remarks>
  19. [DataField("randomizeVelocity")]
  20. public bool RandomizeVelocity = true;
  21. /// <summary>
  22. /// Overrides the random direction for an immovable rod.
  23. /// </summary>
  24. [DataField("directionOverride")]
  25. public Angle DirectionOverride = Angle.Zero;
  26. /// <summary>
  27. /// With this set to true, rods will automatically set the tiles under them to space.
  28. /// </summary>
  29. [DataField("destroyTiles")]
  30. public bool DestroyTiles = true;
  31. /// <summary>
  32. /// If true, this will gib & delete bodies
  33. /// </summary>
  34. [DataField]
  35. public bool ShouldGib = true;
  36. /// <summary>
  37. /// Damage done, if not gibbing
  38. /// </summary>
  39. [DataField]
  40. public DamageSpecifier? Damage;
  41. }