using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using Content.Shared.EntityEffects; // Frontier using Content.Shared.Construction.Prototypes; using Content.Shared.FixedPoint; using Content.Shared.Nutrition; using Content.Shared.Nyanotrasen.Kitchen; using Content.Shared.Nyanotrasen.Kitchen.Components; using Content.Shared.Whitelist; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; using Content.Shared.Nyanotrasen.Kitchen.Prototypes; namespace Content.Server.Nyanotrasen.Kitchen.Components { [RegisterComponent, AutoGenerateComponentPause] [Access(typeof(SharedDeepfryerSystem))] // This line appears to be depracted: [ComponentReference(typeof(SharedDeepFryerComponent))] public sealed partial class DeepFryerComponent : SharedDeepFryerComponent { // There are three levels to how the deep fryer treats entities. // // 1. An entity can be rejected by the blacklist and be untouched by // anything other than heat damage. // // 2. An entity can be deep-fried but not turned into an edible. The // change will be mostly cosmetic. Any entity that does not match // the blacklist will fall into this category. // // 3. An entity can be deep-fried and turned into something edible. The // change will permit the item to be permanently destroyed by eating // it. /// /// When will the deep fryer layer on the next stage of crispiness? /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan NextFryTime { get; set; } /// /// How much waste needs to be added at the next update interval? /// [ViewVariables(VVAccess.ReadOnly)] public FixedPoint2 WasteToAdd { get; set; } = FixedPoint2.Zero; /// /// How often are items in the deep fryer fried? /// [DataField] public TimeSpan FryInterval { get; set; } = TimeSpan.FromSeconds(5); /// /// What entities cannot be deep-fried no matter what? /// [DataField] public EntityWhitelist? Blacklist { get; set; } /// /// What entities can be deep-fried into being edible? /// [DataField] public EntityWhitelist? Whitelist { get; set; } /// /// What are over-cooked and burned entities turned into? /// /// /// To prevent unwanted destruction of items, only food can be turned /// into this. /// [DataField] public EntProtoId? CharredPrototype { get; set; } /// /// What reagents are considered valid cooking oils? /// [DataField] public HashSet> FryingOils { get; set; } = new(); /// /// What reagents are added to tasty deep-fried food? /// JJ Comment: I removed Solution from this. Unsure if I need to replace it with something. /// [DataField] public List GoodReagents { get; set; } = new(); /// /// What reagents are added to terrible deep-fried food? /// JJ Comment: I removed Solution from this. Unsure if I need to replace it with something. /// [DataField] public List BadReagents { get; set; } = new(); /// /// What reagents replace every 1 unit of oil spent on frying? /// JJ Comment: I removed Solution from this. Unsure if I need to replace it with something. /// [DataField] public List WasteReagents { get; set; } = new(); /// /// What flavors go well with deep frying? /// [DataField(customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] public HashSet GoodFlavors { get; set; } = new(); /// /// What flavors don't go well with deep frying? /// [DataField(customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] public HashSet BadFlavors { get; set; } = new(); /// /// How much is the price coefficiency of a food changed for each good flavor? /// [DataField] public float GoodFlavorPriceBonus { get; set; } = 0.2f; /// /// How much is the price coefficiency of a food changed for each bad flavor? /// [DataField] public float BadFlavorPriceMalus { get; set; } = -0.3f; /// /// What is the name of the solution container for the fryer's oil? /// [DataField("solution")] public string SolutionName { get; set; } = "vat_oil"; public Solution Solution { get; set; } = default!; /// /// What is the name of the entity container for items inside the deep fryer? /// [DataField("storage")] public string StorageName { get; set; } = "vat_entities"; public BaseContainer Storage { get; set; } = default!; /// /// How much solution should be imparted based on an item's size? /// [DataField] public FixedPoint2 SolutionSizeCoefficient { get; set; } = 1f; /// /// What's the maximum amount of solution that should ever be imparted? /// [DataField] public FixedPoint2 SolutionSplitMax { get; set; } = 10f; /// /// What percent of the fryer's solution has to be oil in order for it to fry? /// /// /// The chef will have to clean it out occasionally, and if too much /// non-oil reagents are added, the vat will have to be drained. /// [DataField] public FixedPoint2 FryingOilThreshold { get; set; } = 0.5f; /// /// What is the bare minimum number of oil units to prevent the fryer /// from unsafe operation? /// [DataField] public FixedPoint2 SafeOilVolume { get; set; } = 10f; [DataField] public List UnsafeOilVolumeEffects = new(); // Frontier: ReagentEffect /// What is the temperature of the vat when the deep fryer is powered? /// [DataField] public float PoweredTemperature = 550.0f; /// /// How many entities can this deep fryer hold? /// [ViewVariables] public int StorageMaxEntities = 4; /// /// How many entities can be held, at a minimum? /// [DataField] public int BaseStorageMaxEntities = 4; /// /// What upgradeable machine part dictates the quality of the storage size? /// public ProtoId MachinePartStorageMax = "MatterBin"; /// /// How much extra storage is added per part rating? /// [DataField] public int StoragePerPartRating = 4; /// /// What sound is played when an item is inserted into hot oil? /// [DataField] public SoundSpecifier SoundInsertItem = new SoundPathSpecifier("/Audio/Nyanotrasen/Machines/deepfryer_basket_add_item.ogg"); /// /// What sound is played when an item is removed? /// [DataField] public SoundSpecifier SoundRemoveItem = new SoundPathSpecifier("/Audio/Nyanotrasen/Machines/deepfryer_basket_remove_item.ogg"); /// /// Frontier: crispiness level set to use for examination and shaders /// [DataField] public ProtoId CrispinessLevelSet = "Crispy"; } }