Move TimedDespawn to engine (#20515)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Content.Shared.Radiation.Systems;
|
||||
using Content.Shared.Spawners.Components;
|
||||
|
||||
namespace Content.Shared.Radiation.Components;
|
||||
|
||||
@@ -18,7 +17,7 @@ public sealed partial class RadiationPulseComponent : Component
|
||||
|
||||
/// <summary>
|
||||
/// How long will animation play in seconds.
|
||||
/// Can be overridden by <see cref="TimedDespawnComponent"/>.
|
||||
/// Can be overridden by <see cref="Robust.Shared.Spawners.TimedDespawnComponent"/>.
|
||||
/// </summary>
|
||||
public float VisualDuration = 2f;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Content.Shared.Radiation.Components;
|
||||
using Content.Shared.Spawners.Components;
|
||||
using Robust.Shared.Spawners;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared.Radiation.Systems;
|
||||
@@ -25,7 +25,7 @@ public sealed class RadiationPulseSystem : EntitySystem
|
||||
}
|
||||
// try to get radiation range or keep default visual range
|
||||
if (TryComp<RadiationSourceComponent>(uid, out var radSource))
|
||||
{
|
||||
{
|
||||
component.VisualRange = radSource.Intensity / radSource.Slope;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user