namespace Content.Server.Sticky.Events;
///
/// Risen on sticky entity to see if it can stick to another entity.
///
[ByRefEvent]
public record struct AttemptEntityStickEvent(EntityUid Target, EntityUid User)
{
public readonly EntityUid Target = Target;
public readonly EntityUid User = User;
public bool Cancelled = false;
}
///
/// Risen on sticky entity to see if it can unstick from another entity.
///
[ByRefEvent]
public record struct AttemptEntityUnstickEvent(EntityUid Target, EntityUid User)
{
public readonly EntityUid Target = Target;
public readonly EntityUid User = User;
public bool Cancelled = false;
}
///
/// Risen on sticky entity when it was stuck to other entity.
///
public sealed class EntityStuckEvent : EntityEventArgs
{
///
/// Entity that was used as a surface for sticky object.
///
public readonly EntityUid Target;
///
/// Entity that stuck sticky object on target.
///
public readonly EntityUid User;
public EntityStuckEvent(EntityUid target, EntityUid user)
{
Target = target;
User = user;
}
}
///
/// Risen on sticky entity when it was unstuck from other entity.
///
public sealed class EntityUnstuckEvent : EntityEventArgs
{
///
/// Entity that was used as a surface for sticky object.
///
public readonly EntityUid Target;
///
/// Entity that unstuck sticky object on target.
///
public readonly EntityUid User;
public EntityUnstuckEvent(EntityUid target, EntityUid user)
{
Target = target;
User = user;
}
}