Raise power events by ref and not broadcast (#11923)
Also some other minor stuff.
This commit is contained in:
@@ -71,15 +71,10 @@ namespace Content.Server.Power.Components
|
||||
/// <summary>
|
||||
/// Raised whenever an ApcPowerReceiver becomes powered / unpowered.
|
||||
/// </summary>
|
||||
public sealed class PowerChangedEvent : EntityEventArgs
|
||||
[ByRefEvent]
|
||||
public readonly record struct PowerChangedEvent(bool Powered, float ReceivingPower)
|
||||
{
|
||||
public readonly bool Powered;
|
||||
public readonly float ReceivingPower;
|
||||
|
||||
public PowerChangedEvent(bool powered, float receivingPower)
|
||||
{
|
||||
Powered = powered;
|
||||
ReceivingPower = receivingPower;
|
||||
}
|
||||
public readonly bool Powered = Powered;
|
||||
public readonly float ReceivingPower = ReceivingPower;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user