Files
crystall-punk-14/Content.Shared/_CP14/Fishing/Systems/CP14FishingPoolSystem.cs
Tornado Tech dbcf17bab2 Updated system
2024-12-09 02:29:33 +10:00

20 lines
597 B
C#

using Content.Shared._CP14.Fishing.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
namespace Content.Shared._CP14.Fishing.Systems;
public sealed class CP14FishingPoolSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IRobustRandom _random = default!;
public EntProtoId GetLootPrototypeId(Entity<CP14FishingPoolComponent> pool)
{
var lootTable = _prototype.Index(pool.Comp.LootTable);
var loot = _random.Pick(lootTable.Prototypes);
return loot;
}
}