using Content.Shared.Body.Components; using Content.Shared.FixedPoint; using Content.Shared.Nutrition.EntitySystems; using Content.Shared.Nutrition.Prototypes; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Nutrition.Components; /// /// This is used on an entity with a solution container to flag a specific solution as being able to have its /// reagents consumed directly. /// [RegisterComponent, NetworkedComponent, Access(typeof(IngestionSystem))] public sealed partial class EdibleComponent : Component { /// /// Name of the solution that stores the consumable reagents /// [DataField] public string Solution = "food"; /// /// Should this entity be deleted when our solution is emptied? /// [DataField] public bool DestroyOnEmpty = true; /// /// Trash we spawn when eaten, will not spawn if the item isn't deleted when empty. /// [DataField] public List Trash = new(); /// /// How much of our solution is eaten on a do-after completion. Set to null to eat the whole thing. /// [DataField] public FixedPoint2? TransferAmount = FixedPoint2.New(5); /// /// Acceptable utensils to use /// [DataField] public UtensilType Utensil = UtensilType.Fork; //There are more "solid" than "liquid" food /// /// Do we need a utensil to access this solution? /// [DataField] public bool UtensilRequired; /// /// If this is set to true, food can only be eaten if you have a stomach with a /// 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. /// [DataField] public bool RequiresSpecialDigestion; /// /// How long it takes to eat the food personally. /// [DataField] public TimeSpan Delay = TimeSpan.FromSeconds(1f); /// /// This is how many seconds it takes to force-feed someone this food. /// Should probably be smaller for small items like pills. /// [DataField] public TimeSpan ForceFeedDelay = TimeSpan.FromSeconds(3f); /// /// For mobs that are food, requires killing them before eating. /// [DataField] public bool RequireDead = true; /// /// Verb, icon, and sound data for our edible. /// [DataField] public ProtoId Edible = IngestionSystem.Food; }