Files
Delta-v/Content.Shared/Kitchen/Components/ReagentGrinderComponent.cs
T
ScarKy0andJanet Blackquill 86d91c8cba Add Mortar and Handheld Juicer (#42019)
* 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>
2026-04-04 16:57:55 +02:00

54 lines
1.8 KiB
C#

using Content.Shared.Kitchen.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Kitchen.Components;
/// <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, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedReagentGrinderSystem))]
public sealed partial class ReagentGrinderComponent : Component
{
[DataField, AutoNetworkedField]
public int StorageMaxEntities = 6;
[DataField, AutoNetworkedField]
public TimeSpan WorkTime = TimeSpan.FromSeconds(3.5); // Roughly matches the grind/juice sounds.
[DataField, AutoNetworkedField]
public float WorkTimeMultiplier = 1;
[DataField]
public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
[DataField]
public SoundSpecifier GrindSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/blender.ogg");
[DataField]
public SoundSpecifier JuiceSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/juicer.ogg");
[DataField, AutoNetworkedField]
public GrinderAutoMode AutoMode = GrinderAutoMode.Off;
public EntityUid? AudioStream;
}
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedReagentGrinderSystem))]
public sealed partial class ActiveReagentGrinderComponent : Component
{
/// <summary>
/// Remaining time until the grinder finishes grinding/juicing.
/// </summary>
[ViewVariables]
public TimeSpan EndTime;
[ViewVariables]
public GrinderProgram Program;
}