Move spawning collections of EntitySpawnEntry out of StorageSystem, make Butcherable use it (#7305)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
mirrorcult
2022-03-28 09:58:13 -07:00
committed by GitHub
parent 2f9f626ea9
commit 2d610ebb52
24 changed files with 316 additions and 253 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.DragDrop;
using Content.Shared.Storage;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -13,14 +14,9 @@ namespace Content.Shared.Nutrition.Components
[RegisterComponent]
public sealed class SharedButcherableComponent : Component, IDraggable
{
//TODO: List for sub-products like animal-hides, organs and etc?
[ViewVariables]
[DataField("spawned", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string SpawnedPrototype = "FoodMeat";
[ViewVariables]
[DataField("pieces")]
public int Pieces = 5;
[DataField("spawned", required: true)]
public List<EntitySpawnEntry> SpawnedEntities = new();
[DataField("butcherDelay")]
public float ButcherDelay = 8.0f;