mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-05 23:13:06 +00:00
Merge pull request #4657 from VOREStation/aro-jobsort
Sort jobs into correct departments, cargo color
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user