Adds AttemptEntity(Uns|S)tickEvent. (#20728)

* try-stick

* convert spider charge to attempt-stick-events
This commit is contained in:
TemporalOroboros
2023-10-24 18:45:42 -07:00
committed by GitHub
parent f0c5aa15b8
commit 3007200832
3 changed files with 63 additions and 12 deletions

View File

@@ -1,5 +1,28 @@
namespace Content.Server.Sticky.Events;
/// <summary>
/// Risen on sticky entity to see if it can stick to another entity.
/// </summary>
[ByRefEvent]
public record struct AttemptEntityStickEvent(EntityUid Target, EntityUid User)
{
public readonly EntityUid Target = Target;
public readonly EntityUid User = User;
public bool Cancelled = false;
}
/// <summary>
/// Risen on sticky entity to see if it can unstick from another entity.
/// </summary>
[ByRefEvent]
public record struct AttemptEntityUnstickEvent(EntityUid Target, EntityUid User)
{
public readonly EntityUid Target = Target;
public readonly EntityUid User = User;
public bool Cancelled = false;
}
/// <summary>
/// Risen on sticky entity when it was stuck to other entity.
/// </summary>