1
0

SliceableFoodComponent.cs 989 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using Content.Server.Nutrition.EntitySystems;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.Nutrition.Components;
  5. [RegisterComponent, Access(typeof(SliceableFoodSystem))]
  6. public sealed partial class SliceableFoodComponent : Component
  7. {
  8. /// <summary>
  9. /// Prototype to spawn after slicing.
  10. /// If null then it can't be sliced.
  11. /// </summary>
  12. [DataField]
  13. public EntProtoId? Slice;
  14. [DataField]
  15. public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/chop.ogg");
  16. /// <summary>
  17. /// Number of slices the food starts with.
  18. /// </summary>
  19. [DataField("count")]
  20. public ushort TotalCount = 5;
  21. /// <summary>
  22. /// how long it takes for this food to be sliced
  23. /// </summary>
  24. [DataField]
  25. public float SliceTime = 1f;
  26. /// <summary>
  27. /// all the pieces will be shifted in random directions.
  28. /// </summary>
  29. [DataField]
  30. public float SpawnOffset = 0.5f;
  31. }