2025-08-02 17:34:36 -07:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Rotatable;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Allows an entity to be rotated by using a verb.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
|
|
|
public sealed partial class RotatableComponent : Component
|
2021-05-05 06:29:26 +03:00
|
|
|
{
|
2025-08-02 17:34:36 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// If true, this entity can be rotated even while anchored.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public bool RotateWhileAnchored;
|
2021-05-05 06:29:26 +03:00
|
|
|
|
2025-08-02 17:34:36 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// If true, will rotate entity in players direction when pulled
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public bool RotateWhilePulling = true;
|
2021-12-31 02:20:22 +00:00
|
|
|
|
2025-08-02 17:34:36 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// The angular value to change when using the rotate verbs.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public Angle Increment = Angle.FromDegrees(90);
|
2021-05-05 06:29:26 +03:00
|
|
|
}
|