Radiation pulse ECS (#10641)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Radiation;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
@@ -12,7 +11,6 @@ public sealed class RadiateArtifactComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Radiation pulse prototype to spawn.
|
||||
/// Should has <see cref="RadiationPulseComponent"/>.
|
||||
/// </summary>
|
||||
[DataField("pulsePrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string PulsePrototype = "RadiationPulse";
|
||||
|
||||
@@ -15,11 +15,6 @@ public sealed class RadiateArtifactSystem : EntitySystem
|
||||
private void OnActivate(EntityUid uid, RadiateArtifactComponent component, ArtifactActivatedEvent args)
|
||||
{
|
||||
var transform = Transform(uid);
|
||||
|
||||
var pulseUid = EntityManager.SpawnEntity(component.PulsePrototype, transform.Coordinates);
|
||||
if (!TryComp(pulseUid, out RadiationPulseComponent? pulse))
|
||||
return;
|
||||
|
||||
pulse.DoPulse();
|
||||
EntityManager.SpawnEntity(component.PulsePrototype, transform.Coordinates);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user