using Content.Shared.Radiation.Components; using Content.Shared.Radiation.Systems; using Robust.Shared.Serialization; namespace Content.Shared.Radiation.Events; /// /// Raised on server as networked event when radiation system update its state /// and emitted all rays from rad sources towards rad receivers. /// Contains debug information about rad rays and all blockers on their way. /// /// /// Will be sent only to clients that activated radiation view using console command. /// [Serializable, NetSerializable] public sealed class OnRadiationOverlayUpdateEvent( double elapsedTimeMs, int sourcesCount, int receiversCount, List rays) : EntityEventArgs { /// /// Total time in milliseconds that server took to do radiation processing. /// Exclude time of entities reacting to . /// public readonly double ElapsedTimeMs = elapsedTimeMs; /// /// Total count of entities with on all maps. /// public readonly int SourcesCount = sourcesCount; /// /// Total count of entities with radiation receiver on all maps. /// public readonly int ReceiversCount = receiversCount; /// /// All radiation rays that was processed by radiation system. /// public readonly List Rays = rays; } /// /// Raised when server enabled/disabled radiation debug view for client. /// After that client will start/stop receiving . /// [Serializable, NetSerializable] public sealed class OnRadiationOverlayToggledEvent : EntityEventArgs { /// /// Does debug radiation view enabled. /// public readonly bool IsEnabled; public OnRadiationOverlayToggledEvent(bool isEnabled) { IsEnabled = isEnabled; } } /// /// Raised when grid resistance was update for radiation overlay visualization. /// [Serializable, NetSerializable] public sealed class OnRadiationOverlayResistanceUpdateEvent : EntityEventArgs { /// /// Key is grids uid. Values are tiles with their rad resistance. /// public readonly Dictionary> Grids; public OnRadiationOverlayResistanceUpdateEvent(Dictionary> grids) { Grids = grids; } }