2023-05-01 22:43:31 +08:00
|
|
|
using Content.Server.Chemistry.EntitySystems;
|
|
|
|
|
using Content.Shared.Random;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
2023-10-14 09:45:28 -07:00
|
|
|
namespace Content.Server.Chemistry.Components;
|
2023-05-01 22:43:31 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fills a solution container randomly using a weighted random prototype
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent, Access(typeof(SolutionRandomFillSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class RandomFillSolutionComponent : Component
|
2023-05-01 22:43:31 +08:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Solution name which to add reagents to.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("solution")]
|
|
|
|
|
public string Solution { get; set; } = "default";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-08-01 22:10:48 +08:00
|
|
|
/// Weighted random fill prototype Id. Used to pick reagent and quantity.
|
2023-05-01 22:43:31 +08:00
|
|
|
/// </summary>
|
2023-08-01 22:10:48 +08:00
|
|
|
[DataField("weightedRandomId", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<WeightedRandomFillSolutionPrototype>))]
|
2023-09-10 12:35:05 +12:00
|
|
|
public string? WeightedRandomId;
|
2023-05-01 22:43:31 +08:00
|
|
|
}
|