using System.Numerics; namespace Content.Shared.DeviceNetwork.Events; /// /// Event raised before a device network packet is send. /// Subscribed to by other systems to prevent the packet from being sent. /// public sealed class BeforePacketSentEvent : CancellableEntityEventArgs { /// /// The EntityUid of the entity the packet was sent from. /// public readonly EntityUid Sender; public readonly TransformComponent SenderTransform; /// /// The senders current position in world coordinates. /// public readonly Vector2 SenderPosition; /// /// The network the packet will be sent to. /// public readonly string NetworkId; /// /// The frequency the packet is sent on. /// public readonly uint Frequency; public BeforePacketSentEvent(EntityUid sender, TransformComponent xform, Vector2 senderPosition, string networkId, uint frequency) { Sender = sender; SenderTransform = xform; SenderPosition = senderPosition; NetworkId = networkId; Frequency = frequency; } }