2022-10-26 08:34:56 +02:00
|
|
|
using Content.Shared.Kitchen;
|
|
|
|
|
using Content.Server.Kitchen.EntitySystems;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2020-11-26 14:53:42 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Kitchen.Components
|
2020-11-26 14:53:42 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The combo reagent grinder/juicer. The reason why grinding and juicing are seperate is simple,
|
|
|
|
|
/// think of grinding as a utility to break an object down into its reagents. Think of juicing as
|
|
|
|
|
/// converting something into its single juice form. E.g, grind an apple and get the nutriment and sugar
|
|
|
|
|
/// it contained, juice an apple and get "apple juice".
|
|
|
|
|
/// </summary>
|
2022-10-26 08:34:56 +02:00
|
|
|
[Access(typeof(ReagentGrinderSystem)), RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ReagentGrinderComponent : Component
|
2020-11-26 14:53:42 +02:00
|
|
|
{
|
2024-01-22 17:13:04 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2022-11-08 15:15:49 -05:00
|
|
|
public int StorageMaxEntities = 6;
|
|
|
|
|
|
2022-10-26 08:34:56 +02:00
|
|
|
[DataField("workTime"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public TimeSpan WorkTime = TimeSpan.FromSeconds(3.5); // Roughly matches the grind/juice sounds.
|
|
|
|
|
|
2024-01-22 17:13:04 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2022-11-08 15:15:49 -05:00
|
|
|
public float WorkTimeMultiplier = 1;
|
|
|
|
|
|
2022-10-26 08:34:56 +02:00
|
|
|
[DataField("clickSound"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
|
2020-11-26 14:53:42 +02:00
|
|
|
|
2022-10-26 08:34:56 +02:00
|
|
|
[DataField("grindSound"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public SoundSpecifier GrindSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/blender.ogg");
|
|
|
|
|
|
|
|
|
|
[DataField("juiceSound"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public SoundSpecifier JuiceSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/juicer.ogg");
|
2022-11-08 15:15:49 -05:00
|
|
|
|
2023-11-27 22:12:34 +11:00
|
|
|
public EntityUid? AudioStream;
|
2022-10-26 08:34:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Access(typeof(ReagentGrinderSystem)), RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ActiveReagentGrinderComponent : Component
|
2022-10-26 08:34:56 +02:00
|
|
|
{
|
2020-11-26 14:53:42 +02:00
|
|
|
/// <summary>
|
2022-10-26 08:34:56 +02:00
|
|
|
/// Remaining time until the grinder finishes grinding/juicing.
|
2020-11-26 14:53:42 +02:00
|
|
|
/// </summary>
|
2022-10-26 08:34:56 +02:00
|
|
|
[ViewVariables]
|
2022-11-08 15:15:49 -05:00
|
|
|
public TimeSpan EndTime;
|
2022-03-28 17:03:03 +13:00
|
|
|
|
2022-10-26 08:34:56 +02:00
|
|
|
[ViewVariables]
|
|
|
|
|
public GrinderProgram Program;
|
2020-11-26 14:53:42 +02:00
|
|
|
}
|
|
|
|
|
}
|