* commit skeleton reagent grinder component * add reagentgrinder bounduserinterface, add suffix to grinder yml, add reagentgrinder sprites * implement much more of the grinder ui functionality * get more use out of hasbeaker bool * complete wiring up most of the chamber/beaker UI controls * remove whitelist prototype id. add grindable tag component * add juiceable component * rename boolparam to be clearer * more juice * add some juice reagents and apply them to their drink prototypes * re add glassyellow * implement juicing and results * add time delay to grindjuice * add reagent grinder visualizer, add reagent grinder sounds, fix some yaml errors too * interface has clear indication of currennt operation, and busy status * add ReagentGrinder to Client ignnored components * Update Content.Client/GameObjects/Components/Kitchen/ReagentGrinderBoundUserInterface.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update Content.Client/GameObjects/Components/Kitchen/ReagentGrinderBoundUserInterface.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update Content.Shared/Kitchen/SharedReagentGrinderComponent.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * implemennt sloth changes * fix isbusy * Disable grind/juice buttons if there's nothing to grind or juice, also some misc fixes * unsubscribe from messages on remove + fix xmlcomment * fix bounding box * Add these to dictionary * Add these to client ignore * Whitespace and unneeded import fixes * tommy's toes * Where'd these newlines come from * power * improve bounding box * Check power better & show contents when beaker is ejected * check power here * Disable eject buttons when running * improve comments * readwrite for viewvars on work time and capacity * Address most of Sloth's reviews * Make this cleaner * add grindablecomponent to motherfucking everything * Fix reviews * some more null suppressions * remove unused random field Co-authored-by: scuffedjays <yetanotherscuffed@gmail.com> Co-authored-by: namespace-Memory <66768086+namespace-Memory@users.noreply.github.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
18 lines
675 B
C#
18 lines
675 B
C#
using Robust.Client.GameObjects;
|
|
using Robust.Client.Interfaces.GameObjects.Components;
|
|
using static Content.Shared.Kitchen.SharedReagentGrinderComponent;
|
|
|
|
namespace Content.Client.GameObjects.Components.Kitchen
|
|
{
|
|
public class ReagentGrinderVisualizer : AppearanceVisualizer
|
|
{
|
|
public override void OnChangeData(AppearanceComponent component)
|
|
{
|
|
base.OnChangeData(component);
|
|
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
|
component.TryGetData(ReagentGrinderVisualState.BeakerAttached, out bool hasBeaker);
|
|
sprite.LayerSetState(0, $"juicer{(hasBeaker ? "1" : "0")}");
|
|
}
|
|
}
|
|
}
|