2023-05-31 11:13:02 +10:00
|
|
|
using Content.Server.Shuttles.Systems;
|
2024-01-19 13:02:28 +11:00
|
|
|
using Robust.Shared.Prototypes;
|
2023-05-31 11:13:02 +10:00
|
|
|
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))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class GridSpawnComponent : Component
|
2023-05-31 11:13:02 +10:00
|
|
|
{
|
2024-01-09 15:29:36 -07:00
|
|
|
/// <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();
|
2023-05-31 11:13:02 +10:00
|
|
|
}
|
2024-01-09 15:29:36 -07:00
|
|
|
|
|
|
|
|
[DataRecord]
|
|
|
|
|
public record struct GridSpawnGroup
|
|
|
|
|
{
|
|
|
|
|
public List<ResPath> Paths = new();
|
|
|
|
|
public int MinCount = 1;
|
|
|
|
|
public int MaxCount = 1;
|
|
|
|
|
|
2024-01-19 13:02:28 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Components to be added to any spawned grids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ComponentRegistry AddComponents = new();
|
|
|
|
|
|
2024-01-10 22:15:48 +11:00
|
|
|
/// <summary>
|
2024-01-11 23:56:07 +11:00
|
|
|
/// Hide the IFF label of the grid.
|
2024-01-10 22:15:48 +11:00
|
|
|
/// </summary>
|
|
|
|
|
public bool Hide = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Should we set the metadata name of a grid. Useful for admin purposes.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool NameGrid = false;
|
|
|
|
|
|
2024-01-10 23:44:09 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Should we add this to the station's grids (if possible / relevant).
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool StationGrid = true;
|
|
|
|
|
|
2024-01-09 15:29:36 -07:00
|
|
|
public GridSpawnGroup()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|