make salvage magnets upgradable with capacitors (#16763)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-06-13 06:37:53 +00:00
committed by GitHub
parent 2d9d27c1b2
commit b82885af38
6 changed files with 105 additions and 48 deletions

View File

@@ -1,8 +1,24 @@
using Content.Shared.Construction.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Salvage;
public abstract class SharedSalvageMagnetComponent : Component {}
public abstract class SharedSalvageMagnetComponent : Component
{
/// <summary>
/// The machine part that affects the attaching and cooldown times
/// </summary>
[DataField("machinePartDelay", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>)), ViewVariables(VVAccess.ReadWrite)]
public string MachinePartDelay = "Capacitor";
/// <summary>
/// A multiplier applied to the attaching and cooldown times for each level of <see cref="MachinePartDelay"/>
/// </summary>
[DataField("partRatingDelay"), ViewVariables(VVAccess.ReadWrite)]
public float PartRatingDelay = 0.75f;
}
[Serializable, NetSerializable]
public enum SalvageMagnetVisuals : byte