2019-11-17 11:18:39 -05:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2021-12-01 00:40:46 +11:00
|
|
|
using Content.Shared.Access;
|
2019-11-17 11:18:39 -05:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-12-30 00:48:18 +11:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2021-12-01 00:40:46 +11:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
2021-03-05 01:08:38 +01:00
|
|
|
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")]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed 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!;
|
|
|
|
|
|
2021-10-06 13:51:11 +02:00
|
|
|
[DataField("supervisors")]
|
|
|
|
|
public string Supervisors { get; } = "nobody";
|
|
|
|
|
|
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
|
|
|
|
2021-10-06 13:51:11 +02:00
|
|
|
[DataField("joinNotifyCrew")]
|
|
|
|
|
public bool JoinNotifyCrew { get; } = false;
|
|
|
|
|
|
|
|
|
|
[DataField("requireAdminNotify")]
|
|
|
|
|
public bool RequireAdminNotify { get; } = false;
|
|
|
|
|
|
2021-12-19 07:36:16 -08:00
|
|
|
[DataField("setPreference")]
|
|
|
|
|
public bool SetPreference { get; } = true;
|
|
|
|
|
|
2021-11-21 20:33:50 -06:00
|
|
|
[DataField("canBeAntag")]
|
|
|
|
|
public bool CanBeAntag { get; } = true;
|
|
|
|
|
|
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; }
|
|
|
|
|
|
2021-12-30 00:48:18 +11:00
|
|
|
[DataField("startingGear", customTypeSerializer: typeof(PrototypeIdSerializer<StartingGearPrototype>))]
|
2021-03-05 01:08:38 +01:00
|
|
|
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-12-01 00:40:46 +11:00
|
|
|
[DataField("access", customTypeSerializer: typeof(PrototypeIdListSerializer<AccessLevelPrototype>))]
|
2021-03-05 01:08:38 +01:00
|
|
|
public IReadOnlyCollection<string> Access { get; } = Array.Empty<string>();
|
2022-02-11 19:01:14 -07:00
|
|
|
|
|
|
|
|
[DataField("accessGroups", customTypeSerializer: typeof(PrototypeIdListSerializer<AccessGroupPrototype>))]
|
|
|
|
|
public IReadOnlyCollection<string> AccessGroups { get; } = Array.Empty<string>();
|
2019-11-17 11:18:39 -05:00
|
|
|
}
|
|
|
|
|
}
|