ReagentGrinderComponent.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Content.Shared.Kitchen;
  2. using Content.Server.Kitchen.EntitySystems;
  3. using Robust.Shared.Audio;
  4. namespace Content.Server.Kitchen.Components
  5. {
  6. /// <summary>
  7. /// The combo reagent grinder/juicer. The reason why grinding and juicing are seperate is simple,
  8. /// think of grinding as a utility to break an object down into its reagents. Think of juicing as
  9. /// converting something into its single juice form. E.g, grind an apple and get the nutriment and sugar
  10. /// it contained, juice an apple and get "apple juice".
  11. /// </summary>
  12. [Access(typeof(ReagentGrinderSystem)), RegisterComponent]
  13. public sealed partial class ReagentGrinderComponent : Component
  14. {
  15. [DataField]
  16. public int StorageMaxEntities = 6;
  17. [DataField]
  18. public TimeSpan WorkTime = TimeSpan.FromSeconds(3.5); // Roughly matches the grind/juice sounds.
  19. [DataField]
  20. public float WorkTimeMultiplier = 1;
  21. [DataField]
  22. public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
  23. [DataField]
  24. public SoundSpecifier GrindSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/blender.ogg");
  25. [DataField]
  26. public SoundSpecifier JuiceSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/juicer.ogg");
  27. [DataField]
  28. public GrinderAutoMode AutoMode = GrinderAutoMode.Off;
  29. public EntityUid? AudioStream;
  30. }
  31. [Access(typeof(ReagentGrinderSystem)), RegisterComponent]
  32. public sealed partial class ActiveReagentGrinderComponent : Component
  33. {
  34. /// <summary>
  35. /// Remaining time until the grinder finishes grinding/juicing.
  36. /// </summary>
  37. [ViewVariables]
  38. public TimeSpan EndTime;
  39. [ViewVariables]
  40. public GrinderProgram Program;
  41. }
  42. }