Save seed data in components and remove the seed-database (#7499)

This commit is contained in:
Leon Friedrich
2022-04-16 17:32:35 +12:00
committed by GitHub
parent 98e7c84dad
commit 6997bd83b2
16 changed files with 225 additions and 232 deletions

View File

@@ -1,7 +1,5 @@
using Content.Server.Botany.Systems;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Botany.Components;
@@ -11,5 +9,15 @@ public sealed class ProduceComponent : Component
{
[DataField("targetSolution")] public string SolutionName { get; set; } = "food";
[DataField("seed", required: true)] public string SeedName = default!;
/// <summary>
/// Seed data used to create a <see cref="SeedComponent"/> when this produce has its seeds extracted.
/// </summary>
[DataField("seed")]
public SeedData? Seed;
/// <summary>
/// Seed data used to create a <see cref="SeedComponent"/> when this produce has its seeds extracted.
/// </summary>
[DataField("seedId", customTypeSerializer: typeof(PrototypeIdSerializer<SeedPrototype>))]
public readonly string? SeedId;
}