Carp wave spawner and dragons as an actual event (#10254)
This commit is contained in:
40
Content.Server/Dragon/Components/DragonRiftComponent.cs
Normal file
40
Content.Server/Dragon/Components/DragonRiftComponent.cs
Normal 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";
|
||||
}
|
||||
Reference in New Issue
Block a user