2022-01-10 17:37:20 +13:00
|
|
|
using Content.Shared.Inventory;
|
2021-10-25 16:21:56 +02:00
|
|
|
|
|
|
|
|
namespace Content.Shared.Electrocution
|
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class ElectrocutionAttemptEvent : CancellableEntityEventArgs, IInventoryRelayEvent
|
2021-10-25 16:21:56 +02:00
|
|
|
{
|
2022-09-06 04:48:35 +02:00
|
|
|
public SlotFlags TargetSlots { get; }
|
2022-01-10 17:37:20 +13:00
|
|
|
|
2021-10-25 16:21:56 +02:00
|
|
|
public readonly EntityUid TargetUid;
|
|
|
|
|
public readonly EntityUid? SourceUid;
|
|
|
|
|
public float SiemensCoefficient = 1f;
|
|
|
|
|
|
2022-09-06 04:48:35 +02:00
|
|
|
public ElectrocutionAttemptEvent(EntityUid targetUid, EntityUid? sourceUid, float siemensCoefficient, SlotFlags targetSlots)
|
2021-10-25 16:21:56 +02:00
|
|
|
{
|
|
|
|
|
TargetUid = targetUid;
|
2022-09-06 17:10:07 +02:00
|
|
|
TargetSlots = targetSlots;
|
2021-10-25 16:21:56 +02:00
|
|
|
SourceUid = sourceUid;
|
|
|
|
|
SiemensCoefficient = siemensCoefficient;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class ElectrocutedEvent : EntityEventArgs
|
2021-10-25 16:21:56 +02:00
|
|
|
{
|
|
|
|
|
public readonly EntityUid TargetUid;
|
|
|
|
|
public readonly EntityUid? SourceUid;
|
|
|
|
|
public readonly float SiemensCoefficient;
|
|
|
|
|
|
|
|
|
|
public ElectrocutedEvent(EntityUid targetUid, EntityUid? sourceUid, float siemensCoefficient)
|
|
|
|
|
{
|
|
|
|
|
TargetUid = targetUid;
|
|
|
|
|
SourceUid = sourceUid;
|
|
|
|
|
SiemensCoefficient = siemensCoefficient;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|