Files
tbd-station-14/Content.Shared/Nutrition/Components/UtensilComponent.cs
Princess Cheeseballs 91854e0776 Debody Food and Drink Systems, Combine Food and Drink into One System. (#39031)
* Shelve

* 22 file diff

* What if it was just better

* Hold that thought

* Near final Commit, then YAML hell

* 95% done with cs

* Working Commit

* Final Commit (Before reviews tear it apart and kill me)

* Add a really stupid comment.

* KILL

* EXPLODE TEST FAILS WITH MY MIND

* I hate it here

* TACTICAL NUCLEAR STRIKE

* Wait what the fuck was I doing?

* Comments

* Me when I'm stupid

* Food doesn't need solutions

* API improvements with some API weirdness

* Move non-API out of API

* Better comment

* Fixes and spelling mistakes

* Final fixes

* Final fixes for real...

* Kill food and drink localization files because I hate them.

* Water droplet fix

* Utensil fixes

* Fix verb priority (It should've been 2)

* A few minor localization fixes

* merge conflict and stuff

* MERGE CONFLICT NUCLEAR WAR!!!

* Cleanup

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-08-06 12:53:38 -04:00

51 lines
1.4 KiB
C#

using Content.Shared.Nutrition.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Nutrition.Components
{
[RegisterComponent, NetworkedComponent, Access(typeof(IngestionSystem))]
public sealed partial class UtensilComponent : Component
{
[DataField("types")]
private UtensilType _types = UtensilType.None;
[ViewVariables]
public UtensilType Types
{
get => _types;
set
{
if (_types.Equals(value))
return;
_types = value;
}
}
/// <summary>
/// The chance that the utensil has to break with each use.
/// A value of 0 means that it is unbreakable.
/// </summary>
[DataField("breakChance")]
public float BreakChance;
/// <summary>
/// The sound to be played if the utensil breaks.
/// </summary>
[DataField("breakSound")]
public SoundSpecifier BreakSound = new SoundPathSpecifier("/Audio/Items/snap.ogg");
}
// If you want to make a fancy output on "wrong" composite utensil use (like: you need fork and knife)
// There should be Dictionary I guess (Dictionary<UtensilType, string>)
[Flags]
public enum UtensilType : byte
{
None = 0,
Fork = 1,
Spoon = 1 << 1,
Knife = 1 << 2
}
}