1
0

SpawnExplosionEuiMsg.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Content.Shared.Eui;
  2. using Robust.Shared.Serialization;
  3. using Robust.Shared.Map;
  4. using Content.Shared.Explosion;
  5. using Content.Shared.Explosion.Components;
  6. namespace Content.Shared.Administration;
  7. public static class SpawnExplosionEuiMsg
  8. {
  9. /// <summary>
  10. /// This message is sent to the server to request explosion preview data.
  11. /// </summary>
  12. [Serializable, NetSerializable]
  13. public sealed class PreviewRequest : EuiMessageBase
  14. {
  15. public readonly MapCoordinates Epicenter;
  16. public readonly string TypeId;
  17. public readonly float TotalIntensity;
  18. public readonly float IntensitySlope;
  19. public readonly float MaxIntensity;
  20. public PreviewRequest(MapCoordinates epicenter, string typeId, float totalIntensity, float intensitySlope, float maxIntensity)
  21. {
  22. Epicenter = epicenter;
  23. TypeId = typeId;
  24. TotalIntensity = totalIntensity;
  25. IntensitySlope = intensitySlope;
  26. MaxIntensity = maxIntensity;
  27. }
  28. }
  29. /// <summary>
  30. /// This message is used to send explosion-preview data to the client.
  31. /// </summary>
  32. [Serializable, NetSerializable]
  33. public sealed class PreviewData : EuiMessageBase
  34. {
  35. public readonly float Slope;
  36. public readonly float TotalIntensity;
  37. public readonly ExplosionVisualsState Explosion;
  38. public PreviewData(ExplosionVisualsState explosion, float slope, float totalIntensity)
  39. {
  40. Slope = slope;
  41. TotalIntensity = totalIntensity;
  42. Explosion = explosion;
  43. }
  44. }
  45. }