make nobody supervisor a locale key and cleanup JobPrototype (#39102)

* make nobody supervisor locale key and cleanup JobPrototype

* Update Content.Shared/Roles/JobPrototype.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
lzk
2025-10-11 02:36:58 +02:00
committed by GitHub
parent 1e911d1750
commit 228ed0288c
2 changed files with 19 additions and 18 deletions

View File

@@ -17,19 +17,19 @@ namespace Content.Shared.Roles
[IdDataField]
public string ID { get; private set; } = default!;
[DataField("playTimeTracker", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<PlayTimeTrackerPrototype>))]
[DataField(required: true, customTypeSerializer: typeof(PrototypeIdSerializer<PlayTimeTrackerPrototype>))]
public string PlayTimeTracker { get; private set; } = string.Empty;
/// <summary>
/// Who is the supervisor for this job.
/// </summary>
[DataField("supervisors")]
public string Supervisors { get; private set; } = "nobody";
[DataField]
public LocId Supervisors = "job-supervisors-nobody";
/// <summary>
/// The name of this job as displayed to players.
/// </summary>
[DataField("name")]
[DataField]
public string Name { get; private set; } = string.Empty;
[ViewVariables(VVAccess.ReadOnly)]
@@ -38,7 +38,7 @@ namespace Content.Shared.Roles
/// <summary>
/// The name of this job as displayed to players.
/// </summary>
[DataField("description")]
[DataField]
public string? Description { get; private set; }
[ViewVariables(VVAccess.ReadOnly)]
@@ -53,19 +53,19 @@ namespace Content.Shared.Roles
/// <summary>
/// When true - the station will have anouncement about arrival of this player.
/// </summary>
[DataField("joinNotifyCrew")]
[DataField]
public bool JoinNotifyCrew { get; private set; } = false;
/// <summary>
/// When true - the player will recieve a message about importancy of their job.
/// </summary>
[DataField("requireAdminNotify")]
[DataField]
public bool RequireAdminNotify { get; private set; } = false;
/// <summary>
/// Should this job appear in preferences menu?
/// </summary>
[DataField("setPreference")]
[DataField]
public bool SetPreference { get; private set; } = true;
/// <summary>
@@ -81,14 +81,14 @@ namespace Content.Shared.Roles
[DataField]
public bool? OverrideConsoleVisibility { get; private set; } = null;
[DataField("canBeAntag")]
[DataField]
public bool CanBeAntag { get; private set; } = true;
/// <summary>
/// The "weight" or importance of this job. If this number is large, the job system will assign this job
/// before assigning other jobs.
/// </summary>
[DataField("weight")]
[DataField]
public int Weight { get; private set; }
/// <summary>
@@ -105,7 +105,7 @@ namespace Content.Shared.Roles
/// A numerical score for how much easier this job is for antagonists.
/// For traitors, reduces starting TC by this amount. Other gamemodes can use it for whatever they find fitting.
/// </summary>
[DataField("antagAdvantage")]
[DataField]
public int AntagAdvantage = 0;
[DataField]
@@ -116,7 +116,7 @@ namespace Content.Shared.Roles
/// Starting gear will be ignored.
/// If you want to just add special attributes to a humanoid, use AddComponentSpecial instead.
/// </summary>
[DataField("jobEntity", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? JobEntity = null;
/// <summary>
@@ -129,19 +129,19 @@ namespace Content.Shared.Roles
[DataField]
public ProtoId<JobIconPrototype> Icon { get; private set; } = "JobIconUnknown";
[DataField("special", serverOnly: true)]
[DataField(serverOnly: true)]
public JobSpecial[] Special { get; private set; } = Array.Empty<JobSpecial>();
[DataField("access")]
[DataField]
public IReadOnlyCollection<ProtoId<AccessLevelPrototype>> Access { get; private set; } = Array.Empty<ProtoId<AccessLevelPrototype>>();
[DataField("accessGroups")]
[DataField]
public IReadOnlyCollection<ProtoId<AccessGroupPrototype>> AccessGroups { get; private set; } = Array.Empty<ProtoId<AccessGroupPrototype>>();
[DataField("extendedAccess")]
[DataField]
public IReadOnlyCollection<ProtoId<AccessLevelPrototype>> ExtendedAccess { get; private set; } = Array.Empty<ProtoId<AccessLevelPrototype>>();
[DataField("extendedAccessGroups")]
[DataField]
public IReadOnlyCollection<ProtoId<AccessGroupPrototype>> ExtendedAccessGroups { get; private set; } = Array.Empty<ProtoId<AccessGroupPrototype>>();
[DataField]