Remove IRadiationAct (#7757)
* Move radiation collector to ECS * Damagable system * Remove IRadiationAct * Add small helper field * Update Content.Server/Radiation/Systems/RadiationSystem.cs Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> * Delete comment * Fixed total rads Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
20
Content.Shared/Radiation/Events/OnIrradiatedEvent.cs
Normal file
20
Content.Shared/Radiation/Events/OnIrradiatedEvent.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Content.Shared.Radiation.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Raised on entity when it was irradiated
|
||||
/// by some radiation source.
|
||||
/// </summary>
|
||||
public sealed class OnIrradiatedEvent : EntityEventArgs
|
||||
{
|
||||
public readonly float FrameTime;
|
||||
|
||||
public readonly float RadsPerSecond;
|
||||
|
||||
public float TotalRads => RadsPerSecond * FrameTime;
|
||||
|
||||
public OnIrradiatedEvent(float frameTime, float radsPerSecond)
|
||||
{
|
||||
FrameTime = frameTime;
|
||||
RadsPerSecond = radsPerSecond;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user