]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
make nobody supervisor a locale key and cleanup JobPrototype (#39102)
authorlzk <124214523+lzk228@users.noreply.github.com>
Sat, 11 Oct 2025 00:36:58 +0000 (02:36 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Oct 2025 00:36:58 +0000 (00:36 +0000)
* make nobody supervisor locale key and cleanup JobPrototype

* Update Content.Shared/Roles/JobPrototype.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Shared/Roles/JobPrototype.cs
Resources/Locale/en-US/job/job-supervisors.ftl

index 54e5c1d525c8d96983f518f0ad626e64b4833e3a..6b58c42428748c2995d956a7654a719fe0b2a124 100644 (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]
index b7615903ee1ed12ffaaa5b5c3d0cb53fdfba70ea..5e2cf153fcc04b1352659f386f1a83e48cc8e9a9 100644 (file)
@@ -12,4 +12,5 @@ job-supervisors-medicine = Medical Doctors, Paramedics, Chemists, and the Chief
 job-supervisors-security = Security Officers, the Warden, and the Head of Security
 job-supervisors-science = Scientists and the Research Director
 job-supervisors-hire = whoever hires you
-job-supervisors-everyone = absolutely everyone
\ No newline at end of file
+job-supervisors-everyone = absolutely everyone
+job-supervisors-nobody = nobody