* Add Utensil component For eating. With utensils. Added to fork, plastic fork, spoon, plastic spoon and plastic knife. Ignored component on the client. * Add break chance to utensils Set to 20% for plastic ones * Add break sound to utensils * Add utensil kinds None, fork, spoon and knife. For sporks, forknifes and sporknifes, of course. * Add restricting foods by utensils needed * Fix utensils breaking when food isn't eaten * Moved getting held utensils to FoodComponent * Add breaking a clicking utensil even if its not necessary to eat the food * Move use utensil code to a separate method * Add telling a handless entity when they need an utensil to eat The immersion is off the charts * Change food trash to only be held when the food was also being held * Fix Wi-Fi utensils * Remove unnecessary utensil ItemGroup * Made TryUseFood public, removed redundant trash position update * Renamed UtensilKind to UtensilType * Remove eating food when clicking with it on nothing * Disable eating food when clicked directly if it requires an untensil to eat
22 lines
424 B
C#
22 lines
424 B
C#
using System;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Shared.GameObjects.Components.Utensil
|
|
{
|
|
[Flags]
|
|
public enum UtensilType : byte
|
|
{
|
|
None = 0,
|
|
Fork = 1,
|
|
Spoon = 1 << 1,
|
|
Knife = 1 << 2
|
|
}
|
|
|
|
public class SharedUtensilComponent : Component
|
|
{
|
|
public override string Name => "Utensil";
|
|
|
|
public virtual UtensilType Types { get; set; }
|
|
}
|
|
}
|