using Content.Shared.Random;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Procedural.Loot;
///
/// Randomly places loot in free areas inside the dungeon.
///
public sealed partial class RandomSpawnsLoot : IDungeonLoot
{
[ViewVariables(VVAccess.ReadWrite), DataField("entries", required: true)]
public List Entries = new();
}
[DataDefinition]
public partial record struct RandomSpawnLootEntry() : IBudgetEntry
{
[ViewVariables(VVAccess.ReadWrite), DataField("proto", required: true, customTypeSerializer:typeof(PrototypeIdSerializer))]
public string Proto { get; set; } = string.Empty;
///
/// Cost for this loot to spawn.
///
[ViewVariables(VVAccess.ReadWrite), DataField("cost")]
public float Cost { get; set; } = 1f;
///
/// Unit probability for this entry. Weighted against the entire table.
///
[ViewVariables(VVAccess.ReadWrite), DataField("prob")]
public float Prob { get; set; } = 1f;
}