ToolRefinableComponent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Content.Shared.Storage;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Prototypes;
  4. using Content.Shared.Tools.Systems;
  5. namespace Content.Shared.Tools.Components;
  6. /// <summary>
  7. /// Used for something that can be refined by welder.
  8. /// For example, glass shard can be refined to glass sheet.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent, Access(typeof(ToolRefinablSystem))]
  11. public sealed partial class ToolRefinableComponent : Component
  12. {
  13. /// <summary>
  14. /// The items created when the item is refined.
  15. /// </summary>
  16. [DataField(required: true)]
  17. public List<EntitySpawnEntry> RefineResult = new();
  18. /// <summary>
  19. /// The amount of time it takes to refine a given item.
  20. /// </summary>
  21. [DataField]
  22. public float RefineTime = 2f;
  23. /// <summary>
  24. /// The amount of fuel it takes to refine a given item.
  25. /// </summary>
  26. [DataField]
  27. public float RefineFuel = 3f;
  28. /// <summary>
  29. /// The tool type needed in order to refine this item.
  30. /// </summary>
  31. [DataField]
  32. public ProtoId<ToolQualityPrototype> QualityNeeded = "Welding";
  33. }