2022-12-19 18:47:15 -08:00
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
|
|
|
|
|
|
using Content.Server.Singularity.EntitySystems;
|
2021-12-08 17:32:32 +01:00
|
|
|
|
|
2022-12-19 18:47:15 -08:00
|
|
|
|
namespace Content.Server.Singularity.Components;
|
|
|
|
|
|
|
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class SingularityGeneratorComponent : Component
|
2022-12-19 18:47:15 -08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The amount of power this generator has accumulated.
|
|
|
|
|
|
/// If you want to set this use <see cref="SingularityGeneratorSystem.SetPower"/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("power")]
|
|
|
|
|
|
[Access(friends:typeof(SingularityGeneratorSystem))]
|
|
|
|
|
|
public float Power = 0;
|
2020-10-28 19:19:47 +01:00
|
|
|
|
|
2022-12-19 18:47:15 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The power threshold at which this generator will spawn a singularity.
|
|
|
|
|
|
/// If you want to set this use <see cref="SingularityGeneratorSystem.SetThreshold"/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("threshold")]
|
|
|
|
|
|
[Access(friends:typeof(SingularityGeneratorSystem))]
|
|
|
|
|
|
public float Threshold = 16;
|
2020-10-28 19:19:47 +01:00
|
|
|
|
|
2022-12-19 18:47:15 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The prototype ID used to spawn a singularity.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("spawnId", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public string? SpawnPrototype = "Singularity";
|
2020-10-28 19:19:47 +01:00
|
|
|
|
}
|