GasPrototype.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using Content.Shared.Chemistry.Reagent;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Shared.Atmos.Prototypes
  5. {
  6. [Prototype]
  7. public sealed partial class GasPrototype : IPrototype
  8. {
  9. [DataField("name")] public string Name { get; set; } = "";
  10. // TODO: Control gas amount necessary for overlay to appear
  11. // TODO: Add interfaces for gas behaviours e.g. breathing, burning
  12. [ViewVariables]
  13. [IdDataField]
  14. public string ID { get; private set; } = default!;
  15. /// <summary>
  16. /// Specific heat for gas.
  17. /// </summary>
  18. [DataField("specificHeat")]
  19. public float SpecificHeat { get; private set; }
  20. /// <summary>
  21. /// Heat capacity ratio for gas
  22. /// </summary>
  23. [DataField("heatCapacityRatio")]
  24. public float HeatCapacityRatio { get; private set; } = 1.4f;
  25. /// <summary>
  26. /// Molar mass of gas
  27. /// </summary>
  28. [DataField("molarMass")]
  29. public float MolarMass { get; set; } = 1f;
  30. /// <summary>
  31. /// Minimum amount of moles for this gas to be visible.
  32. /// </summary>
  33. [DataField("gasMolesVisible")]
  34. public float GasMolesVisible { get; private set; } = 0.25f;
  35. /// <summary>
  36. /// Visibility for this gas will be max after this value.
  37. /// </summary>
  38. public float GasMolesVisibleMax => GasMolesVisible * GasVisibilityFactor;
  39. [DataField("gasVisbilityFactor")]
  40. public float GasVisibilityFactor = Atmospherics.FactorGasVisibleMax;
  41. /// <summary>
  42. /// If this reagent is in gas form, this is the path to the overlay that will be used to make the gas visible.
  43. /// </summary>
  44. [DataField("gasOverlayTexture")]
  45. public string GasOverlayTexture { get; private set; } = string.Empty;
  46. /// <summary>
  47. /// If this reagent is in gas form, this will be the path to the RSI sprite that will be used to make the gas visible.
  48. /// </summary>
  49. [DataField("gasOverlayState")]
  50. public string GasOverlayState { get; set; } = string.Empty;
  51. /// <summary>
  52. /// State for the gas RSI overlay.
  53. /// </summary>
  54. [DataField("gasOverlaySprite")]
  55. public string GasOverlaySprite { get; set; } = string.Empty;
  56. /// <summary>
  57. /// Path to the tile overlay used when this gas appears visible.
  58. /// </summary>
  59. [DataField("overlayPath")]
  60. public string OverlayPath { get; private set; } = string.Empty;
  61. /// <summary>
  62. /// The reagent that this gas will turn into when inhaled.
  63. /// </summary>
  64. [DataField("reagent", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))]
  65. public string? Reagent { get; private set; } = default!;
  66. [DataField("color")] public string Color { get; private set; } = string.Empty;
  67. [DataField("pricePerMole")]
  68. public float PricePerMole { get; set; } = 0;
  69. }
  70. }