Anomaly Cores (#21306)
* add first anomaly core * meme * 5 min to 10 min fix yml * fix * Update doc * no static price
This commit is contained in:
9
Content.Shared/Anomaly/AnomalyCoreVisuals.cs
Normal file
9
Content.Shared/Anomaly/AnomalyCoreVisuals.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Anomaly;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum AnomalyCoreVisuals : byte
|
||||
{
|
||||
Decaying
|
||||
}
|
||||
@@ -2,6 +2,7 @@ using System.Numerics;
|
||||
using Content.Shared.Damage;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Shared.Anomaly.Components;
|
||||
@@ -208,6 +209,18 @@ public sealed partial class AnomalyComponent : Component
|
||||
[DataField]
|
||||
public SoundSpecifier AnomalyContactDamageSound = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// A prototype entity that appears when an anomaly supercrit collapse.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntProtoId? CorePrototype;
|
||||
|
||||
/// <summary>
|
||||
/// A prototype entity that appears when an anomaly decays.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntProtoId? CoreInertPrototype;
|
||||
|
||||
#region Floating Animation
|
||||
/// <summary>
|
||||
/// How long it takes to go from the bottom of the animation to the top.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Anomaly.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
@@ -181,6 +181,9 @@ public abstract class SharedAnomalySystem : EntitySystem
|
||||
|
||||
if (Terminating(uid) || _net.IsClient)
|
||||
return;
|
||||
|
||||
Spawn(supercritical ? component.CorePrototype : component.CoreInertPrototype, Transform(uid).Coordinates);
|
||||
|
||||
QueueDel(uid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user