2019-11-17 11:18:39 -05:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
2019-11-17 11:18:39 -05:00
|
|
|
|
2020-08-13 14:40:27 +02:00
|
|
|
namespace Content.Shared.Roles
|
2019-11-17 11:18:39 -05:00
|
|
|
{
|
2020-01-19 18:31:14 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Describes information for a single job on the station.
|
|
|
|
|
/// </summary>
|
2019-11-17 11:18:39 -05:00
|
|
|
[Prototype("job")]
|
2021-02-20 00:05:24 +01:00
|
|
|
public class JobPrototype : IPrototype
|
2019-11-17 11:18:39 -05:00
|
|
|
{
|
2021-03-05 01:08:38 +01:00
|
|
|
private string _name = string.Empty;
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("id", required: true)]
|
2021-03-05 01:08:38 +01:00
|
|
|
public string ID { get; } = default!;
|
|
|
|
|
|
2020-01-19 18:31:14 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this job as displayed to players.
|
|
|
|
|
/// </summary>
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("name")]
|
2021-03-05 01:08:38 +01:00
|
|
|
public string Name { get; } = string.Empty;
|
2019-11-17 11:18:39 -05:00
|
|
|
|
2020-01-19 18:31:14 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this job is a head.
|
|
|
|
|
/// The job system will try to pick heads before other jobs on the same priority level.
|
|
|
|
|
/// </summary>
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("head")]
|
2020-01-19 18:31:14 +01:00
|
|
|
public bool IsHead { get; private set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The total amount of people that can start with this job round-start.
|
|
|
|
|
/// </summary>
|
2021-03-05 01:08:38 +01:00
|
|
|
public int SpawnPositions => _spawnPositions ?? TotalPositions;
|
|
|
|
|
|
|
|
|
|
[DataField("spawnPositions")]
|
|
|
|
|
private int? _spawnPositions;
|
2020-01-19 18:31:14 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The total amount of positions available.
|
|
|
|
|
/// </summary>
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("positions")]
|
2020-01-19 18:31:14 +01:00
|
|
|
public int TotalPositions { get; private set; }
|
|
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("startingGear")]
|
|
|
|
|
public string? StartingGear { get; private set; }
|
2020-01-24 16:31:18 +01:00
|
|
|
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("icon")] public string Icon { get; } = string.Empty;
|
2020-07-26 14:08:09 +02:00
|
|
|
|
2021-09-16 15:17:19 +02:00
|
|
|
[DataField("special", serverOnly:true)]
|
|
|
|
|
public JobSpecial[] Special { get; private set; } = Array.Empty<JobSpecial>();
|
2019-11-17 11:18:39 -05:00
|
|
|
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("departments")]
|
2021-03-05 01:08:38 +01:00
|
|
|
public IReadOnlyCollection<string> Departments { get; } = Array.Empty<string>();
|
2020-01-24 16:31:18 +01:00
|
|
|
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("access")]
|
2021-03-05 01:08:38 +01:00
|
|
|
public IReadOnlyCollection<string> Access { get; } = Array.Empty<string>();
|
2019-11-17 11:18:39 -05:00
|
|
|
}
|
|
|
|
|
}
|