]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Make department / job list sorting consistent. (#25486)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 23 Feb 2024 04:04:44 +0000 (05:04 +0100)
committerGitHub <noreply@github.com>
Fri, 23 Feb 2024 04:04:44 +0000 (15:04 +1100)
commit715794dd414c5d4b794cd6f2201983ecbc5d4f17
tree21c1f4d22b7b5ee3cb3e5467d20af55eae30bc0f
parentb1de6dd6017f4f56045df409db59fb7d303bde5d
Make department / job list sorting consistent. (#25486)

* Make department / job list sorting consistent.

This makes late join, crew manifest and character profile all apply consistent sorting for jobs and departments.

We use the already-defined weights for departments (so command, then sec, then station specific, then just sort by prototype ID). Jobs also use weight (so heads are always at the top) then prototype ID, then character name (for manifest).

Removed the crewmanifest.ordering CVar as doing it via prototype weight is just easier, and that CVar was already a mess anyways.

* Fix jittery job icons in lists.

They were set to KeepCentered in TextureRect. This has issues because the allocated space is actually an odd number of pixels, so it tries to position the draw at a half pixel offset.

Now, yes, fixing this in TextureRect would make much more sense, but get off my back. (Ok seriously we need better helper functions for doing that in the engine. Don't wanna deal with that right now and I already have this patch made.)

Instead I'm just gonna fix the issue by using VerticalAlignment in all these places instead which ends up doing exactly the same thing YIPPEE.

Also gave a margin next to the icon on the crew manifest. Margins people!
Content.Client/CrewManifest/UI/CrewManifestListing.cs
Content.Client/CrewManifest/UI/CrewManifestSection.cs
Content.Client/LateJoin/LateJoinGui.cs
Content.Client/Medical/CrewMonitoring/CrewMonitoringWindow.xaml.cs
Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
Content.Server/CrewManifest/CrewManifestSystem.cs
Content.Server/StationRecords/Systems/StationRecordsSystem.cs
Content.Shared/CCVar/CCVars.cs
Content.Shared/CrewManifest/SharedCrewManifestSystem.cs
Content.Shared/Roles/DepartmentPrototype.cs
Content.Shared/Roles/JobPrototype.cs