From f7629adb3ed617da31132fa5dd0dcc3c0569f938 Mon Sep 17 00:00:00 2001 From: Theomund <34360334+Theomund@users.noreply.github.com> Date: Sun, 8 Jan 2023 22:34:43 -0500 Subject: [PATCH] Fix crew manifest sorting (#13286) --- Content.Client/CrewManifest/CrewManifestUi.xaml.cs | 12 ++---------- .../StationRecords/Systems/StationRecordsSystem.cs | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs index 256c9440ae..3a043b595f 100644 --- a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs +++ b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs @@ -106,21 +106,13 @@ public sealed partial class CrewManifestUi : DefaultWindow if (Loc.TryGetString($"department-{sectionTitle}", out var localizedDepart)) sectionTitle = localizedDepart; - + AddChild(new Label() { StyleClasses = { "LabelBig" }, Text = Loc.GetString(sectionTitle) }); - entries.Sort((a, b) => - { - var posA = crewManifestSystem.GetDepartmentOrder(sectionTitle, a.JobPrototype); - var posB = crewManifestSystem.GetDepartmentOrder(sectionTitle, b.JobPrototype); - - return posA.CompareTo(posB); - }); - var gridContainer = new GridContainer() { HorizontalExpand = true, @@ -147,7 +139,7 @@ public sealed partial class CrewManifestUi : DefaultWindow }; var title = new RichTextLabel(); - title.SetMessage(Loc.GetString(entry.JobTitle)); + title.SetMessage(entry.JobTitle); if (rsi != null) diff --git a/Content.Server/StationRecords/Systems/StationRecordsSystem.cs b/Content.Server/StationRecords/Systems/StationRecordsSystem.cs index 1e7d754705..e801cad73e 100644 --- a/Content.Server/StationRecords/Systems/StationRecordsSystem.cs +++ b/Content.Server/StationRecords/Systems/StationRecordsSystem.cs @@ -116,7 +116,7 @@ public sealed class StationRecordsSystem : EntitySystem { Name = name, Age = age, - JobTitle = jobPrototype.Name, + JobTitle = jobPrototype.LocalizedName, JobIcon = jobPrototype.Icon, JobPrototype = jobId, Species = species,