Add Spaceshrooms (#17092)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
33
Content.Shared/Random/RandomFillSolution.cs
Normal file
33
Content.Shared/Random/RandomFillSolution.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user