Files
tbd-station-14/Content.Shared/Power/ChargeEvents.cs
slarticodefast 5227489360 Predict EMPs (#39802)
* predicted emps

* fixes

* fix

* review
2025-10-04 11:24:42 +00:00

34 lines
862 B
C#

namespace Content.Shared.Power;
/// <summary>
/// Raised when a battery's charge or capacity changes (capacity affects relative charge percentage).
/// </summary>
[ByRefEvent]
public readonly record struct ChargeChangedEvent(float Charge, float MaxCharge);
/// <summary>
/// Raised when it is necessary to get information about battery charges.
/// </summary>
[ByRefEvent]
public sealed class GetChargeEvent : EntityEventArgs
{
public float CurrentCharge;
public float MaxCharge;
}
/// <summary>
/// Raised when it is necessary to change the current battery charge to a some value.
/// </summary>
[ByRefEvent]
public sealed class ChangeChargeEvent : EntityEventArgs
{
public float OriginalValue;
public float ResidualValue;
public ChangeChargeEvent(float value)
{
OriginalValue = value;
ResidualValue = value;
}
}