using System.Collections.Generic; using Content.Server.Maps.NameGenerators; using Content.Shared.Roles; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.Utility; namespace Content.Server.Maps; /// /// Prototype data for a game map. /// [Prototype("gameMap")] public sealed class GameMapPrototype : IPrototype { /// [DataField("id", required: true)] public string ID { get; } = default!; /// /// Minimum players for the given map. /// [DataField("minPlayers", required: true)] public uint MinPlayers { get; } /// /// Maximum players for the given map. /// [DataField("maxPlayers")] public uint MaxPlayers { get; } = uint.MaxValue; /// /// Name of the map to use in generic messages, like the map vote. /// [DataField("mapName", required: true)] public string MapName { get; } = default!; /// /// Name of the given map. /// [DataField("mapNameTemplate")] public string? MapNameTemplate { get; } = default!; /// /// Name generator to use for the map, if any. /// [DataField("nameGenerator")] public GameMapNameGenerator? NameGenerator { get; } = default!; /// /// Relative directory path to the given map, i.e. `Maps/saltern.yml` /// [DataField("mapPath", required: true)] public ResourcePath MapPath { get; } = default!; /// /// Controls if the map can be used as a fallback if no maps are eligible. /// [DataField("fallback")] public bool Fallback { get; } /// /// Controls if the map can be voted for. /// [DataField("votable")] public bool Votable { get; } = true; [DataField("conditions")] public List Conditions { get; } = new(); /// /// Jobs used at round start should the station run out of job slots. /// Doesn't necessarily mean the station has infinite slots for the given jobs midround! /// [DataField("overflowJobs", required: true, customTypeSerializer:typeof(PrototypeIdListSerializer))] public List OverflowJobs { get; } = default!; /// /// Index of all jobs available on the station, of form /// jobname: [roundstart, midround] /// [DataField("availableJobs", required: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer, JobPrototype>))] public Dictionary> AvailableJobs { get; } = default!; }