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:
Moony
2022-03-04 13:48:01 -06:00
committed by GitHub
parent 4e203f49d2
commit 4a466f4927
71 changed files with 3958 additions and 760 deletions

View File

@@ -162,22 +162,21 @@ namespace Content.Server.AME
{
if(_cores.Count < 1 || MasterController == null) { return; }
var intensity = 0;
float radius = 0;
/*
* todo: add an exact to the shielding and make this find the core closest to the controller
* so they chain explode, after helpers have been added to make it not cancer
*/
var epicenter = _cores.First();
foreach (AMEShieldComponent core in _cores)
{
intensity += MasterController.InjectionAmount;
radius += MasterController.InjectionAmount;
}
intensity = Math.Min(intensity, 8);
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(epicenter.Owner, intensity / 2, intensity, intensity * 2, intensity * 3);
radius *= 2;
radius = Math.Min(radius, 8);
EntitySystem.Get<ExplosionSystem>().TriggerExplosive(MasterController.Owner, radius: radius, delete: false);
}
}
}