mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Sort crew manifest by name and job title (#13212)
resolves https://github.com/space-wizards/space-station-14/issues/12106
This commit is contained in:
parent
c42af5ad9e
commit
747567f35d
1 changed files with 8 additions and 6 deletions
|
|
@ -88,13 +88,13 @@ public sealed class CrewManifestSystem : EntitySystem
|
|||
|
||||
private void OnBoundUiClose(EntityUid uid, CrewManifestViewerComponent component, BoundUIClosedEvent ev)
|
||||
{
|
||||
var owningStation = _stationSystem.GetOwningStation(uid);
|
||||
if (owningStation == null || ev.Session is not IPlayerSession sessionCast)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var owningStation = _stationSystem.GetOwningStation(uid);
|
||||
if (owningStation == null || ev.Session is not IPlayerSession sessionCast)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CloseEui(owningStation.Value, sessionCast, uid);
|
||||
CloseEui(owningStation.Value, sessionCast, uid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -215,6 +215,8 @@ public sealed class CrewManifestSystem : EntitySystem
|
|||
entries.Entries.Add(entry);
|
||||
}
|
||||
|
||||
entries.Entries = entries.Entries.OrderBy(e => e.JobTitle).ThenBy(e => e.Name).ToList();
|
||||
|
||||
if (_cachedEntries.ContainsKey(station))
|
||||
{
|
||||
_cachedEntries[station] = entries;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue