Files
wwdpublic/Content.Server/Botany/Components/SeedExtractorComponent.cs
VMSolidus 96ac353f4a Reimplement Part Upgrading (#917)
# 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>
2024-10-19 13:15:15 +07:00

43 lines
1.4 KiB
C#

using Content.Server.Botany.Systems;
using Content.Server.Construction;
using Content.Shared.Construction.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Botany.Components;
[RegisterComponent]
[Access(typeof(SeedExtractorSystem))]
public sealed partial class SeedExtractorComponent : Component
{
/// <summary>
/// The minimum amount of seed packets dropped with no machine upgrades.
/// </summary>
[DataField]
public int BaseMinSeeds = 1;
/// <summary>
/// The maximum amount of seed packets dropped with no machine upgrades.
/// </summary>
[DataField]
public int BaseMaxSeeds = 3;
/// <summary>
/// Modifier to the amount of seeds outputted, set on <see cref="RefreshPartsEvent"/>.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float SeedAmountMultiplier;
/// <summary>
/// Machine part whose rating modifies the amount of seed packets dropped.
/// </summary>
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string MachinePartSeedAmount = "Manipulator";
/// <summary>
/// How much the machine part quality affects the amount of seeds outputted.
/// Going up a tier will multiply the seed output by this amount.
/// </summary>
[DataField]
public float PartRatingSeedAmountMultiplier = 1.5f;
}