Refactors radiation (#2009)

* Work on refactoring radiation.

* mmmm grayons

* fixes

* Now you can specify whether the pulse will decay or not

* whoops

* Move IRadiationAct to shared, make DamageableComponent implement it instead and add metallic resistances to walls

* General improvements, send draw and decay with state. Rename DPS to RadsPerSecond

* E N T I T Y  C O O R D I N A T E S

* Entity coordinates goood

* Remove unused using statements

* resistances: metallicResistances

* - type: Breakable moment

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Víctor Aguilera Puerto
2020-09-21 01:49:40 +02:00
committed by GitHub
parent 2927ab5cd1
commit 6ec2939f15
37 changed files with 250 additions and 123 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.GameObjects.Components.StationEvents;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.Utility;
using JetBrains.Annotations;
@@ -114,7 +115,8 @@ namespace Content.Server.StationEvents
private void SpawnPulse(IMapGrid mapGrid)
{
_entityManager.SpawnEntity("RadiationPulse", FindRandomGrid(mapGrid));
var pulse = _entityManager.SpawnEntity("RadiationPulse", FindRandomGrid(mapGrid));
pulse.GetComponent<RadiationPulseComponent>().DoPulse();
_timeUntilPulse = _robustRandom.NextFloat() * (MaxPulseDelay - MinPulseDelay) + MinPulseDelay;
_pulsesRemaining -= 1;
}