1
0

VapeComponent.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Content.Server.Nutrition.EntitySystems;
  2. using Content.Shared.Damage;
  3. using Content.Shared.Atmos;
  4. namespace Content.Server.Nutrition.Components // Vapes are very nutritious.
  5. {
  6. [RegisterComponent, Access(typeof(SmokingSystem))]
  7. public sealed partial class VapeComponent : Component
  8. {
  9. [DataField("delay")]
  10. [ViewVariables(VVAccess.ReadWrite)]
  11. public float Delay { get; set; } = 5;
  12. [DataField("userDelay")]
  13. [ViewVariables(VVAccess.ReadWrite)]
  14. public float UserDelay { get; set; } = 2;
  15. [DataField("explosionIntensity")]
  16. [ViewVariables(VVAccess.ReadWrite)]
  17. public float ExplosionIntensity { get; set; } = 2.5f;
  18. // TODO use RiggableComponent.
  19. [DataField("explodeOnUse")]
  20. [ViewVariables(VVAccess.ReadWrite)]
  21. public bool ExplodeOnUse { get; set; } = false;
  22. [DataField("damage", required: true)]
  23. [ViewVariables(VVAccess.ReadWrite)]
  24. public DamageSpecifier Damage = default!;
  25. [DataField("gasType")]
  26. [ViewVariables(VVAccess.ReadWrite)]
  27. public Gas GasType { get; set; } = Gas.WaterVapor;
  28. /// <summary>
  29. /// Solution volume will be divided by this number and converted to the gas
  30. /// </summary>
  31. [DataField("reductionFactor")]
  32. [ViewVariables(VVAccess.ReadWrite)]
  33. public float ReductionFactor { get; set; } = 300f;
  34. // TODO when this gets fixed, use prototype serializers
  35. [DataField("solutionNeeded")]
  36. [ViewVariables(VVAccess.ReadWrite)]
  37. public string SolutionNeeded = "Water";
  38. }
  39. }