Files
tbd-station-14/Content.Shared/Random/RandomFillSolution.cs
forthbridge 5fc7f21853 Add Spaceshrooms (#17092)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-08-02 00:10:48 +10:00

34 lines
1.1 KiB
C#

using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Shared.Random;
/// <summary>
/// Data that specifies reagents that share the same weight and quantity for use with WeightedRandomSolution.
/// </summary>
[Serializable, NetSerializable]
[DataDefinition]
public sealed class RandomFillSolution
{
/// <summary>
/// Quantity of listed reagents.
/// </summary>
[DataField("quantity")]
public FixedPoint2 Quantity = 0;
/// <summary>
/// Random weight of listed reagents.
/// </summary>
[DataField("weight")]
public float Weight = 0;
/// <summary>
/// Listed reagents that the weight and quantity apply to.
/// </summary>
[DataField("reagents", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<ReagentPrototype>))]
public List<string> Reagents = new();
}