From: JesterX666 <32009105+JesterX666@users.noreply.github.com> Date: Mon, 15 Dec 2025 23:27:40 +0000 (-0500) Subject: Ignite atmosphere on explosions (#41262) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=b17ee1c882cc7b46304773d80797c1baffd1f13d;p=space-station-14.git Ignite atmosphere on explosions (#41262) * Ignite atmosphere on explosions * Fixed to add a temperature property * Code review corrections * Removed unused usings * Correction to use TryComp instead of EntityManager to make it prettier * Code review corrections * Code review corrections * Corrections * misc fixes --------- Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com> --- diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs index c6528b0142..2cec8d707a 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs @@ -1,4 +1,3 @@ -using System.Numerics; using Content.Shared.CCVar; using Content.Shared.Damage; using Content.Shared.Damage.Components; @@ -17,6 +16,7 @@ using Robust.Shared.Physics.Dynamics; using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Utility; +using System.Numerics; using TimedDespawnComponent = Robust.Shared.Spawners.TimedDespawnComponent; namespace Content.Server.Explosion.EntitySystems; @@ -202,6 +202,8 @@ public sealed partial class ExplosionSystem HashSet processed, string id, float? fireStacks, + float? temperature, + float currentIntensity, EntityUid? cause) { var size = grid.Comp.TileSize; @@ -234,6 +236,12 @@ public sealed partial class ExplosionSystem ProcessEntity(entity, epicenter, damage, throwForce, id, null, fireStacks, cause); } + // heat the atmosphere + if (temperature != null) + { + _atmosphere.HotspotExpose(grid.Owner, tile, temperature.Value, currentIntensity, cause, true); + } + // Walls and reinforced walls will break into girders. These girders will also be considered turf-blocking for // the purposes of destroying floors. Again, ideally the process of damaging an entity should somehow return // information about the entities that were spawned as a result, but without that information we just have to @@ -457,7 +465,7 @@ public sealed partial class ExplosionSystem } } - // ignite + // ignite entities with the flammable component if (fireStacksOnIgnite != null) { if (_flammableQuery.TryGetComponent(uid, out var flammable)) @@ -855,6 +863,8 @@ sealed class Explosion ProcessedEntities, ExplosionType.ID, ExplosionType.FireStacks, + ExplosionType.Temperature, + _currentIntensity, Cause); // If the floor is not blocked by some dense object, damage the floor tiles. diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs index b5163c6157..4824810dae 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs @@ -54,6 +54,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem [Dependency] private readonly SharedMapSystem _map = default!; [Dependency] private readonly FlammableSystem _flammableSystem = default!; [Dependency] private readonly DestructibleSystem _destructibleSystem = default!; + [Dependency] private readonly AtmosphereSystem _atmosphere = default!; private EntityQuery _flammableQuery; private EntityQuery _physicsQuery; diff --git a/Content.Shared/Explosion/ExplosionPrototype.cs b/Content.Shared/Explosion/ExplosionPrototype.cs index b20c6891a8..2ab9508ded 100644 --- a/Content.Shared/Explosion/ExplosionPrototype.cs +++ b/Content.Shared/Explosion/ExplosionPrototype.cs @@ -31,6 +31,12 @@ public sealed partial class ExplosionPrototype : IPrototype [DataField] public float? FireStacks; + /// + /// Temperature of the explosion + /// + [DataField] + public float? Temperature; + /// /// This set of points, together with define a function that maps the /// explosion intensity to a tile break chance via linear interpolation. diff --git a/Resources/Prototypes/explosion.yml b/Resources/Prototypes/explosion.yml index 4d3febeda7..2c97f5b755 100644 --- a/Resources/Prototypes/explosion.yml +++ b/Resources/Prototypes/explosion.yml @@ -11,6 +11,7 @@ lightColor: Orange texturePath: /Textures/Effects/fire.rsi fireStates: 3 + temperature: 800 - type: explosion id: DemolitionCharge @@ -26,6 +27,7 @@ lightColor: Orange texturePath: /Textures/Effects/fire.rsi fireStates: 3 + temperature: 800 - type: explosion id: MicroBomb @@ -42,6 +44,7 @@ lightColor: Orange texturePath: /Textures/Effects/fire.rsi fireStates: 3 + temperature: 800 - type: explosion id: Radioactive @@ -83,6 +86,7 @@ lightColor: Orange texturePath: /Textures/Effects/fire.rsi fireStates: 3 + temperature: 800 - type: explosion id: PowerSink @@ -99,6 +103,7 @@ lightColor: Orange texturePath: /Textures/Effects/fire.rsi fireStates: 3 + temperature: 800 - type: explosion id: HardBomb @@ -115,6 +120,7 @@ lightColor: Orange texturePath: /Textures/Effects/fire.rsi fireStates: 3 + temperature: 800 - type: explosion id: FireBomb @@ -127,3 +133,4 @@ texturePath: /Textures/Effects/fire.rsi fireStates: 3 fireStacks: 2 + temperature: 1500