mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
* init * API * testing * review * return * good enough, fix later TODO: Proper prototype DoAfter Sounds * "proper" prototype TODO DoAfter Sprite * proper protos, mortar sprite * juicer sprites TODO: Juicer sounds Makeshift crafting recipes Add regular to vendors * sprite tweak * juicing sound, cleanup, construction * vendors * line end * attribution newline * small balance tweak * Let it be known id never webedit * meta * item size * review * handhelds * partial review * cache solution, looping * graph * review * popup --------- Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using Content.Shared.Chemistry.Components;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Kitchen.Components;
|
|
|
|
/// <summary>
|
|
/// Indicates this entity is a handheld grinder.
|
|
/// Entities with <see cref="ExtractableComponent"/> can be used on handheld grinders to extract their solutions.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class HandheldGrinderComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The length of the doAfter.
|
|
/// After it ends, the respective GrinderProgram is used on the contents.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan DoAfterDuration = TimeSpan.FromSeconds(4f);
|
|
|
|
/// <summary>
|
|
/// Popup to use after the current item is done processing.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public LocId FinishedPopup = "handheld-grinder-default";
|
|
|
|
/// <summary>
|
|
/// The sound to play when the doAfter starts.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/mortar_grinding.ogg", AudioParams.Default.WithLoop(true));
|
|
|
|
/// <summary>
|
|
/// The grinder program to use.
|
|
/// Decides whether this one will Juice or Grind the objects.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public GrinderProgram Program = GrinderProgram.Grind;
|
|
|
|
/// <summary>
|
|
/// The solution into which the output reagents will go.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public string SolutionName = "grinderOutput";
|
|
|
|
/// <summary>
|
|
/// Cached solution from the grinder.
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public Entity<SolutionComponent>? GrinderSolution;
|
|
|
|
// Used to cancel the sound.
|
|
public EntityUid? AudioStream;
|
|
}
|