WelderComponent.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using Content.Shared.Chemistry.Components;
  2. using Content.Shared.Chemistry.Reagent;
  3. using Content.Shared.FixedPoint;
  4. using Content.Shared.Tools.Systems;
  5. using Robust.Shared.Audio;
  6. using Robust.Shared.GameStates;
  7. using Robust.Shared.Prototypes;
  8. namespace Content.Shared.Tools.Components;
  9. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), Access(typeof(SharedToolSystem))]
  10. public sealed partial class WelderComponent : Component
  11. {
  12. [DataField, AutoNetworkedField]
  13. public bool Enabled;
  14. [DataField]
  15. public float WelderTimer;
  16. /// <summary>
  17. /// Name of <see cref="FuelSolution"/>.
  18. /// </summary>
  19. [DataField]
  20. public string FuelSolutionName = "Welder";
  21. /// <summary>
  22. /// Reagent that will be used as fuel for welding.
  23. /// </summary>
  24. [DataField]
  25. public ProtoId<ReagentPrototype> FuelReagent = "WeldingFuel";
  26. /// <summary>
  27. /// Fuel consumption per second while the welder is active.
  28. /// </summary>
  29. [DataField, AutoNetworkedField]
  30. public FixedPoint2 FuelConsumption = FixedPoint2.New(1.0f);
  31. /// <summary>
  32. /// A fuel amount to be consumed when the welder goes from being unlit to being lit.
  33. /// </summary>
  34. [DataField, AutoNetworkedField]
  35. public FixedPoint2 FuelLitCost = FixedPoint2.New(0.5f);
  36. /// <summary>
  37. /// Sound played when refilling the welder.
  38. /// </summary>
  39. [DataField]
  40. public SoundSpecifier WelderRefill = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
  41. /// <summary>
  42. /// Whether the item is safe to refill while lit without exploding the tank.
  43. /// </summary>
  44. [DataField]
  45. public bool TankSafe;
  46. [DataField]
  47. public float WelderUpdateTimer = 1f;
  48. }