DragonRiftComponent.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Content.Shared.Dragon;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Server.Dragon;
  5. [RegisterComponent]
  6. public sealed partial class DragonRiftComponent : SharedDragonRiftComponent
  7. {
  8. /// <summary>
  9. /// Dragon that spawned this rift.
  10. /// </summary>
  11. [DataField("dragon")] public EntityUid? Dragon;
  12. /// <summary>
  13. /// How long the rift has been active.
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite), DataField("accumulator")]
  16. public float Accumulator = 0f;
  17. /// <summary>
  18. /// The maximum amount we can accumulate before becoming impervious.
  19. /// </summary>
  20. [ViewVariables(VVAccess.ReadWrite), DataField("maxAccumuluator")] public float MaxAccumulator = 300f;
  21. /// <summary>
  22. /// Accumulation of the spawn timer.
  23. /// </summary>
  24. [ViewVariables(VVAccess.ReadWrite), DataField("spawnAccumulator")]
  25. public float SpawnAccumulator = 30f;
  26. /// <summary>
  27. /// How long it takes for a new spawn to be added.
  28. /// </summary>
  29. [ViewVariables(VVAccess.ReadWrite), DataField("spawnCooldown")]
  30. public float SpawnCooldown = 30f;
  31. [ViewVariables(VVAccess.ReadWrite), DataField("spawn", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
  32. public string SpawnPrototype = "MobCarpDragon";
  33. }