using Content.Shared.Cloning; using Content.Shared.Construction.Prototypes; using Content.Shared.Materials; using Robust.Shared.Containers; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Cloning.Components { [RegisterComponent] public sealed class CloningPodComponent : Component { 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", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)] public string RequiredMaterial = "Biomass"; /// /// The base amount of time it takes to clone a body /// [DataField("baseCloningTime")] public float BaseCloningTime = 30f; /// /// The multiplier for cloning duration /// [DataField("partRatingSpeedMultiplier")] public float PartRatingSpeedMultiplier = 0.75f; /// /// The machine part that affects cloning speed /// [DataField("machinePartCloningSpeed", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartCloningSpeed = "ScanningModule"; /// /// The current amount of time it takes to clone a body /// [ViewVariables(VVAccess.ReadWrite)] public float CloningTime = 30f; /// /// The machine part that affects how much biomass is needed to clone a body. /// [DataField("partRatingMaterialMultiplier")] public float PartRatingMaterialMultiplier = 0.85f; /// /// The current multiplier on the body weight, which determines the /// amount of biomass needed to clone. /// [ViewVariables(VVAccess.ReadWrite)] public float BiomassRequirementMultiplier = 1; /// /// The machine part that decreases the amount of material needed for cloning /// [DataField("machinePartMaterialUse", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartMaterialUse = "Manipulator"; [ViewVariables(VVAccess.ReadWrite)] public CloningPodStatus Status; [ViewVariables] public EntityUid? ConnectedConsole; } }