LoadMapRule grid storage rework (#28210)

*
This commit is contained in:
deltanedas
2024-06-04 00:04:19 +00:00
committed by GitHub
parent 7d22897d02
commit 16b3fb1204
13 changed files with 190 additions and 130 deletions

View File

@@ -1,8 +1,6 @@
using Content.Server.GameTicking.Rules;
using Content.Server.Maps;
using Content.Shared.GridPreloader.Prototypes;
using Content.Shared.Storage;
using Content.Shared.Whitelist;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@@ -10,25 +8,27 @@ namespace Content.Server.GameTicking.Rules.Components;
/// <summary>
/// This is used for a game rule that loads a map when activated.
/// Works with <see cref="RuleGridsComponent"/>.
/// </summary>
[RegisterComponent]
[RegisterComponent, Access(typeof(LoadMapRuleSystem))]
public sealed partial class LoadMapRuleComponent : Component
{
[DataField]
public MapId? Map;
/// <summary>
/// A <see cref="GameMapPrototype"/> to load on a new map.
/// </summary>
[DataField]
public ProtoId<GameMapPrototype>? GameMap;
/// <summary>
/// A map path to load on a new map.
/// </summary>
[DataField]
public ResPath? MapPath;
/// <summary>
/// A <see cref="PreloadedGridPrototype"/> to move to a new map.
/// If there are no instances left nothing is done.
/// </summary>
[DataField]
public ProtoId<PreloadedGridPrototype>? PreloadedGrid;
[DataField]
public List<EntityUid> MapGrids = new();
[DataField]
public EntityWhitelist? SpawnerWhitelist;
}