mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
The One Where I Port Modals
This commit is contained in:
@@ -79,9 +79,19 @@
|
||||
/proc/cmp_text_asc(a,b)
|
||||
return sorttext(b,a)
|
||||
|
||||
///Tracks are sorted by genre then by title inside that.
|
||||
/proc/cmp_media_track_asc(datum/track/A, datum/track/B)
|
||||
var/genre_sort = sorttext(B.genre || "Uncategorized", A.genre || "Uncategorized")
|
||||
return genre_sort || sorttext(B.title, A.title)
|
||||
|
||||
///Filters have a numerical priority.
|
||||
/proc/cmp_filter_data_priority(list/A, list/B)
|
||||
return A["priority"] - B["priority"]
|
||||
|
||||
///Traits have sort they have defined on them to categorize themselves into groups. After that, alphabetical.
|
||||
/proc/cmp_trait_datums_name(datum/trait/A, datum/trait/B)
|
||||
return A.sort == B.sort ? sorttext("[B.name]","[A.name]") : A.sort - B.sort
|
||||
|
||||
///Species have sort_hint they self-generate to hint themselves into groups. After that, alphabetical.
|
||||
/proc/cmp_species(datum/species/A, datum/species/B)
|
||||
return A.sort_hint == B.sort_hint ? sorttext("[B.name]","[A.name]") : A.sort_hint - B.sort_hint
|
||||
|
||||
Reference in New Issue
Block a user