using Content.Server.Construction.Components;
using Content.Shared.Construction.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Power.Components;
///
/// This is used for machines whose power draw
/// can be decreased through machine part upgrades.
///
[RegisterComponent]
public sealed partial class UpgradePowerDrawComponent : Component
{
///
/// The base power draw of the machine.
/// Prioritizes hv/mv draw over lv draw.
/// Value is initializezd on map init from
///
[ViewVariables(VVAccess.ReadWrite)]
public float BaseLoad;
///
/// The machine part that affects the power draw.
///
[DataField("machinePartPowerDraw", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string MachinePartPowerDraw = "Capacitor";
///
/// The multiplier used for scaling the power draw.
///
[DataField("powerDrawMultiplier", required: true), ViewVariables(VVAccess.ReadWrite)]
public float PowerDrawMultiplier = 1f;
///
/// What type of scaling is being used?
///
[DataField("scaling", required: true), ViewVariables(VVAccess.ReadWrite)]
public MachineUpgradeScalingType Scaling;
}