RotatableComponent.cs 957 B

123456789101112131415161718192021222324252627
  1. namespace Content.Shared.Rotatable
  2. {
  3. [RegisterComponent]
  4. public sealed partial class RotatableComponent : Component
  5. {
  6. /// <summary>
  7. /// If true, this entity can be rotated even while anchored.
  8. /// </summary>
  9. [ViewVariables(VVAccess.ReadWrite)]
  10. [DataField("rotateWhileAnchored")]
  11. public bool RotateWhileAnchored { get; private set; }
  12. /// <summary>
  13. /// If true, will rotate entity in players direction when pulled
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite)]
  16. [DataField("rotateWhilePulling")]
  17. public bool RotateWhilePulling { get; private set; } = true;
  18. /// <summary>
  19. /// The angular value to change when using the rotate verbs.
  20. /// </summary>
  21. [ViewVariables(VVAccess.ReadWrite)]
  22. [DataField("increment")]
  23. public Angle Increment { get; private set; } = Angle.FromDegrees(90);
  24. }
  25. }