ChemicalPuddleArtifactComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
  2. using Content.Shared.Chemistry.Components;
  3. using Content.Shared.Chemistry.Reagent;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
  5. namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
  6. /// <summary>
  7. /// This is used for an artifact that creates a puddle of
  8. /// random chemicals upon being triggered.
  9. /// </summary>
  10. [RegisterComponent, Access(typeof(ChemicalPuddleArtifactSystem))]
  11. public sealed partial class ChemicalPuddleArtifactComponent : Component
  12. {
  13. /// <summary>
  14. /// The solution where all the chemicals are stored
  15. /// </summary>
  16. [DataField("chemicalSolution", required: true), ViewVariables(VVAccess.ReadWrite)]
  17. public Solution ChemicalSolution = default!;
  18. /// <summary>
  19. /// The different chemicals that can be spawned by this effect
  20. /// </summary>
  21. [DataField("possibleChemicals", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<ReagentPrototype>))]
  22. public List<string> PossibleChemicals = default!;
  23. /// <summary>
  24. /// The number of chemicals in the puddle
  25. /// </summary>
  26. [DataField("chemAmount")]
  27. public int ChemAmount = 3;
  28. }