Files
tbd-station-14/Content.Server/Cloning/Components/CloningPodComponent.cs
Nemanja a9dd9257d8 cloning machine upgrade support (#11588)
* cloning machine upgrade support

* foo
2022-09-28 21:30:11 -05:00

78 lines
2.6 KiB
C#

using Content.Shared.Cloning;
using Content.Shared.Construction.Prototypes;
using Robust.Shared.Containers;
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!;
/// <summary>
/// How long the cloning has been going on for.
/// </summary>
[ViewVariables]
public float CloningProgress = 0;
[ViewVariables]
public int UsedBiomass = 70;
[ViewVariables]
public bool FailedClone = false;
/// <summary>
/// The base amount of time it takes to clone a body
/// </summary>
[DataField("baseCloningTime")]
public float BaseCloningTime = 30f;
/// <summary>
/// The multiplier for cloning duration
/// </summary>
[DataField("partRatingSpeedMultiplier")]
public float PartRatingSpeedMultiplier = 0.75f;
/// <summary>
/// The machine part that affects cloning speed
/// </summary>
[DataField("machinePartCloningSpeed", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string MachinePartCloningSpeed = "ScanningModule";
/// <summary>
/// The current amount of time it takes to clone a body
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float CloningTime = 30f;
/// <summary>
/// The machine part that affects how much biomass is needed to clone a body.
/// </summary>
[DataField("partRatingMaterialMultiplier")]
public float PartRatingMaterialMultiplier = 0.85f;
/// <summary>
/// The current multiplier on the body weight, which determines the
/// amount of biomass needed to clone.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float BiomassRequirementMultiplier = 1;
/// <summary>
/// The machine part that decreases the amount of material needed for cloning
/// </summary>
[DataField("machinePartMaterialUse", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string MachinePartMaterialUse = "Manipulator";
[ViewVariables(VVAccess.ReadWrite)]
public CloningPodStatus Status;
[ViewVariables]
public EntityUid? ConnectedConsole;
}
}