mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
# Description By extremely popular demand(Both internally, and from our downstreams), this PR reimplements Part Upgrading. Since some of the systems that this PR touches were substantially changed since the removal of Parts, I had to do a lot of very in depth by-hand edits of individual systems. Shockingly, the only one that really proved any trouble was Cloning System, so I'm genuinely surprised wizden didn't substantially touch any of these codes since removing parts.. # Changelog 🆑 - add: Part Upgrading has returned! --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Content.Server.Construction.Components;
|
|
using Content.Shared.Construction.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Power.Components;
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class UpgradePowerSupplierComponent : Component
|
|
{
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseSupplyRate;
|
|
|
|
/// <summary>
|
|
/// The machine part that affects the power supplu.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
|
public string MachinePartPowerSupply = "Capacitor";
|
|
|
|
/// <summary>
|
|
/// The multiplier used for scaling the power supply.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public float PowerSupplyMultiplier = 1f;
|
|
|
|
/// <summary>
|
|
/// What type of scaling is being used?
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public MachineUpgradeScalingType Scaling;
|
|
|
|
/// <summary>
|
|
/// The current value that the power supply is being scaled by,
|
|
/// </summary>
|
|
[DataField]
|
|
public float ActualScalar = 1f;
|
|
}
|