* First commit * Fixes * Added the noise * Renames * Timespan * Fixed space * entity -> ent * This shouldn't work * opps.... * Datafield name change * Better comments * small comment * Personal skill issue * Event renames and stuff * Couple fixes * Defib ref fixes (Silly me) * Added clumsy back! * no hard code clumsy! * Identity fix * Event name change * Comment change * Function name change * opp * Update names * Damage stuff! * Fixes! * Fixes * opps * This was hidden away!! * negative diff feeds me
40 lines
1.6 KiB
C#
40 lines
1.6 KiB
C#
using Content.Shared.Inventory;
|
|
|
|
namespace Content.Shared.Medical;
|
|
|
|
[ByRefEvent]
|
|
public readonly record struct TargetDefibrillatedEvent(EntityUid User, Entity<DefibrillatorComponent> Defibrillator);
|
|
|
|
public abstract class BeforeDefibrillatorZapsEvent : CancellableEntityEventArgs, IInventoryRelayEvent
|
|
{
|
|
public SlotFlags TargetSlots { get; } = SlotFlags.WITHOUT_POCKET;
|
|
public EntityUid EntityUsingDefib;
|
|
public readonly EntityUid Defib;
|
|
public EntityUid DefibTarget;
|
|
|
|
public BeforeDefibrillatorZapsEvent(EntityUid entityUsingDefib, EntityUid defib, EntityUid defibTarget)
|
|
{
|
|
EntityUsingDefib = entityUsingDefib;
|
|
Defib = defib;
|
|
DefibTarget = defibTarget;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// This event is raised on the user using the defibrillator before is actually zaps someone.
|
|
/// The event is triggered on the user and all their clothing.
|
|
/// </summary>
|
|
public sealed class SelfBeforeDefibrillatorZapsEvent : BeforeDefibrillatorZapsEvent
|
|
{
|
|
public SelfBeforeDefibrillatorZapsEvent(EntityUid entityUsingDefib, EntityUid defib, EntityUid defibtarget) : base(entityUsingDefib, defib, defibtarget) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// This event is raised on the target before it gets zapped with the defibrillator.
|
|
/// The event is triggered on the target itself and all its clothing.
|
|
/// </summary>
|
|
public sealed class TargetBeforeDefibrillatorZapsEvent : BeforeDefibrillatorZapsEvent
|
|
{
|
|
public TargetBeforeDefibrillatorZapsEvent(EntityUid entityUsingDefib, EntityUid defib, EntityUid defibtarget) : base(entityUsingDefib, defib, defibtarget) { }
|
|
}
|