Files
OldThink/Content.Server/Maps/GameMapPrototype.cs
Moony eb6d24abd0 Makes map vote and roundstart smart about player count. (#5418)
* Makes map vote and roundstart smart about player count.
No more Saltern with 30 players, or Knight Ship with 50.

* a typo

* Address reviews.

* Localized.
2021-11-20 11:32:07 -07:00

54 lines
1.6 KiB
C#

using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Maps
{
/// <summary>
/// Prototype data for a game map.
/// </summary>
[Prototype("gameMap")]
public class GameMapPrototype : IPrototype
{
/// <inheritdoc/>
[ViewVariables, DataField("id", required: true)]
public string ID { get; } = default!;
/// <summary>
/// Minimum players for the given map.
/// </summary>
[ViewVariables, DataField("minPlayers", required: true)]
public uint MinPlayers { get; }
/// <summary>
/// Maximum players for the given map.
/// </summary>
[ViewVariables, DataField("maxPlayers")]
public uint MaxPlayers { get; } = uint.MaxValue;
/// <summary>
/// Name of the given map.
/// </summary>
[ViewVariables, DataField("mapName", required: true)]
public string MapName { get; } = default!;
/// <summary>
/// Relative directory path to the given map, i.e. `Maps/saltern.yml`
/// </summary>
[ViewVariables, DataField("mapPath", required: true)]
public string MapPath { get; } = default!;
/// <summary>
/// Controls if the map can be used as a fallback if no maps are eligible.
/// </summary>
[ViewVariables, DataField("fallback")]
public bool Fallback { get; }
/// <summary>
/// Controls if the map can be voted for.
/// </summary>
[ViewVariables, DataField("votable")]
public bool Votable { get; } = true;
}
}