using Content.Shared.DeviceLinking; using Content.Shared.Materials; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Cloning; [RegisterComponent] public sealed partial class CloningPodComponent : Component { [ValidatePrototypeId] public const string PodPort = "CloningPodReceiver"; [ViewVariables] public ContainerSlot BodyContainer = default!; /// /// How long the cloning has been going on for. /// [ViewVariables] public float CloningProgress = 0; [ViewVariables] public int UsedBiomass = 70; [ViewVariables] public bool FailedClone = false; /// /// The material that is used to clone entities. /// [DataField("requiredMaterial"), ViewVariables(VVAccess.ReadWrite)] public ProtoId RequiredMaterial = "Biomass"; /// /// The current amount of time it takes to clone a body /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float CloningTime = 30f; /// /// The mob to spawn on emag /// [DataField("mobSpawnId"), ViewVariables(VVAccess.ReadWrite)] public EntProtoId MobSpawnId = "MobAbomination"; // TODO: Remove this from here when cloning and/or zombies are refactored [DataField("screamSound")] public SoundSpecifier ScreamSound = new SoundCollectionSpecifier("ZombieScreams") { Params = AudioParams.Default.WithVolume(4), }; [ViewVariables(VVAccess.ReadWrite)] public CloningPodStatus Status; [ViewVariables] public EntityUid? ConnectedConsole; } [Serializable, NetSerializable] public enum CloningPodVisuals : byte { Status } [Serializable, NetSerializable] public enum CloningPodStatus : byte { Idle, Cloning, Gore, NoMind } /// /// Raised after a new mob got spawned when cloning a humanoid /// [ByRefEvent] public struct CloningEvent { public bool NameHandled = false; public readonly EntityUid Source; public readonly EntityUid Target; public CloningEvent(EntityUid source, EntityUid target) { Source = source; Target = target; } }