Files
tbd-station-14/Content.Server/Shuttles/Components/GridSpawnComponent.cs
metalgearsloth a7388e5c05 Add trade stations (#23863)
* puters

* Start on fulfillment

* weh

* Smol update

* FTL sound fixes or smth iunno

* Add consoles

* More tweaks

* Make it unanchorable

* final wehs

* weh

* Fix 1 test

* Shrimply bump the distance

* cat
2024-01-19 13:02:28 +11:00

53 lines
1.4 KiB
C#

using Content.Server.Shuttles.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Similar to <see cref="GridFillComponent"/> except spawns the grid near to the station.
/// </summary>
[RegisterComponent, Access(typeof(ShuttleSystem))]
public sealed partial class GridSpawnComponent : Component
{
/// <summary>
/// Dictionary of groups where each group will have entries selected.
/// String is just an identifier to make yaml easier.
/// </summary>
[DataField(required: true)] public Dictionary<string, GridSpawnGroup> Groups = new();
}
[DataRecord]
public record struct GridSpawnGroup
{
public List<ResPath> Paths = new();
public int MinCount = 1;
public int MaxCount = 1;
/// <summary>
/// Components to be added to any spawned grids.
/// </summary>
public ComponentRegistry AddComponents = new();
/// <summary>
/// Hide the IFF label of the grid.
/// </summary>
public bool Hide = false;
/// <summary>
/// Should we set the metadata name of a grid. Useful for admin purposes.
/// </summary>
public bool NameGrid = false;
/// <summary>
/// Should we add this to the station's grids (if possible / relevant).
/// </summary>
public bool StationGrid = true;
public GridSpawnGroup()
{
}
}