2021-12-30 22:56:10 +01:00
|
|
|
namespace Content.Shared.Inventory.Events;
|
|
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
public abstract class UnequipAttemptEventBase : CancellableEntityEventArgs
|
2021-06-19 10:03:24 +02:00
|
|
|
{
|
2021-12-30 22:56:10 +01:00
|
|
|
/// <summary>
|
2022-01-02 06:03:29 +13:00
|
|
|
/// The entity performing the action. NOT necessarily the same as the entity whose equipment is being removed..
|
2021-12-30 22:56:10 +01:00
|
|
|
/// </summary>
|
|
|
|
|
public readonly EntityUid Unequipee;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The entity being unequipped from.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly EntityUid UnEquipTarget;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The entity to be unequipped.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly EntityUid Equipment;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The slot the entity is being unequipped from.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly string Slot;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If cancelling and wanting to provide a custom reason, use this field. Not that this expects a loc-id.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string? Reason;
|
|
|
|
|
|
|
|
|
|
public UnequipAttemptEventBase(EntityUid unequipee, EntityUid unEquipTarget, EntityUid equipment,
|
|
|
|
|
SlotDefinition slotDefinition)
|
2021-06-19 10:03:24 +02:00
|
|
|
{
|
2021-12-30 22:56:10 +01:00
|
|
|
UnEquipTarget = unEquipTarget;
|
|
|
|
|
Equipment = equipment;
|
|
|
|
|
Unequipee = unequipee;
|
|
|
|
|
Slot = slotDefinition.Name;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-06-19 10:03:24 +02:00
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class BeingUnequippedAttemptEvent : UnequipAttemptEventBase
|
2021-12-30 22:56:10 +01:00
|
|
|
{
|
|
|
|
|
public BeingUnequippedAttemptEvent(EntityUid unequipee, EntityUid unEquipTarget, EntityUid equipment,
|
|
|
|
|
SlotDefinition slotDefinition) : base(unequipee, unEquipTarget, equipment, slotDefinition)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class IsUnequippingAttemptEvent : UnequipAttemptEventBase
|
2021-12-30 22:56:10 +01:00
|
|
|
{
|
|
|
|
|
public IsUnequippingAttemptEvent(EntityUid unequipee, EntityUid unEquipTarget, EntityUid equipment,
|
|
|
|
|
SlotDefinition slotDefinition) : base(unequipee, unEquipTarget, equipment, slotDefinition)
|
|
|
|
|
{
|
2021-06-19 10:03:24 +02:00
|
|
|
}
|
|
|
|
|
}
|