Carp wave spawner and dragons as an actual event (#10254)

This commit is contained in:
metalgearsloth
2022-08-08 10:18:14 +10:00
committed by GitHub
parent 3d850c6592
commit a29d8b9fa2
60 changed files with 1264 additions and 569 deletions

View File

@@ -0,0 +1,40 @@
using Content.Shared.Dragon;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Dragon;
[RegisterComponent]
public sealed class DragonRiftComponent : SharedDragonRiftComponent
{
/// <summary>
/// Dragon that spawned this rift.
/// </summary>
[ViewVariables, DataField("dragon")] public EntityUid Dragon;
/// <summary>
/// How long the rift has been active.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("accumulator")]
public float Accumulator = 0f;
/// <summary>
/// The maximum amount we can accumulate before becoming impervious.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("maxAccumuluator")] public float MaxAccumulator = 300f;
/// <summary>
/// Accumulation of the spawn timer.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("spawnAccumulator")]
public float SpawnAccumulator = 60f;
/// <summary>
/// How long it takes for a new spawn to be added.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("spawnCooldown")]
public float SpawnCooldown = 60f;
[ViewVariables(VVAccess.ReadWrite), DataField("spawn", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string SpawnPrototype = "MobCarpDragon";
}