CatStation/Content.Server/Animals/Components/EntityProducerComponent.cs
AndrewFenriz 6dc1aae3f2
Refactor animal reagent/entity production (#45019)
* port 35190

* HungerProduction

* SolutionProducer

* update

* move to server

* small tweak for Shearable

* fix

* ProductionAttemptEvent

* EntityProducer

* update EggLayer

* EntityTable

* no more actions on EggLayer

* move popups to comp

* kill EggLayer

* new locale

* rename field

* upd

* SatiationType

* rename to SatiationProduction and lil docs

* EntityQuery

* more docs for god of docs

* small fix

* more queries
2026-08-16 19:15:52 +00:00

25 lines
937 B
C#

using Content.Server.Animals.Systems;
using Content.Shared.EntityTable.EntitySelectors;
namespace Content.Server.Animals.Components;
/// <summary>
/// Spawns configured entities when production is requested.
/// </summary>
[RegisterComponent, Access(typeof(EntityProducerSystem))]
public sealed partial class EntityProducerComponent : Component
{
/// <summary>
/// Selects the entities spawned for each production attempt.
/// </summary>
[DataField(required: true)]
public EntityTableSelector Table = default!;
}
/// <summary>
/// Raised after entity production succeeds with the entities that were spawned.
/// </summary>
/// <param name="Owner">Entity on whose behalf the entities were produced.</param>
/// <param name="Entities">Entities spawned by the successful production attempt.</param>
[ByRefEvent]
public readonly record struct EntitiesProducedEvent(EntityUid Owner, IReadOnlyList<EntityUid> Entities);