#nullable enable
using System;
using System.Collections.Generic;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Shared.Roles
{
///
/// Describes information for a single job on the station.
///
[Prototype("job")]
public class JobPrototype : IPrototype
{
private string _name = string.Empty;
[ViewVariables]
[field: DataField("id", required: true)]
public string ID { get; } = default!;
///
/// The name of this job as displayed to players.
///
[field: DataField("name")]
public string Name { get; } = string.Empty;
///
/// Whether this job is a head.
/// The job system will try to pick heads before other jobs on the same priority level.
///
[DataField("head")]
public bool IsHead { get; private set; }
///
/// The total amount of people that can start with this job round-start.
///
public int SpawnPositions => _spawnPositions ?? TotalPositions;
[DataField("spawnPositions")]
private int? _spawnPositions;
///
/// The total amount of positions available.
///
[DataField("positions")]
public int TotalPositions { get; private set; }
[DataField("startingGear")]
public string? StartingGear { get; private set; }
[field: DataField("icon")] public string Icon { get; } = string.Empty;
[DataField("special")]
public JobSpecial? Special { get; private set; }
[field: DataField("departments")]
public IReadOnlyCollection Departments { get; } = Array.Empty();
[field: DataField("access")]
public IReadOnlyCollection Access { get; } = Array.Empty();
}
}