VGRoid support (#27659)
* Dungeon spawn support for grid spawns * Recursive dungeons working * Mask approach working * zack * More work * Fix recursive dungeons * Heap of work * weh * the cud * rar * Job * weh * weh * weh * Master merges * orch * weh * vgroid most of the work * Tweaks * Tweaks * weh * do do do do do do * Basic layout * Ore spawning working * Big breaking changes * Mob gen working * weh * Finalising * emo * More finalising * reverty * Reduce distance
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Content.Server.Shuttles.Systems;
|
||||
using Content.Shared.Dataset;
|
||||
using Content.Shared.Procedural;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -14,39 +16,92 @@ public sealed partial class GridSpawnComponent : Component
|
||||
/// 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();
|
||||
[DataField(required: true)] public Dictionary<string, IGridSpawnGroup> Groups = new();
|
||||
}
|
||||
|
||||
[DataRecord]
|
||||
public record struct GridSpawnGroup
|
||||
public interface IGridSpawnGroup
|
||||
{
|
||||
public List<ResPath> Paths = new();
|
||||
public int MinCount = 1;
|
||||
public int MaxCount = 1;
|
||||
/// <summary>
|
||||
/// Minimum distance to spawn away from the station.
|
||||
/// </summary>
|
||||
public float MinimumDistance { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ProtoId<DatasetPrototype>? NameDataset { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
int MinCount { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
int MaxCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Components to be added to any spawned grids.
|
||||
/// </summary>
|
||||
public ComponentRegistry AddComponents = new();
|
||||
public ComponentRegistry AddComponents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hide the IFF label of the grid.
|
||||
/// </summary>
|
||||
public bool Hide = false;
|
||||
public bool Hide { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should we set the metadata name of a grid. Useful for admin purposes.
|
||||
/// </summary>
|
||||
public bool NameGrid = false;
|
||||
public bool NameGrid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should we add this to the station's grids (if possible / relevant).
|
||||
/// </summary>
|
||||
public bool StationGrid = true;
|
||||
public bool StationGrid { get; set; }
|
||||
}
|
||||
|
||||
public GridSpawnGroup()
|
||||
{
|
||||
}
|
||||
[DataRecord]
|
||||
public sealed class DungeonSpawnGroup : IGridSpawnGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// Prototypes we can choose from to spawn.
|
||||
/// </summary>
|
||||
public List<ProtoId<DungeonConfigPrototype>> Protos = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
public float MinimumDistance { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ProtoId<DatasetPrototype>? NameDataset { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int MinCount { get; set; } = 1;
|
||||
|
||||
/// <inheritdoc />
|
||||
public int MaxCount { get; set; } = 1;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ComponentRegistry AddComponents { get; set; } = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Hide { get; set; } = false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool NameGrid { get; set; } = false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool StationGrid { get; set; } = false;
|
||||
}
|
||||
|
||||
[DataRecord]
|
||||
public sealed class GridSpawnGroup : IGridSpawnGroup
|
||||
{
|
||||
public List<ResPath> Paths = new();
|
||||
|
||||
public float MinimumDistance { get; }
|
||||
public ProtoId<DatasetPrototype>? NameDataset { get; }
|
||||
public int MinCount { get; set; } = 1;
|
||||
public int MaxCount { get; set; } = 1;
|
||||
public ComponentRegistry AddComponents { get; set; } = new();
|
||||
public bool Hide { get; set; } = false;
|
||||
public bool NameGrid { get; set; } = true;
|
||||
public bool StationGrid { get; set; } = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user