using Content.Server.Anomaly.Effects; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using Robust.Shared.Audio; using Robust.Shared.Prototypes; using System.Numerics; namespace Content.Server.Anomaly.Components; /// /// This component allows the anomaly to generate a random type of reagent in the specified SolutionContainer. /// With the increasing severity of the anomaly, the type of reagent produced may change. /// The higher the severity of the anomaly, the higher the chance of dangerous or useful reagents. /// [RegisterComponent, Access(typeof(ReagentProducerAnomalySystem))] public sealed partial class ReagentProducerAnomalyComponent : Component { //the addition of the reagent will occur instantly when an anomaly appears, //and there will not be the first three seconds of a white empty anomaly. public float AccumulatedFrametime = 3.0f; /// /// How frequently should this reagent generation update, in seconds? /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float UpdateInterval = 3.0f; /// /// The spread of the random weight of the choice of this category, depending on the severity. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public Vector2 WeightSpreadDangerous = new(5.0f, 9.0f); /// /// The spread of the random weight of the choice of this category, depending on the severity. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public Vector2 WeightSpreadFun = new(3.0f, 0.0f); /// /// The spread of the random weight of the choice of this category, depending on the severity. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public Vector2 WeightSpreadUseful = new(1.0f, 1.0f); /// /// Category of dangerous reagents for injection. Various toxins and poisons /// [DataField, ViewVariables(VVAccess.ReadWrite)] public List> DangerousChemicals = new(); /// /// Category of useful reagents for injection. Medicine and other things that players WANT to get /// [DataField, ViewVariables(VVAccess.ReadWrite)] public List> UsefulChemicals = new(); /// /// Category of fun reagents for injection. Glue, drugs, beer. Something that will bring fun. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public List> FunChemicals = new(); /// /// Noise made when anomaly pulse. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public SoundSpecifier ChangeSound = new SoundPathSpecifier("/Audio/Effects/waterswirl.ogg"); /// /// The component will repaint the sprites of the object to match the current color of the solution, /// if the RandomSprite component is hung correctly. /// Ideally, this should be put into a separate component, but I suffered for 4 hours, /// and nothing worked out for me. So for now it will be like this. /// [DataField, ViewVariables(VVAccess.ReadOnly)] public bool NeedRecolor = false; /// /// the maximum amount of reagent produced per second /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float MaxReagentProducing = 1.5f; /// /// how much does the reagent production increase before entering the supercritical state /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float SupercriticalReagentProducingModifier = 100f; /// /// The name of the reagent that the anomaly produces. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public ProtoId ProducingReagent = "Water"; /// /// Solution name where the substance is generated /// [ViewVariables(VVAccess.ReadWrite)] [DataField("solution")] public string SolutionName = "default"; /// /// Solution where the substance is generated /// [DataField("solutionRef")] public Entity? Solution = null; }