WeldableComponent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization;
  4. namespace Content.Shared.Tools.Components;
  5. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  6. public sealed partial class WeldableComponent : Component
  7. {
  8. /// <summary>
  9. /// Tool quality for welding.
  10. /// </summary>
  11. [DataField]
  12. public ProtoId<ToolQualityPrototype> WeldingQuality = "Welding";
  13. /// <summary>
  14. /// How much time does it take to weld/unweld entity.
  15. /// </summary>
  16. [DataField, AutoNetworkedField]
  17. public TimeSpan Time = TimeSpan.FromSeconds(1f);
  18. /// <summary>
  19. /// How much fuel does it take to weld/unweld entity.
  20. /// </summary>
  21. [DataField]
  22. public float Fuel = 3f;
  23. /// <summary>
  24. /// Shown when welded entity is examined.
  25. /// </summary>
  26. [DataField]
  27. public LocId? WeldedExamineMessage = "weldable-component-examine-is-welded";
  28. /// <summary>
  29. /// Is this entity currently welded shut?
  30. /// </summary>
  31. [DataField, AutoNetworkedField]
  32. public bool IsWelded;
  33. }
  34. [Serializable, NetSerializable]
  35. public enum WeldableVisuals : byte
  36. {
  37. IsWelded
  38. }
  39. [Serializable, NetSerializable]
  40. public enum WeldableLayers : byte
  41. {
  42. BaseWelded
  43. }