using Content.Shared.Chemistry.Components; using Content.Shared.NPC.Prototypes; using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Server.Dragon { // TODO: use timespans for logic [RegisterComponent] public sealed partial class DragonComponent : Component { /// /// If we have active rifts. /// [DataField] public List Rifts = new(); public bool Weakened => WeakenedAccumulator > 0f; /// /// When any rift is destroyed how long is the dragon weakened for /// [DataField] public float WeakenedDuration = 120f; /// /// Has a rift been destroyed and the dragon in a temporary weakened state? /// [DataField] public float WeakenedAccumulator = 0f; [DataField] public float RiftAccumulator = 0f; /// /// Maximum time the dragon can go without spawning a rift before they die. /// [DataField] public float RiftMaxAccumulator = 300f; [DataField] public EntProtoId SpawnRiftAction = "ActionSpawnRift"; /// /// Spawns a rift which can summon more mobs. /// [DataField] public EntityUid? SpawnRiftActionEntity; [DataField] public EntProtoId RiftPrototype = "CarpRift"; [DataField] public SoundSpecifier? SoundDeath = new SoundPathSpecifier("/Audio/Animals/space_dragon_roar.ogg"); [DataField] public SoundSpecifier? SoundRoar = new SoundPathSpecifier("/Audio/Animals/space_dragon_roar.ogg") { Params = AudioParams.Default.AddVolume(3f), }; /// /// NPC faction to re-add after being zombified. /// Prevents zombie dragon from being attacked by its own carp. /// [DataField] public ProtoId Faction = "Dragon"; /// /// The smoke to spawn upon rift timeout death. /// [DataField] public EntProtoId SmokePrototype = "BloodSmoke"; /// /// The solution to place into the smoke (mostly just needed for color) /// [DataField] public Solution SmokeSolution = new ([new("Blood", 1)]); } }