Emergency revert for pulling (#24923)

Revert "Pulling rework (#20906)"

This reverts commit 0d8254b2a2.
This commit is contained in:
Jezithyr
2024-02-03 10:32:30 -08:00
committed by GitHub
parent 914bab19e8
commit c15b0691ec
53 changed files with 1359 additions and 764 deletions

View File

@@ -0,0 +1,17 @@
namespace Content.Shared.Pulling.Events
{
/// <summary>
/// Directed event raised on the pulled to see if it can be pulled.
/// </summary>
public sealed class BeingPulledAttemptEvent : CancellableEntityEventArgs
{
public BeingPulledAttemptEvent(EntityUid puller, EntityUid pulled)
{
Puller = puller;
Pulled = pulled;
}
public EntityUid Puller { get; }
public EntityUid Pulled { get; }
}
}

View File

@@ -0,0 +1,11 @@
using Robust.Shared.Physics.Components;
namespace Content.Shared.Physics.Pull
{
public sealed class PullAttemptEvent : PullMessage
{
public PullAttemptEvent(PhysicsComponent puller, PhysicsComponent pulled) : base(puller, pulled) { }
public bool Cancelled { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using Robust.Shared.Physics.Components;
namespace Content.Shared.Physics.Pull
{
public abstract class PullMessage : EntityEventArgs
{
public readonly PhysicsComponent Puller;
public readonly PhysicsComponent Pulled;
protected PullMessage(PhysicsComponent puller, PhysicsComponent pulled)
{
Puller = puller;
Pulled = pulled;
}
}
}

View File

@@ -0,0 +1,12 @@
using Robust.Shared.Physics.Components;
namespace Content.Shared.Physics.Pull
{
public sealed class PullStartedMessage : PullMessage
{
public PullStartedMessage(PhysicsComponent puller, PhysicsComponent pulled) :
base(puller, pulled)
{
}
}
}

View File

@@ -0,0 +1,11 @@
using Robust.Shared.Physics.Components;
namespace Content.Shared.Physics.Pull
{
public sealed class PullStoppedMessage : PullMessage
{
public PullStoppedMessage(PhysicsComponent puller, PhysicsComponent pulled) : base(puller, pulled)
{
}
}
}

View File

@@ -0,0 +1,17 @@
namespace Content.Shared.Pulling.Events
{
/// <summary>
/// Directed event raised on the puller to see if it can start pulling something.
/// </summary>
public sealed class StartPullAttemptEvent : CancellableEntityEventArgs
{
public StartPullAttemptEvent(EntityUid puller, EntityUid pulled)
{
Puller = puller;
Pulled = pulled;
}
public EntityUid Puller { get; }
public EntityUid Pulled { get; }
}
}