19 lines
658 B
C#
19 lines
658 B
C#
using Content.Shared.Mining;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
|
|
|
namespace Content.Shared.Random;
|
|
|
|
/// <summary>
|
|
/// Linter-friendly version of weightedRandom for Ore prototypes.
|
|
/// </summary>
|
|
[Prototype("weightedRandomOre")]
|
|
public sealed class WeightedRandomOrePrototype : IWeightedRandomPrototype
|
|
{
|
|
[IdDataField]
|
|
public string ID { get; private set; } = default!;
|
|
|
|
[DataField("weights", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<float, OrePrototype>))]
|
|
public Dictionary<string, float> Weights { get; private set; } = new();
|
|
}
|