Machine Battery Scaling (SMES/Substation) (#11662)

Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
rolfero
2022-10-04 02:59:39 +02:00
committed by GitHub
parent 0c24f8b69b
commit f8c4c2d449
4 changed files with 67 additions and 8 deletions

View File

@@ -0,0 +1,28 @@
using Content.Shared.Construction.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Power.Components
{
[RegisterComponent]
public sealed class UpgradeBatteryComponent : Component
{
/// <summary>
/// The machine part that affects the power capacity.
/// </summary>
[DataField("machinePartPowerCapacity", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string MachinePartPowerCapacity = "Capacitor";
/// <summary>
/// The machine part rating is raised to this power when calculating power gain
/// </summary>
[DataField("maxChargeMultiplier")]
public float MaxChargeMultiplier = 2f;
/// <summary>
/// Power gain scaling
/// </summary>
[DataField("baseMaxCharge")]
public float BaseMaxCharge = 8000000;
}
}