Add Spaceshrooms (#17092)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
forthbridge
2023-08-01 22:10:48 +08:00
committed by GitHub
parent 474b29cc16
commit 5fc7f21853
18 changed files with 369 additions and 54 deletions

View 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();
}