Add knife butchering and blood gibbing (#6770)

This commit is contained in:
mirrorcult
2022-02-18 15:57:42 -07:00
committed by GitHub
parent 67661ddbdb
commit 676ca21b5f
28 changed files with 223 additions and 45 deletions

View File

@@ -15,13 +15,19 @@ namespace Content.Shared.Nutrition.Components
{
//TODO: List for sub-products like animal-hides, organs and etc?
[ViewVariables]
[DataField("meat", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string MeatPrototype = "FoodMeat";
[DataField("spawned", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string SpawnedPrototype = "FoodMeat";
[ViewVariables]
[DataField("pieces")]
public int Pieces = 5;
[DataField("butcherDelay")]
public float ButcherDelay = 8.0f;
[DataField("butcheringType")]
public ButcheringType Type = ButcheringType.Knife;
/// <summary>
/// Prevents butchering same entity on two and more spikes simultaneously and multiple doAfters on the same Spike
/// </summary>
@@ -32,7 +38,14 @@ namespace Content.Shared.Nutrition.Components
// CanDropOn behaviors as well (IDragDropOn)
bool IDraggable.CanDrop(CanDropEvent args)
{
return true;
return Type != ButcheringType.Knife;
}
}
public enum ButcheringType
{
Knife, // e.g. goliaths
Spike, // e.g. monkeys
Gibber // e.g. humans. TODO
}
}