make pyroclastic anomaly ignition ignore line of sight checks. (#17798)

This commit is contained in:
Nemanja
2023-07-03 17:35:57 -04:00
committed by GitHub
parent b6643bec7f
commit 85f5507ce9
2 changed files with 3 additions and 35 deletions

View File

@@ -1,6 +1,5 @@
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Interaction;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects.Components;
using Robust.Shared.Map;
@@ -14,7 +13,6 @@ public sealed class PyroclasticAnomalySystem : EntitySystem
{
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly FlammableSystem _flammable = default!;
[Dependency] private readonly InteractionSystem _interaction = default!;
/// <inheritdoc/>
public override void Initialize()
@@ -41,10 +39,7 @@ public sealed class PyroclasticAnomalySystem : EntitySystem
foreach (var flammable in _lookup.GetComponentsInRange<FlammableComponent>(coordinates, radius))
{
var ent = flammable.Owner;
if (!_interaction.InRangeUnobstructed(coordinates.ToMap(EntityManager), ent, -1))
continue;
var stackAmount = 1 + (int) (severity / 0.25f);
var stackAmount = 1 + (int) (severity / 0.15f);
_flammable.AdjustFireStacks(ent, stackAmount, flammable);
_flammable.Ignite(ent, flammable);
}

View File

@@ -1,38 +1,11 @@
using Content.Shared.Atmos;
namespace Content.Shared.Anomaly.Effects.Components;
namespace Content.Shared.Anomaly.Effects.Components;
[RegisterComponent]
public sealed class PyroclasticAnomalyComponent : Component
{
/// <summary>
/// The maximum distance from which you can be ignited by the anomaly.
/// </summary>
[DataField("maximumIgnitionRadius")]
public float MaximumIgnitionRadius = 8f;
/// <summary>
/// The temperature of the hotspot where the anomaly is
/// </summary>
[DataField("hotspotExposeTemperature")]
public float HotspotExposeTemperature = 1000;
/// <summary>
/// The volume of the hotspot where the anomaly is.
/// </summary>
[DataField("hotspotExposeVolume")]
public float HotspotExposeVolume = 50;
/// <summary>
/// Gas released when the anomaly goes supercritical.
/// </summary>
[DataField("supercriticalGas")]
public Gas SupercriticalGas = Gas.Plasma;
/// <summary>
/// The amount of gas released when the anomaly goes supercritical
/// </summary>
[DataField("supercriticalMoleAmount")]
public float SupercriticalMoleAmount = 75f;
public float MaximumIgnitionRadius = 5f;
}