2022-05-10 13:43:30 -05:00
|
|
|
using Content.Server.Station;
|
|
|
|
|
using JetBrains.Annotations;
|
2021-11-20 12:32:07 -06:00
|
|
|
using Robust.Shared.Prototypes;
|
2022-02-02 00:05:55 +11:00
|
|
|
using Robust.Shared.Utility;
|
2021-11-20 12:32:07 -06:00
|
|
|
|
2021-11-26 03:02:46 -06:00
|
|
|
namespace Content.Server.Maps;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Prototype data for a game map.
|
|
|
|
|
/// </summary>
|
2022-05-10 13:43:30 -05:00
|
|
|
/// <remarks>
|
|
|
|
|
/// Forks should not directly edit existing parts of this class.
|
|
|
|
|
/// Make a new partial for your fancy new feature, it'll save you time later.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
[Prototype("gameMap"), PublicAPI]
|
|
|
|
|
public sealed partial class GameMapPrototype : IPrototype
|
2021-11-20 12:32:07 -06:00
|
|
|
{
|
2021-11-26 03:02:46 -06:00
|
|
|
/// <inheritdoc/>
|
2022-05-10 13:43:30 -05:00
|
|
|
[IdDataField]
|
2021-11-26 03:02:46 -06:00
|
|
|
public string ID { get; } = default!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-11-26 07:54:32 -06:00
|
|
|
/// Name of the map to use in generic messages, like the map vote.
|
2021-11-26 03:02:46 -06:00
|
|
|
/// </summary>
|
|
|
|
|
[DataField("mapName", required: true)]
|
|
|
|
|
public string MapName { get; } = default!;
|
|
|
|
|
|
2021-11-26 07:54:32 -06:00
|
|
|
/// <summary>
|
2022-05-10 13:43:30 -05:00
|
|
|
/// Relative directory path to the given map, i.e. `/Maps/saltern.yml`
|
2021-11-26 03:02:46 -06:00
|
|
|
/// </summary>
|
|
|
|
|
[DataField("mapPath", required: true)]
|
2022-02-02 00:05:55 +11:00
|
|
|
public ResourcePath MapPath { get; } = default!;
|
2021-11-26 03:02:46 -06:00
|
|
|
|
2022-05-10 15:21:55 -05:00
|
|
|
[DataField("stations", required: true)]
|
2022-05-10 13:43:30 -05:00
|
|
|
private Dictionary<string, StationConfig> _stations = new();
|
2021-11-26 03:02:46 -06:00
|
|
|
|
2021-11-20 12:32:07 -06:00
|
|
|
/// <summary>
|
2022-05-10 13:43:30 -05:00
|
|
|
/// The stations this map contains. The names should match with the BecomesStation components.
|
2021-11-26 03:02:46 -06:00
|
|
|
/// </summary>
|
2022-05-10 13:43:30 -05:00
|
|
|
public IReadOnlyDictionary<string, StationConfig> Stations => _stations;
|
2021-11-20 12:32:07 -06:00
|
|
|
}
|