Merge pull request #9865 from Useroth/bagsort

Glitchfix. Prevents storage bags from changing the order of their numbered contents when items are removed.
This commit is contained in:
kevinz000
2019-11-20 22:09:22 -07:00
committed by GitHub
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -84,3 +84,9 @@ GLOBAL_VAR_INIT(cmp_field, "name")
/proc/cmp_job_display_asc(datum/job/A, datum/job/B)
return A.display_order - B.display_order
/proc/cmp_numbered_displays_name_asc(datum/numbered_display/A, datum/numbered_display/B)
return sorttext(A.sample_object.name, B.sample_object.name)
/proc/cmp_numbered_displays_name_dsc(datum/numbered_display/A, datum/numbered_display/B)
return sorttext(B.sample_object.name, A.sample_object.name)
@@ -309,6 +309,7 @@
else
var/datum/numbered_display/ND = .[I.type]
ND.number++
. = sortTim(., /proc/cmp_numbered_displays_name_asc, associative = TRUE)
//This proc determines the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/datum/component/storage/proc/orient2hud(mob/user, maxcolumns)