diff --git a/code/_helpers/sorts/comparators.dm b/code/_helpers/sorts/comparators.dm index c24267e678..2f1b69191c 100644 --- a/code/_helpers/sorts/comparators.dm +++ b/code/_helpers/sorts/comparators.dm @@ -95,3 +95,6 @@ ///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 + +/proc/cmp_stored_item_name(datum/stored_item/A, datum/stored_item/B) + return sorttext(B.item_name, A.item_name) \ No newline at end of file diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index 5e0f2e4284..f98da20f8c 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -112,6 +112,7 @@ user.remove_from_mob(O) stock(O) user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") + sortTim(item_records, /proc/cmp_stored_item_name) else if(istype(O, /obj/item/weapon/storage/bag)) var/obj/item/weapon/storage/bag/P = O