Pulling rework v2 (#24936)
* Pulling rework Fixing up the FOUR systems managing pulling, all the shitcode, and also making it nicer ingame. * More pulling cleanup * stats * More cleanup * First draft * More pulling * weh * Fix puller * Pulling working * Fix merge * Dunked * Self-merge time * Fix hotkey * Fix container changes * oop * Fix multi-pulling * Move alerts cleanup. * pulling fixes
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Movement.Pulling.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies an entity as being pullable by an entity with <see cref="PullerComponent"/>
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
[Access(typeof(Systems.PullingSystem))]
|
||||
public sealed partial class PullableComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The current entity pulling this component.
|
||||
/// </summary>
|
||||
[AutoNetworkedField, DataField]
|
||||
public EntityUid? Puller;
|
||||
|
||||
/// <summary>
|
||||
/// The pull joint.
|
||||
/// </summary>
|
||||
[AutoNetworkedField, DataField]
|
||||
public string? PullJointId;
|
||||
|
||||
public bool BeingPulled => Puller != null;
|
||||
|
||||
/// <summary>
|
||||
/// If the physics component has FixedRotation should we keep it upon being pulled
|
||||
/// </summary>
|
||||
[Access(typeof(Systems.PullingSystem), Other = AccessPermissions.ReadExecute)]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("fixedRotation")]
|
||||
public bool FixedRotationOnPull;
|
||||
|
||||
/// <summary>
|
||||
/// What the pullable's fixedrotation was set to before being pulled.
|
||||
/// </summary>
|
||||
[Access(typeof(Systems.PullingSystem), Other = AccessPermissions.ReadExecute)]
|
||||
[AutoNetworkedField, DataField]
|
||||
public bool PrevFixedRotation;
|
||||
}
|
||||
Reference in New Issue
Block a user