using Content.Shared.Chemistry.Reagent;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Stacks;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared._NF.Skrungler.Components;
///
/// An entity that can process mobs into fuel, spilling their blood into a puddle around the machine.
/// Great for parties.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class SkrunglerComponent : Component
{
[DataField, AutoNetworkedField]
public bool Active;
///
/// This gets set for each mob it processes.
/// When it hits 0, there is a chance for the skrungler to either spill blood.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField]
public TimeSpan NextMessTime;
///
/// The interval for .
///
[DataField]
public TimeSpan MessInterval = TimeSpan.FromSeconds(5);
///
/// This gets set for each mob it processes.
/// When it hits 0, spit out fuel.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField]
public TimeSpan FinishProcessingTime;
///
/// Amount of fuel that the mob being processed will yield.
/// This is calculated from the YieldPerUnitMass.
/// Also stores non-integer leftovers.
///
[DataField, AutoNetworkedField]
public float CurrentExpectedYield;
///
/// The reagent that will be spilled while processing a mob.
///
[DataField]
public ProtoId? BloodReagent;
///
/// The output of the mob being processed.
///
[DataField(required: true)]
public ProtoId OutputStackType;
///
/// How many units of fuel it produces for each unit of mass.
///
[DataField]
public float YieldPerUnitMass;
///
/// The base yield (in stack count) per mass unit when no components are upgraded.
///
[DataField]
public float BaseYieldPerUnitMass = 0.2f;
///
/// Machine part whose rating modifies the yield per mass.
///
[DataField]
public ProtoId MachinePartYieldAmount = "MatterBin";
///
/// How much the machine part quality affects the yield.
/// Going up a tier will multiply the yield by this amount.
///
[DataField]
public float PartRatingYieldAmountMultiplier = 1.25f;
///
/// How many seconds to take to insert an entity per unit of its mass.
///
[DataField]
public float BaseInsertionDelay = 0.1f;
///
/// The time it takes to process a mob, per mass.
///
[DataField]
public TimeSpan ProcessingTimePerUnitMass;
///
/// The base time per mass unit that it takes to process a mob
/// when no components are upgraded.
///
[DataField]
public TimeSpan BaseProcessingTimePerUnitMass = TimeSpan.FromSeconds(0.5);
///
/// The machine part that increases the processing speed.
///
[DataField]
public ProtoId MachinePartProcessingSpeed = "Manipulator";
///
/// How much the machine part quality affects the yield.
/// Going up a tier will multiply the speed by this amount.
///
[DataField]
public float PartRatingSpeedMultiplier = 1.35f;
[DataField]
public SoundSpecifier SkrungStartSound = new SoundCollectionSpecifier("gib");
[DataField]
public SoundSpecifier SkrunglerSound = new SoundPathSpecifier("/Audio/Machines/reclaimer_startup.ogg");
[DataField]
public SoundSpecifier SkrungFinishSound = new SoundPathSpecifier("/Audio/Machines/ding.ogg");
}