Files
OldThink/Content.Server/Maps/GameMapPrototype.cs
Moony ec68226e99 Refactor how jobs are handed out (#5422)
* Completely refactor how job spawning works

* Remove remains of old system.

* Squash the final bug, cleanup.

* Attempt to fix tests

* Adjusts packed's round-start crew roster, re-enables a bunch of old roles.
Also adds the Central Command Official as a proper role.

* pretty up ui

* refactor StationSystem into the correct folder & namespace.

* remove a log, make sure the lobby gets updated if a new map is spontaneously added.

* re-add accidentally removed log

* We do a little logging

* we do a little resolving

* we do a little documenting

* Renamed OverflowJob to FallbackOverflowJob
Allows stations to configure their own roundstart overflow job list.

* narrator: it did not compile

* oops

* support having no overflow jobs

* filescope for consistency

* small fixes

* Bumps a few role counts for Packed, namely engis

* log moment

* E

* Update Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* Update Content.Server/Maps/GameMapPrototype.cs

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* factored job logic, cleanup.

* e

* Address reviews

* Remove the concept of a "default" grid.
It has no future in our new multi-station world

* why was clickable using that in the first place

* fix bad evil bug that almost slipped through
also adds chemist

* rms obsolete things from chemist

* Adds a sanity fallback

* address reviews

* adds ability to set name

* fuck

* cleanup joingame
2021-11-26 20:02:46 +11:00

71 lines
2.3 KiB
C#

using System.Collections.Generic;
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.ViewVariables;
namespace Content.Server.Maps;
/// <summary>
/// Prototype data for a game map.
/// </summary>
[Prototype("gameMap")]
public class GameMapPrototype : IPrototype
{
/// <inheritdoc/>
[DataField("id", required: true)]
public string ID { get; } = default!;
/// <summary>
/// Minimum players for the given map.
/// </summary>
[DataField("minPlayers", required: true)]
public uint MinPlayers { get; }
/// <summary>
/// Maximum players for the given map.
/// </summary>
[DataField("maxPlayers")]
public uint MaxPlayers { get; } = uint.MaxValue;
/// <summary>
/// Name of the given map.
/// </summary>
[DataField("mapName", required: true)]
public string MapName { get; } = default!;
/// <summary>
/// Relative directory path to the given map, i.e. `Maps/saltern.yml`
/// </summary>
[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>
[DataField("fallback")]
public bool Fallback { get; }
/// <summary>
/// Controls if the map can be voted for.
/// </summary>
[DataField("votable")]
public bool Votable { get; } = true;
/// <summary>
/// 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!
/// </summary>
[DataField("overflowJobs", required: true, customTypeSerializer:typeof(PrototypeIdListSerializer<JobPrototype>))]
public List<string> OverflowJobs { get; } = default!;
/// <summary>
/// Index of all jobs available on the station, of form
/// jobname: [roundstart, midround]
/// </summary>
[DataField("availableJobs", required: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer<List<int>, JobPrototype>))]
public Dictionary<string, List<int>> AvailableJobs { get; } = default!;
}