Experimental Anomaly Vessel (#22233)
* experimental anomaly vessel * sprote changes
This commit is contained in:
@@ -44,6 +44,9 @@ public partial class RadiationSystem
|
||||
var sourcesData = new ValueList<(EntityUid, RadiationSourceComponent, TransformComponent, Vector2)>();
|
||||
while (sources.MoveNext(out var uid, out var source, out var sourceTrs))
|
||||
{
|
||||
if (!source.Enabled)
|
||||
continue;
|
||||
|
||||
var worldPos = _transform.GetWorldPosition(sourceTrs, transformQuery);
|
||||
var data = (uid, source, sourceTrs, worldPos);
|
||||
sourcesData.Add(data);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Radiation.Components;
|
||||
using Content.Shared.Radiation.Components;
|
||||
using Content.Shared.Radiation.Events;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Map;
|
||||
@@ -45,6 +46,14 @@ public sealed partial class RadiationSystem : EntitySystem
|
||||
RaiseLocalEvent(uid, msg);
|
||||
}
|
||||
|
||||
public void SetSourceEnabled(Entity<RadiationSourceComponent?> entity, bool val)
|
||||
{
|
||||
if (!Resolve(entity, ref entity.Comp, false))
|
||||
return;
|
||||
|
||||
entity.Comp.Enabled = val;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks entity to receive/ignore radiation rays.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user