2025-08-19 20:56:36 +03:00
|
|
|
using Content.Shared.Kitchen;
|
2022-03-28 09:58:13 -07:00
|
|
|
using Content.Shared.Storage;
|
2023-02-14 00:29:34 +11:00
|
|
|
using Robust.Shared.GameStates;
|
2020-09-26 14:28:55 +01:00
|
|
|
|
2025-08-19 20:56:36 +03:00
|
|
|
namespace Content.Shared.Nutrition.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates that the entity can be butchered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
|
|
|
public sealed partial class ButcherableComponent : Component
|
2020-09-26 14:28:55 +01:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2025-08-19 20:56:36 +03:00
|
|
|
/// List of the entities that this entity should spawn after being butchered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Note that <see cref="SharedKitchenSpikeSystem"/> spawns one item at a time and decreases the amount until it's zero and then removes the entry.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
[DataField("spawned", required: true), AutoNetworkedField]
|
|
|
|
|
public List<EntitySpawnEntry> SpawnedEntities = [];
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Time required to butcher that entity.
|
2020-09-26 14:28:55 +01:00
|
|
|
/// </summary>
|
2025-08-19 20:56:36 +03:00
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public float ButcherDelay = 8.0f;
|
2021-03-08 21:24:34 +11:00
|
|
|
|
2025-08-19 20:56:36 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Tool type used to butcher that entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("butcheringType"), AutoNetworkedField]
|
|
|
|
|
public ButcheringType Type = ButcheringType.Knife;
|
|
|
|
|
}
|
2022-02-18 15:57:42 -07:00
|
|
|
|
2025-08-19 20:56:36 +03:00
|
|
|
public enum ButcheringType : byte
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// E.g. goliaths.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Knife,
|
2022-02-18 15:57:42 -07:00
|
|
|
|
2025-08-19 20:56:36 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// E.g. monkeys.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Spike,
|
2022-02-18 15:57:42 -07:00
|
|
|
|
2025-08-19 20:56:36 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// E.g. humans.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Gibber // TODO
|
2020-09-26 14:28:55 +01:00
|
|
|
}
|