mix.AdjustMoles(component.SupercriticalGas, component.SupercriticalMoleAmount);
mix.Temperature += component.HotspotExposeTemperature;
- _atmosphere.HotspotExpose(grid.Value, indices, component.HotspotExposeTemperature, mix.Volume, true);
+ _atmosphere.HotspotExpose(grid.Value, indices, component.HotspotExposeTemperature, mix.Volume, uid, true);
}
}
IgniteNearby(xform.Coordinates, 1, component.MaximumIgnitionRadius * 2);
if (grid != null && anom.Severity > pyro.AnomalyHotspotThreshold)
{
- _atmosphere.HotspotExpose(grid.Value, indices, pyro.HotspotExposeTemperature, pyro.HotspotExposeVolume, true);
+ _atmosphere.HotspotExpose(grid.Value, indices, pyro.HotspotExposeTemperature, pyro.HotspotExposeVolume, ent, true);
}
}
}
RaiseLocalEvent(gridUid, ref ev);
}
- public void HotspotExpose(EntityUid gridUid, Vector2i tile, float exposedTemperature, float exposedVolume, bool soh = false)
+ public void HotspotExpose(EntityUid gridUid, Vector2i tile, float exposedTemperature, float exposedVolume,
+ EntityUid? sparkSourceUid = null, bool soh = false)
{
- var ev = new HotspotExposeMethodEvent(gridUid, tile, exposedTemperature, exposedVolume, soh);
+ var ev = new HotspotExposeMethodEvent(gridUid, sparkSourceUid, tile, exposedTemperature, exposedVolume, soh);
RaiseLocalEvent(gridUid, ref ev);
}
[ByRefEvent] private record struct IsTileAirBlockedMethodEvent
(EntityUid Grid, Vector2i Tile, AtmosDirection Direction = AtmosDirection.All, MapGridComponent? MapGridComponent = null, bool Result = false, bool Handled = false)
{
- /// <summary>
+ /// <summary>
/// True if one of the enabled blockers has <see cref="AirtightComponent.NoAirWhenFullyAirBlocked"/>. Note
/// that this does not actually check if all directions are blocked.
/// </summary>
(EntityUid Grid, Vector2i Tile, MapGridComponent? MapGridComponent = null, bool Handled = false);
[ByRefEvent] private record struct HotspotExposeMethodEvent
- (EntityUid Grid, Vector2i Tile, float ExposedTemperature, float ExposedVolume, bool soh, bool Handled = false);
+ (EntityUid Grid, EntityUid? SparkSourceUid, Vector2i Tile, float ExposedTemperature, float ExposedVolume, bool soh, bool Handled = false);
[ByRefEvent] private record struct HotspotExtinguishMethodEvent
(EntityUid Grid, Vector2i Tile, bool Handled = false);
if (!component.Tiles.TryGetValue(args.Tile, out var tile))
return;
- HotspotExpose(component, tile, args.ExposedTemperature, args.ExposedVolume, args.soh);
+ HotspotExpose(component, tile, args.ExposedTemperature, args.ExposedVolume, args.soh, args.SparkSourceUid);
args.Handled = true;
}
using Content.Server.Atmos.Reactions;
using Content.Shared.Atmos;
using Content.Shared.Audio;
+using Content.Shared.Database;
using Robust.Shared.Audio;
using Robust.Shared.Map;
using Robust.Shared.Player;
// TODO ATMOS Maybe destroy location here?
}
- private void HotspotExpose(GridAtmosphereComponent gridAtmosphere, TileAtmosphere tile, float exposedTemperature, float exposedVolume, bool soh = false)
+ private void HotspotExpose(GridAtmosphereComponent gridAtmosphere, TileAtmosphere tile,
+ float exposedTemperature, float exposedVolume, bool soh = false, EntityUid? sparkSourceUid = null)
{
if (tile.Air == null)
return;
if ((exposedTemperature > Atmospherics.PlasmaMinimumBurnTemperature) && (plasma > 0.5f || tritium > 0.5f))
{
+ if (sparkSourceUid.HasValue)
+ _adminLog.Add(LogType.Flammable, LogImpact.High, $"Heat/spark of {ToPrettyString(sparkSourceUid.Value)} caused atmos ignition of gas: {tile.Air.Temperature.ToString():temperature}K - {oxygen}mol Oxygen, {plasma}mol Plasma, {tritium}mol Tritium");
+
tile.Hotspot = new Hotspot
{
Volume = exposedVolume * 25f,
State = 1
};
-
AddActiveTile(gridAtmosphere, tile);
gridAtmosphere.HotspotTiles.Add(tile);
}
{
_atmosphereSystem.HotspotExpose(transform.GridUid.Value,
_transformSystem.GetGridOrMapTilePosition(uid, transform),
- 700f, 50f, true);
+ 700f, 50f, uid, true);
}
if (transform.GridUid is { } gridUid)
{
var position = _transformSystem.GetGridOrMapTilePosition(source, transform);
- _atmosphereSystem.HotspotExpose(gridUid, position, component.Temperature, 50, true);
+ _atmosphereSystem.HotspotExpose(gridUid, position, component.Temperature, 50, source, true);
}
}
var position = _transformSystem.GetGridOrMapTilePosition(match.Owner, xform);
- _atmosphereSystem.HotspotExpose(gridUid, position, 400, 50, true);
+ _atmosphereSystem.HotspotExpose(gridUid, position, 400, 50, match.Owner, true);
}
}
if (transform.GridUid is {} gridUid)
{
var position = _transformSystem.GetGridOrMapTilePosition(uid, transform);
- _atmos.HotspotExpose(gridUid, position, smokable.ExposeTemperature, smokable.ExposeVolume, true);
+ _atmos.HotspotExpose(gridUid, position, smokable.ExposeTemperature, smokable.ExposeVolume, uid, true);
}
}
// Don't want it to be so obnoxious as to instantly murder anyone in the area but enough that
// it COULD start potentially start a bigger fire.
- _atmosphere.HotspotExpose(_targetGrid, _targetTile, 700f, 50f, true);
+ _atmosphere.HotspotExpose(_targetGrid, _targetTile, 700f, 50f, null, true);
SoundSystem.Play("/Audio/Effects/sparks4.ogg", Filter.Pvs(_targetCoords), _targetCoords);
}
}
if (transform.GridUid is {} gridUid)
{
var position = _transformSystem.GetGridOrMapTilePosition(uid, transform);
- _atmosphereSystem.HotspotExpose(gridUid, position, 700, 50, true);
+ _atmosphereSystem.HotspotExpose(gridUid, position, 700, 50, uid, true);
}
_entityManager.Dirty(welder);