Explosion refactor TEST MERG (#6995)
* Explosions * fix yaml typo and prevent silly UI inputs * oop Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
@@ -245,14 +245,14 @@ namespace Content.Server.Atmos.Components
|
||||
var range = (pressure - TankFragmentPressure) / TankFragmentScale;
|
||||
|
||||
// Let's cap the explosion, yeah?
|
||||
// !1984
|
||||
if (range > MaxExplosionRange)
|
||||
{
|
||||
range = MaxExplosionRange;
|
||||
}
|
||||
|
||||
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(Owner, (int) (range * 0.25f), (int) (range * 0.5f), (int) (range * 1.5f), 1);
|
||||
EntitySystem.Get<ExplosionSystem>().TriggerExplosive(Owner, radius: range);
|
||||
|
||||
_entMan.QueueDeleteEntity(Owner);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Kudzu;
|
||||
using Content.Shared.Atmos;
|
||||
using JetBrains.Annotations;
|
||||
@@ -14,6 +15,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
||||
[Dependency] private readonly ExplosionSystem _explosionSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -104,6 +106,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (!gridId.IsValid())
|
||||
return;
|
||||
|
||||
_explosionSystem.UpdateAirtightMap(gridId, pos);
|
||||
_atmosphereSystem.UpdateAdjacent(gridId, pos);
|
||||
_atmosphereSystem.InvalidateTile(gridId, pos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user