using Content.Server.Nutrition.EntitySystems;
using Content.Shared.Nutrition.Prototypes;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Nutrition.Components;
///
/// This is used for a machine that extracts hunger from entities and creates meat. Yum!
///
[RegisterComponent, Access(typeof(FatExtractorSystem)), AutoGenerateComponentPause]
public sealed partial class FatExtractorComponent : Component
{
///
/// Whether or not the extractor is currently extracting fat from someone
///
[DataField]
public bool Processing = true;
///
/// How much nutrition is extracted per second.
///
[DataField]
public int NutritionPerSecond = 10;
///
/// An accumulator which tracks extracted nutrition to determine
/// when to spawn a meat.
///
[DataField]
public int NutrientAccumulator;
///
/// How high has to be to spawn meat
///
[DataField]
public int NutrientPerMeat = 30;
///
/// Meat spawned by the extractor.
///
[DataField]
public EntProtoId MeatPrototype = "FoodMeat";
///
/// When the next update will occur
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan NextUpdate;
///
/// How long each update takes
///
[DataField]
public TimeSpan UpdateTime = TimeSpan.FromSeconds(1);
///
/// The sound played when extracting
///
[DataField]
public SoundSpecifier? ProcessSound;
public EntityUid? Stream;
///
/// A minium hunger threshold for extracting nutrition, as specified by a .
/// Ignored when emagged.
///
[DataField(required: true)]
public SatiationValue MinHungerThreshold;
}