2021-05-05 06:29:26 +03:00
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
2021-12-31 02:20:22 +00:00
|
|
|
using Robust.Shared.Maths;
|
2021-05-05 06:29:26 +03:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Rotatable
|
2021-05-05 06:29:26 +03:00
|
|
|
{
|
2021-10-05 14:29:03 +11:00
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class RotatableComponent : Component
|
2021-05-05 06:29:26 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If true, this entity can be rotated even while anchored.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("rotateWhileAnchored")]
|
2022-02-21 14:41:50 +11:00
|
|
|
public bool RotateWhileAnchored { get; private set; }
|
2021-05-05 06:29:26 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If true, will rotate entity in players direction when pulled
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("rotateWhilePulling")]
|
2022-02-21 14:41:50 +11:00
|
|
|
public bool RotateWhilePulling { get; private set; } = true;
|
2021-12-31 02:20:22 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The angular value to change when using the rotate verbs.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("increment")]
|
2022-02-21 14:41:50 +11:00
|
|
|
public Angle Increment { get; private set; } = Angle.FromDegrees(90);
|
2021-05-05 06:29:26 +03:00
|
|
|
}
|
|
|
|
|
}
|