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:
Ed
2023-11-01 02:20:52 +03:00
committed by GitHub
parent 3a4c40c29b
commit 96ff529c82
31 changed files with 596 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
using Robust.Shared.Serialization;
namespace Content.Shared.Anomaly;
[Serializable, NetSerializable]
public enum AnomalyCoreVisuals : byte
{
Decaying
}

View File

@@ -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.

View File

@@ -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);
}