Files
tbd-station-14/Content.Shared/Nutrition/Components/FoodComponent.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

77 lines
2.4 KiB
C#

using Content.Shared.Body.Components;
using Content.Shared.FixedPoint;
using Content.Shared.Nutrition.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
namespace Content.Shared.Nutrition.Components;
[Obsolete("Migration to Content.Shared.Nutrition.Components.EdibleComponent is required")]
[RegisterComponent, Access(typeof(FoodSystem), typeof(FoodSequenceSystem))]
public sealed partial class FoodComponent : Component
{
[DataField]
public string Solution = "food";
[DataField]
public SoundSpecifier UseSound = new SoundCollectionSpecifier("eating");
[DataField]
public List<EntProtoId> Trash = new();
[DataField]
public FixedPoint2? TransferAmount = FixedPoint2.New(5);
/// <summary>
/// Acceptable utensil to use
/// </summary>
[DataField]
public UtensilType Utensil = UtensilType.Fork; //There are more "solid" than "liquid" food
/// <summary>
/// Is utensil required to eat this food
/// </summary>
[DataField]
public bool UtensilRequired;
/// <summary>
/// If this is set to true, food can only be eaten if you have a stomach with a
/// <see cref="StomachComponent.SpecialDigestible"/> that includes this entity in its whitelist,
/// rather than just being digestible by anything that can eat food.
/// Whitelist the food component to allow eating of normal food.
/// </summary>
[DataField]
public bool RequiresSpecialDigestion;
/// <summary>
/// Stomachs required to digest this entity.
/// Used to simulate 'ruminant' digestive systems (which can digest grass)
/// </summary>
[DataField]
public int RequiredStomachs = 1;
/// <summary>
/// The localization identifier for the eat message. Needs a "food" entity argument passed to it.
/// </summary>
[DataField]
public LocId EatMessage = "edible-nom";
/// <summary>
/// How long it takes to eat the food personally.
/// </summary>
[DataField]
public float Delay = 1;
/// <summary>
/// This is how many seconds it takes to force feed someone this food.
/// Should probably be smaller for small items like pills.
/// </summary>
[DataField]
public float ForceFeedDelay = 3;
/// <summary>
/// For mobs that are food, requires killing them before eating.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool RequireDead = true;
}