Tech disk 4891 (#16752)

* Tech disk gacha

* customtypeserializer
This commit is contained in:
Nemanja
2023-05-25 18:07:39 -04:00
committed by GitHub
parent bf2417db34
commit e62c11dd85
6 changed files with 34 additions and 33 deletions

View File

@@ -1,4 +1,7 @@
namespace Content.Server.Research.TechnologyDisk.Components;
using Content.Shared.Random;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Research.TechnologyDisk.Components;
[RegisterComponent]
public sealed class TechnologyDiskComponent : Component
@@ -8,4 +11,10 @@ public sealed class TechnologyDiskComponent : Component
/// </summary>
[DataField("recipes")]
public List<string>? Recipes;
/// <summary>
/// A weighted random prototype for how rare each tier should be.
/// </summary>
[DataField("tierWeightPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<WeightedRandomPrototype>))]
public string TierWeightPrototype = "TechDiskTierWeights";
}