2021-09-06 15:49:44 +02:00
|
|
|
using Content.Shared.Chemistry.Components;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Kitchen.Components;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-03-01 15:24:46 -08:00
|
|
|
using Robust.Shared.Containers;
|
2020-11-26 14:53:42 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2020-11-26 14:53:42 +02:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
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>
|
|
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class ReagentGrinderComponent : SharedReagentGrinderComponent
|
2020-11-26 14:53:42 +02:00
|
|
|
{
|
2021-07-29 06:58:38 +02:00
|
|
|
[ViewVariables] public ContainerSlot BeakerContainer = default!;
|
2020-11-26 14:53:42 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Can be null since we won't always have a beaker in the grinder.
|
|
|
|
|
/// </summary>
|
2021-09-06 15:49:44 +02:00
|
|
|
[ViewVariables] public Solution? HeldBeaker = default!;
|
2020-11-26 14:53:42 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Contains the things that are going to be ground or juiced.
|
|
|
|
|
/// </summary>
|
2021-07-29 06:58:38 +02:00
|
|
|
[ViewVariables] public Container Chamber = default!;
|
2020-11-26 14:53:42 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Is the machine actively doing something and can't be used right now?
|
|
|
|
|
/// </summary>
|
2021-07-29 06:58:38 +02:00
|
|
|
public bool Busy;
|
2020-11-26 14:53:42 +02:00
|
|
|
|
|
|
|
|
//YAML serialization vars
|
2021-07-29 06:58:38 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("chamberCapacity")] public int StorageCap = 16;
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("workTime")] public int WorkTime = 3500; //3.5 seconds, completely arbitrary for now.
|
2021-07-31 19:52:33 +02:00
|
|
|
[DataField("clickSound")] public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
|
|
|
|
|
[DataField("grindSound")] public SoundSpecifier GrindSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/blender.ogg");
|
|
|
|
|
[DataField("juiceSound")] public SoundSpecifier JuiceSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/juicer.ogg");
|
2020-11-26 14:53:42 +02:00
|
|
|
}
|
|
|
|
|
}
|