Merge pull request #4657 from VOREStation/aro-jobsort

Sort jobs into correct departments, cargo color
This commit is contained in:
Neerti
2018-01-30 09:48:23 -05:00
committed by GitHub
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)