CatStation/Content.Shared/Procedural/Loot/RandomSpawnsLoot.cs
deltanedas cf7fde3d62
Big prototype and datafield cleanup (#45202)
* giant protoid cleanup

* yml changes

* !

---------

Co-authored-by: deltanedas <@deltanedas:goida.zip>
2026-08-12 02:07:22 +00:00

32 lines
812 B
C#

using Content.Shared.Random;
using Robust.Shared.Prototypes;
namespace Content.Shared.Procedural.Loot;
/// <summary>
/// Randomly places loot in free areas inside the dungeon.
/// </summary>
public sealed partial class RandomSpawnsLoot : IDungeonLoot
{
[DataField(required: true)]
public List<RandomSpawnLootEntry> Entries = new();
}
[DataDefinition]
public partial record struct RandomSpawnLootEntry() : IBudgetEntry
{
[DataField(required: true)]
public EntProtoId Proto { get; set; }
/// <summary>
/// Cost for this loot to spawn.
/// </summary>
[DataField]
public float Cost { get; set; } = 1f;
/// <summary>
/// Unit probability for this entry. Weighted against the entire table.
/// </summary>
[DataField]
public float Prob { get; set; } = 1f;
}