CatStation/Content.Shared/Containers/EntityTableContainerFillComponent.cs
āda cbbc651957
EntTable EmptyContainerCondition (#45583)
* surprisingly easy

* touchup

* comment

* refactor: cleanup ContainerFillSystem.OnTableMapInit, more xml-doc for EmptyContainerCondition

* tested

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Co-authored-by: Fildrance <fildrance@gmail.com>
2026-08-24 16:00:55 +00:00

27 lines
869 B
C#

using Content.Shared.EntityTable;
using Content.Shared.EntityTable.EntitySelectors;
namespace Content.Shared.Containers;
/// <summary>
/// Version of <see cref="ContainerFillComponent"/> that utilizes <see cref="EntityTableSelector"/>
/// </summary>
[RegisterComponent, Access(typeof(ContainerFillSystem))]
public sealed partial class EntityTableContainerFillComponent : Component
{
[DataField]
public Dictionary<string, EntityTableSelector> Containers = new();
/// <summary>
/// Whether to sort the contents of the table by size before inserting.
/// Helps with fitting items into containers.
/// </summary>
[DataField]
public bool Sort;
/// <summary>
/// When true the container will be passed into the table with an <see cref="EntityTableContext"/>.
/// </summary>
[DataField]
public bool ContextContainers;
}