diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm
index 291ed19c..5b5fb1eb 100644
--- a/code/__HELPERS/icons.dm
+++ b/code/__HELPERS/icons.dm
@@ -829,7 +829,7 @@ world
break
layers[current] = current_layer
- //sortTim(layers, /proc/cmp_image_layer_asc)
+ //sortTim(layers, GLOBAL_PROC_REF(cmp_image_layer_asc))
var/icon/add // Icon of overlay being added
diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm
index 4a5a302a..8887ae00 100644
--- a/code/__HELPERS/roundend.dm
+++ b/code/__HELPERS/roundend.dm
@@ -473,7 +473,7 @@
var/currrent_category
var/datum/antagonist/previous_category
- sortTim(all_antagonists, /proc/cmp_antag_category)
+ sortTim(all_antagonists, GLOBAL_PROC_REF(cmp_antag_category))
for(var/datum/antagonist/A in all_antagonists)
if(!A.show_in_roundend)
diff --git a/code/__HELPERS/sorts/__main.dm b/code/__HELPERS/sorts/__main.dm
index 76862281..bb196c35 100644
--- a/code/__HELPERS/sorts/__main.dm
+++ b/code/__HELPERS/sorts/__main.dm
@@ -140,8 +140,11 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
if(runHi >= hi)
return 1
+ var/list/L = src.L
var/last = fetchElement(L,lo)
var/current = fetchElement(L,runHi++)
+ SEND_TEXT(world.log, "current = [current]")
+ SEND_TEXT(world.log, "last = [last]")
if(call(cmp)(current, last) < 0)
while(runHi < hi)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 968a01a5..f761d4d5 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -572,11 +572,11 @@ Turf and target are separate in case you want to teleport some distance from a t
for(var/area/A in world)
GLOB.sortedAreas.Add(A)
- sortTim(GLOB.sortedAreas, /proc/cmp_name_asc)
+ sortTim(GLOB.sortedAreas, GLOBAL_PROC_REF(cmp_name_asc))
/area/proc/addSorted()
GLOB.sortedAreas.Add(src)
- sortTim(GLOB.sortedAreas, /proc/cmp_name_asc)
+ sortTim(GLOB.sortedAreas, GLOBAL_PROC_REF(cmp_name_asc))
//Takes: Area type as a text string from a variable.
//Returns: Instance for the area in the world.
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 76a3b1eb..38f3ca58 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -78,7 +78,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
qdel(Master)
else
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
- sortTim(subsytem_types, /proc/cmp_subsystem_init)
+ sortTim(subsytem_types, GLOBAL_PROC_REF(cmp_subsystem_init))
for(var/I in subsytem_types)
_subsystems += new I
Master = src
@@ -93,7 +93,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/datum/controller/master/Shutdown()
processing = FALSE
- sortTim(subsystems, /proc/cmp_subsystem_init)
+ sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
reverseRange(subsystems)
for(var/datum/controller/subsystem/ss in subsystems)
log_world("Shutting down [ss.name] subsystem...")
@@ -179,7 +179,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
to_chat(world, "Initializing subsystems...")
// Sort subsystems by init_order, so they initialize in the correct order.
- sortTim(subsystems, /proc/cmp_subsystem_init)
+ sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
var/start_timeofday = REALTIMEOFDAY
// Initialize subsystems.
@@ -200,7 +200,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
SetRunLevel(1)
// Sort subsystems by display setting for easy access.
- sortTim(subsystems, /proc/cmp_subsystem_display)
+ sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_display))
// Set world options.
world.fps = CONFIG_GET(number/fps)
var/initialized_tod = REALTIMEOFDAY
@@ -282,9 +282,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
queue_tail = null
//these sort by lower priorities first to reduce the number of loops needed to add subsequent SS's to the queue
//(higher subsystems will be sooner in the queue, adding them later in the loop means we don't have to loop thru them next queue add)
- sortTim(tickersubsystems, /proc/cmp_subsystem_priority)
+ sortTim(tickersubsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
for(var/I in runlevel_sorted_subsystems)
- sortTim(runlevel_sorted_subsystems, /proc/cmp_subsystem_priority)
+ sortTim(I, GLOBAL_PROC_REF(cmp_subsystem_priority))
I += tickersubsystems
var/cached_runlevel = current_runlevel
@@ -611,4 +611,4 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
if (client_count < CONFIG_GET(number/mc_tick_rate/disable_high_pop_mc_mode_amount))
processing = CONFIG_GET(number/mc_tick_rate/base_mc_tick_rate)
else if (client_count > CONFIG_GET(number/mc_tick_rate/high_pop_mc_mode_amount))
- processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
\ No newline at end of file
+ processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 4db9b933..9f8eca6a 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -98,7 +98,7 @@
advance_diseases += P
var/replace_num = advance_diseases.len + 1 - DISEASE_LIMIT //amount of diseases that need to be removed to fit this one
if(replace_num > 0)
- sortTim(advance_diseases, /proc/cmp_advdisease_resistance_asc)
+ sortTim(advance_diseases, GLOBAL_PROC_REF(cmp_advdisease_resistance_asc))
for(var/i in 1 to replace_num)
var/datum/disease/advance/competition = advance_diseases[i]
if(totalTransmittable() > competition.totalResistance())
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index c2f7e82f..46ff7a71 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -90,7 +90,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if (picked && is_station_level(picked.z))
GLOB.teleportlocs[AR.name] = AR
if(GLOB.teleportlocs.len) //DON'T TRY TO TIMSORT THINGS THAT HAVE NOTHING. FUCK.
- sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
+ sortTim(GLOB.teleportlocs, GLOBAL_PROC_REF(cmp_text_dsc))
// ===
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index a238c4a4..d99e5bb7 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -206,7 +206,7 @@
for(var/obj/item/co in replacer)
part_list += co
//Sort the parts. This ensures that higher tier items are applied first.
- part_list = sortTim(part_list, /proc/cmp_rped_sort)
+ part_list = sortTim(part_list, GLOBAL_PROC_REF(cmp_rped_sort))
for(var/path in req_components)
while(req_components[path] > 0 && (locate(path) in part_list))
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index 6f6d19e4..34107c32 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -8,7 +8,10 @@
//GS13 stuckage code
-obj/machinery/door/airlock/Crossed(mob/living/carbon/L)
+/obj/machinery/door/airlock/Crossed(mob/living/carbon/L)
+ if(!istype(L))
+ return ..()
+
if(L.fatness > 5000)
if(rand(1, 3) == 1)
L.doorstuck = 1
@@ -17,12 +20,8 @@ obj/machinery/door/airlock/Crossed(mob/living/carbon/L)
sleep(100)
L.doorstuck = 0
L.Knockdown(1)
- return
- else if(L.fatness > 1890)
- if(rand(1, 5) == 1)
- L.visible_message("[L]'s hips brush against the doorway...")
- to_chat(L, "As you pass through \the [src], you feel a slight brushing against your hips. The [src] frame accommodates your form, but it's a close fit..")
- return
+ return ..()
+
else if(L.fatness > 3000)
if(rand(1, 5) == 1)
L.doorstuck = 1
@@ -31,10 +30,18 @@ obj/machinery/door/airlock/Crossed(mob/living/carbon/L)
sleep(55)
L.doorstuck = 0
L.Knockdown(1)
- return
+ return ..()
if(rand(1, 5) == 5)
to_chat(L, "With great effort, you manage to squeeze your massive form through \the [src]. It's a tight fit, but you successfully navigate the narrow opening, barely avoiding getting stuck.")
- return
+ return ..()
+
+ else if(L.fatness > 1890)
+ if(rand(1, 5) == 1)
+ L.visible_message("[L]'s hips brush against the doorway...")
+ to_chat(L, "As you pass through \the [src], you feel a slight brushing against your hips. The [src] frame accommodates your form, but it's a close fit..")
+ return ..()
+ else
+ return ..()
/obj/machinery/door/airlock/abandoned
abandoned = TRUE
diff --git a/code/modules/admin/check_antagonists.dm b/code/modules/admin/check_antagonists.dm
index 8cb2a9a4..7b2855b5 100644
--- a/code/modules/admin/check_antagonists.dm
+++ b/code/modules/admin/check_antagonists.dm
@@ -106,7 +106,7 @@
else
sections += T.antag_listing_entry()
- sortTim(all_antagonists, /proc/cmp_antag_category)
+ sortTim(all_antagonists, GLOBAL_PROC_REF(cmp_antag_category))
var/current_category
var/list/current_section = list()
@@ -212,4 +212,4 @@
dat += build_antag_listing()
dat += "