BatteryWeaponPowerCell tweaks (#33500)
* BatteryWeaponPowerCell tweaks * add update ammo ev & shuttle guns tweaks * MilonPL requested changes * revert changes in OnPowerCellChanged * Add events to get charge info & change current charge --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
@@ -38,4 +38,30 @@ namespace Content.Server.Power.Components
|
||||
/// </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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user