POLARIS: Sort jobs into correct departments

Also give cargo some color
This commit is contained in:
Arokha Sieyes
2018-01-26 16:11:05 -05:00
parent 4b6e64111e
commit 7366a1307c
5 changed files with 16 additions and 6 deletions

View File

@@ -28,3 +28,11 @@
. = B.failures - A.failures
if (!.)
. = B.qdels - A.qdels
// Sorts jobs by department, and then by flag within department
/proc/cmp_job_datums(var/datum/job/a, var/datum/job/b)
. = sorttext(b.department, a.department)
if (. == 0) //Same department, push up if they're a head
. = b.head_position - a.head_position
if (. == 0) //Already in head/nothead spot, sort by name
. = sorttext(b.title, a.title)