using System.Threading; using Content.Shared.Construction.Prototypes; using Content.Shared.Storage; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Medical.BiomassReclaimer { [RegisterComponent] public sealed partial class BiomassReclaimerComponent : Component { /// /// This gets set for each mob it processes. /// When it hits 0, there is a chance for the reclaimer to either spill blood or throw an item. /// [ViewVariables] public float RandomMessTimer = 0f; /// /// The interval for . /// [ViewVariables(VVAccess.ReadWrite), DataField] public TimeSpan RandomMessInterval = TimeSpan.FromSeconds(5); /// /// This gets set for each mob it processes. /// When it hits 0, spit out biomass. /// [ViewVariables] public float ProcessingTimer = default; /// /// Amount of biomass that the mob being processed will yield. /// This is calculated from the YieldPerUnitMass. /// Also stores non-integer leftovers. /// [ViewVariables] public float CurrentExpectedYield = 0f; /// /// The reagent that will be spilled while processing a mob. /// [ViewVariables] public string? BloodReagent; /// /// Entities that can be randomly spawned while processing a mob. /// public List SpawnedEntities = new(); /// /// How many units of biomass it produces for each unit of mass. /// [ViewVariables(VVAccess.ReadWrite)] public float YieldPerUnitMass = default; /// /// The base yield per mass unit when no components are upgraded. /// [DataField("baseYieldPerUnitMass")] public float BaseYieldPerUnitMass = 0.4f; /// /// Machine part whose rating modifies the yield per mass. /// [DataField("machinePartYieldAmount", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartYieldAmount = "MatterBin"; /// /// How much the machine part quality affects the yield. /// Going up a tier will multiply the yield by this amount. /// [DataField("partRatingYieldAmountMultiplier")] public float PartRatingYieldAmountMultiplier = 1.25f; /// /// How many seconds to take to insert an entity per unit of its mass. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float BaseInsertionDelay = 0.1f; /// /// How much to multiply biomass yield from botany produce. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float ProduceYieldMultiplier = 0.25f; /// /// The time it takes to process a mob, per mass. /// [ViewVariables(VVAccess.ReadWrite)] public float ProcessingTimePerUnitMass = default; /// /// The base time per mass unit that it takes to process a mob /// when no components are upgraded. /// [DataField("baseProcessingTimePerUnitMass")] public float BaseProcessingTimePerUnitMass = 0.5f; /// /// The machine part that increses the processing speed. /// [DataField("machinePartProcessSpeed", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartProcessingSpeed = "Manipulator"; /// /// How much the machine part quality affects the yield. /// Going up a tier will multiply the speed by this amount. /// [DataField("partRatingSpeedMultiplier")] public float PartRatingSpeedMultiplier = 1.35f; /// /// Will this refuse to gib a living mob? /// [ViewVariables(VVAccess.ReadWrite), DataField] public bool SafetyEnabled = true; } }