]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
replace all instances of "department-{id}" with department.name (#34607)
authorIgnaz "Ian" Kraft <ignaz.k@live.de>
Fri, 24 Jan 2025 03:46:32 +0000 (04:46 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Jan 2025 03:46:32 +0000 (19:46 -0800)
replace all instances of "department-{id}" with department.name"

Content.Client/CrewManifest/UI/CrewManifestSection.cs
Content.Client/LateJoin/LateJoinGui.cs
Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Content.Server/Medical/SuitSensors/SuitSensorSystem.cs
Content.Shared/Contraband/ContrabandSystem.cs

index 29cf850e2b9279b1c80d9a682dcb5b0efa61cf95..1e853bf153a3b2b2d807a8d231aa7bfad3f718f2 100644 (file)
@@ -22,7 +22,7 @@ public sealed class CrewManifestSection : BoxContainer
         AddChild(new Label()
         {
             StyleClasses = { "LabelBig" },
-            Text = Loc.GetString($"department-{section.ID}")
+            Text = Loc.GetString(section.Name)
         });
 
         var gridContainer = new GridContainer()
index 13cf281513d2abca4b0753ea872e309ca729fe70..7d1921816ffa2c2c82924de4ee2057662e863a0a 100644 (file)
@@ -170,7 +170,7 @@ namespace Content.Client.LateJoin
 
                 foreach (var department in departments)
                 {
-                    var departmentName = Loc.GetString($"department-{department.ID}");
+                    var departmentName = Loc.GetString(department.Name);
                     _jobCategories[id] = new Dictionary<string, BoxContainer>();
                     var stationAvailable = _gameTicker.JobsAvailable[id];
                     var jobsAvailable = new List<JobPrototype>();
index e81f72ba670be9ca9f7ec3346f9343014904e5a3..0f618cb71ca1d46acba98dcfcf99cad8582643ed 100644 (file)
@@ -839,7 +839,7 @@ namespace Content.Client.Lobby.UI
 
             foreach (var department in departments)
             {
-                var departmentName = Loc.GetString($"department-{department.ID}");
+                var departmentName = Loc.GetString(department.Name);
 
                 if (!_jobCategories.TryGetValue(department.ID, out var category))
                 {
index 51974d7036cfc795be0a05c50534f628fa16ecac..b697a42d5132974a4732f18e4383db77d07bf42d 100644 (file)
@@ -22,6 +22,7 @@ using Content.Shared.Mobs.Systems;
 using Content.Shared.Verbs;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
+using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
 
@@ -42,6 +43,7 @@ public sealed class SuitSensorSystem : EntitySystem
     [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
     [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
     [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
+    [Dependency] private readonly IPrototypeManager _proto = default!;
 
     public override void Initialize()
     {
@@ -369,7 +371,7 @@ public sealed class SuitSensorSystem : EntitySystem
             userJobIcon = card.Comp.JobIcon;
 
             foreach (var department in card.Comp.JobDepartments)
-                userJobDepartments.Add(Loc.GetString($"department-{department}"));
+                userJobDepartments.Add(Loc.GetString(_proto.Index(department).Name));
         }
 
         // get health mob state
index 48055fc3de64d9dc72d4ea4f2182d580bd332be1..ff18a08cef1b9873e835ed941df6a7a8e59c2142 100644 (file)
@@ -55,8 +55,7 @@ public sealed class ContrabandSystem : EntitySystem
 
         using (args.PushGroup(nameof(ContrabandComponent)))
         {
-            // TODO shouldn't department prototypes have a localized name instead of just using the ID for this?
-            var localizedDepartments = ent.Comp.AllowedDepartments.Select(p => Loc.GetString("contraband-department-plural", ("department", Loc.GetString($"department-{p.Id}"))));
+            var localizedDepartments = ent.Comp.AllowedDepartments.Select(p => Loc.GetString("contraband-department-plural", ("department", Loc.GetString(_proto.Index(p).Name))));
             var localizedJobs = ent.Comp.AllowedJobs.Select(p => Loc.GetString("contraband-job-plural", ("job", _proto.Index(p).LocalizedName)));
 
             var severity = _proto.Index(ent.Comp.Severity);