random loadout support (#11027)

This commit is contained in:
Nemanja
2022-09-16 10:03:45 -04:00
committed by GitHub
parent 2003a58138
commit dc1d8ec9b4
5 changed files with 26 additions and 20 deletions

View File

@@ -1,12 +1,16 @@
using Content.Shared.Roles;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Clothing.Components
{
[RegisterComponent]
public sealed class LoadoutComponent : Component
{
[DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<StartingGearPrototype>))]
public string Prototype = string.Empty;
/// <summary>
/// A list of starting gears, of which one will be given.
/// All elements are weighted the same in the list.
/// </summary>
[DataField("prototypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<StartingGearPrototype>))]
public List<string>? Prototypes;
}
}