2022-05-13 00:59:03 -07:00
|
|
|
|
namespace Content.Shared.Throwing
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ThrowAttemptEvent : CancellableEntityEventArgs
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2022-07-27 19:28:23 -04:00
|
|
|
|
public ThrowAttemptEvent(EntityUid uid, EntityUid itemUid)
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2021-11-09 13:20:55 +01:00
|
|
|
|
Uid = uid;
|
2022-07-27 19:28:23 -04:00
|
|
|
|
ItemUid = itemUid;
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-11-09 13:20:55 +01:00
|
|
|
|
public EntityUid Uid { get; }
|
2022-07-27 19:28:23 -04:00
|
|
|
|
|
|
|
|
|
|
public EntityUid ItemUid { get; }
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|
2021-06-28 14:17:08 +10:00
|
|
|
|
|
2024-07-20 01:06:52 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Raised on the item entity that is thrown.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="User">The user that threw this entity.</param>
|
|
|
|
|
|
/// <param name="Cancelled">Whether or not the throw should be cancelled.</param>
|
|
|
|
|
|
[ByRefEvent]
|
|
|
|
|
|
public record struct ThrowItemAttemptEvent(EntityUid User, bool Cancelled = false);
|
|
|
|
|
|
|
2021-06-28 14:17:08 +10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Raised when we try to pushback an entity from throwing
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public sealed class ThrowPushbackAttemptEvent : CancellableEntityEventArgs {}
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|