2024-06-04 00:04:19 +00:00
|
|
|
using Content.Server.GameTicking.Rules;
|
2024-04-24 21:31:45 -04:00
|
|
|
using Content.Server.Maps;
|
2024-05-10 14:35:59 +03:00
|
|
|
using Content.Shared.GridPreloader.Prototypes;
|
2024-04-24 21:31:45 -04:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.GameTicking.Rules.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is used for a game rule that loads a map when activated.
|
2024-06-04 00:04:19 +00:00
|
|
|
/// Works with <see cref="RuleGridsComponent"/>.
|
2024-04-24 21:31:45 -04:00
|
|
|
/// </summary>
|
2024-06-04 00:04:19 +00:00
|
|
|
[RegisterComponent, Access(typeof(LoadMapRuleSystem))]
|
2024-04-24 21:31:45 -04:00
|
|
|
public sealed partial class LoadMapRuleComponent : Component
|
|
|
|
|
{
|
2024-06-04 00:04:19 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// A <see cref="GameMapPrototype"/> to load on a new map.
|
|
|
|
|
/// </summary>
|
2024-04-24 21:31:45 -04:00
|
|
|
[DataField]
|
2024-05-10 14:35:59 +03:00
|
|
|
public ProtoId<GameMapPrototype>? GameMap;
|
2024-04-24 21:31:45 -04:00
|
|
|
|
2024-06-04 00:04:19 +00:00
|
|
|
/// <summary>
|
2024-12-22 15:13:10 +13:00
|
|
|
/// A map to load.
|
2024-06-04 00:04:19 +00:00
|
|
|
/// </summary>
|
2024-04-24 21:31:45 -04:00
|
|
|
[DataField]
|
|
|
|
|
public ResPath? MapPath;
|
|
|
|
|
|
2024-12-22 15:13:10 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// A grid to load on a new map.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public ResPath? GridPath;
|
|
|
|
|
|
2024-06-04 00:04:19 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// A <see cref="PreloadedGridPrototype"/> to move to a new map.
|
|
|
|
|
/// If there are no instances left nothing is done.
|
|
|
|
|
/// </summary>
|
2024-05-10 14:35:59 +03:00
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<PreloadedGridPrototype>? PreloadedGrid;
|
2024-04-24 21:31:45 -04:00
|
|
|
}
|