From 2f37923db622ed66c63282aa562d8913100c895f Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Sat, 28 Jun 2025 15:34:15 -0400 Subject: [PATCH] Cleanup prototype instantiation in `ExplosionSystem` (#38642) Cleanup prototype instantiation in ExplosionSystem --- .../Explosion/EntitySystems/ExplosionSystem.Processing.cs | 4 ++-- Content.Server/Explosion/EntitySystems/ExplosionSystem.cs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs index 3f08532e37..b61f78e909 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs @@ -913,10 +913,10 @@ sealed class Explosion /// /// Data needed to spawn an explosion with . /// -public sealed class QueuedExplosion +public sealed class QueuedExplosion(ExplosionPrototype proto) { public MapCoordinates Epicenter; - public ExplosionPrototype Proto = new(); + public ExplosionPrototype Proto = proto; public float TotalIntensity, Slope, MaxTileIntensity, TileBreakScale; public int MaxTileBreak; public bool CanCreateVacuum; diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs index ffdc90f9d6..0cdc6d6b23 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs @@ -306,10 +306,9 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem return; } - var boom = new QueuedExplosion() + var boom = new QueuedExplosion(type) { Epicenter = epicenter, - Proto = type, TotalIntensity = totalIntensity, Slope = slope, MaxTileIntensity = maxTileIntensity,