Skip to content

Commit

Permalink
Revert "Revert "fixes noncompliance with 514 procpaths"" (#5781)
Browse files Browse the repository at this point in the history
Co-authored-by: silicons <[email protected]>
  • Loading branch information
silicons and silicons committed Jul 27, 2023
1 parent c178584 commit 93de2c0
Show file tree
Hide file tree
Showing 293 changed files with 611 additions and 616 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/_cooldowns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define COMSIG_CD_STOP(cd_index) "cooldown_[cd_index]"
#define COMSIG_CD_RESET(cd_index) "cd_reset_[cd_index]"

#define TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, /proc/end_cooldown, cd_source, cd_index), cd_time))
#define TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(end_cooldown), cd_source, cd_index), cd_time))

#define TIMER_COOLDOWN_CHECK(cd_source, cd_index) LAZYACCESS(cd_source.cooldowns, cd_index)

Expand All @@ -38,7 +38,7 @@
* A bit more expensive than the regular timers, but can be reset before they end and the time left can be checked.
*/

#define S_TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, /proc/end_cooldown, cd_source, cd_index), cd_time, TIMER_STOPPABLE))
#define S_TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(end_cooldown), cd_source, cd_index), cd_time, TIMER_STOPPABLE))

#define S_TIMER_COOLDOWN_RESET(cd_source, cd_index) reset_cooldown(cd_source, cd_index)

Expand Down
11 changes: 6 additions & 5 deletions code/__DEFINES/callbacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
} \
else { \
ASYNC { \
call(proc_owner, proc_path)(##proc_arguments); \
/* Written with `0 ||` to avoid the compiler seeing call("string"), and thinking it's a deprecated DLL */ \
call(0 || proc_owner, proc_path)(##proc_arguments); \
}; \
}

/// Varset callback for a list
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, /proc/___callbackvarset, ##target, ##var_name, ##var_value)
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##target, ##var_name, ##var_value)
/// Varset callback for a datum
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, /proc/___callbackvarset, ##datum, NAMEOF(##datum, ##var), ##var_value)
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##datum, NAMEOF(##datum, ##var), ##var_value)
/// Create a varset timer
#define VARSET_IN(datum, var, var_value, time) addtimer(VARSET_CALLBACK(datum, var, var_value), time)

Expand All @@ -37,9 +38,9 @@
datum.vars[var_name] = var_value

/// flick() callback
#define FLICK_CALLBACK(state, target) CALLBACK(GLOBAL_PROC, /proc/___callbackflick, target, state)
#define FLICK_CALLBACK(state, target) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackflick), target, state)
/// flick() using timer
#define FLICK_IN(state, target, time) addtimer(CALLBACK(GLOBAL_PROC, /proc/___callbackflick, target, state), time)
#define FLICK_IN(state, target, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackflick), target, state), time)

/proc/___callbackflick(target, state)
flick(target, state)
6 changes: 3 additions & 3 deletions code/__DEFINES/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)

//Qdel helper macros.
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) qdel(item); item = null
#define QDEL_NULL_LIST QDEL_LIST_NULL
#define QDEL_LIST_NULL(x) if(x) { for(var/y in x) { qdel(y) } ; x = null }
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/rendering/zmimic.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define TURF_IS_MIMICKING(T) (isturf(T) && (T:mz_flags & MZ_MIMIC_BELOW))
#define CHECK_OO_EXISTENCE(OO) if (OO && !MOVABLE_IS_ON_ZTURF(OO) && !OO.destruction_timer) { OO.destruction_timer = addtimer(CALLBACK(OO, /datum/.proc/qdel_self), 10 SECONDS, TIMER_STOPPABLE); }
#define CHECK_OO_EXISTENCE(OO) if (OO && !MOVABLE_IS_ON_ZTURF(OO) && !OO.destruction_timer) { OO.destruction_timer = addtimer(CALLBACK(OO, TYPE_PROC_REF(/datum, qdel_self)), 10 SECONDS, TIMER_STOPPABLE); }
#define UPDATE_OO_IF_PRESENT CHECK_OO_EXISTENCE(bound_overlay); if (bound_overlay) { update_above(); }

// I do not apologize.
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/_lists_tg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This actually tests if they have the same entries and values.
return tim_sort(L, order >= 0 ? /proc/cmp_records_asc : /proc/cmp_records_dsc)

//any value in a list
/proc/sortList(list/L, cmp=/proc/cmp_text_asc)
/proc/sortList(list/L, cmp= GLOBAL_PROC_REF(cmp_text_asc))
return tim_sort(L.Copy(), cmp)

//uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/animations.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/proc/fade_out(image/I, list/show_to)
animate(I, alpha = 0, time = 0.5 SECONDS, easing = EASE_IN)
addtimer(CALLBACK(GLOBAL_PROC, .proc/remove_image_from_clients, I, show_to), 0.5 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(remove_image_from_clients), I, show_to), 0.5 SECONDS)

/proc/animate_speech_bubble(image/I, list/show_to, duration)
var/matrix/M = matrix()
Expand All @@ -11,7 +11,7 @@
for(var/client/C in show_to)
C.images += I
animate(I, transform = 0, alpha = 255, time = 0.2 SECONDS, easing = EASE_IN)
addtimer(CALLBACK(GLOBAL_PROC, .proc/fade_out, I, show_to), (duration - 0.5 SECONDS))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(fade_out), I, show_to), (duration - 0.5 SECONDS))

/proc/animate_receive_damage(atom/A)
var/pixel_x_diff = rand(-2,2)
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
for(var/area/A in world)
GLOB.sortedAreas.Add(A)

tim_sort(GLOB.sortedAreas, /proc/cmp_name_asc)
tim_sort(GLOB.sortedAreas, GLOBAL_PROC_REF(cmp_name_asc))
setupTeleportLocs() // shitcode patch to make vorecode work until we get rid of this shit meme or refactor it entirely

/area/proc/addSorted()
GLOB.sortedAreas.Add(src)
tim_sort(GLOB.sortedAreas, /proc/cmp_name_asc)
tim_sort(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.
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/files/client_io.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GLOBAL_VAR_INIT(fileaccess_timer, 0)
var/list/choices = flist(path)
if(path != root)
choices.Insert(1,"/")
tim_sort(choices, /proc/cmp_text_asc)
tim_sort(choices, GLOBAL_PROC_REF(cmp_text_asc))

var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
switch(choice)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/lists/asset_sorted.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Runtimes if the passed in list is not sorted.
/proc/assert_sorted(list/list, name, cmp = /proc/cmp_numeric_asc)
/proc/assert_sorted(list/list, name, cmp = GLOBAL_PROC_REF(cmp_numeric_asc))
var/last_value = list[1]

for (var/index in 2 to list.len)
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/misc/sonar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
C.images += images
for(var/image/I as anything in images)
animate(I, alpha = 255, time = fadein, easing = SINE_EASING)
addtimer(CALLBACK(src, .proc/remove_sonar_images, images, clients, fadeout), sustain, TIMER_CLIENT_TIME)
addtimer(CALLBACK(src, PROC_REF(remove_sonar_images), images, clients, fadeout), sustain, TIMER_CLIENT_TIME)
/datum/controller/subsystem/sonar/proc/remove_sonar_images(list/image/images, list/client/clients, time)
for(var/image/I as anything in images)
animate(I, alpha = 0, time = time, easing = SINE_EASING)
addtimer(CALLBACK(src, .proc/dispose_sonar_images, images, clients), time, TIMER_CLIENT_TIME)
addtimer(CALLBACK(src, PROC_REF(dispose_sonar_images), images, clients), time, TIMER_CLIENT_TIME)
/datum/controller/subsystem/sonar/proc/dispose_sonar_images(list/image/images, list/client/clients)
for(var/client/C in clients)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/path.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
/datum/pathfind/New(atom/movable/caller, atom/goal, id, max_distance, mintargetdist, simulated_only, avoid)
src.caller = caller
end = get_turf(goal)
open = new /datum/heap(/proc/HeapPathWeightCompare)
open = new /datum/heap(GLOBAL_PROC_REF(HeapPathWeightCompare))
sources = new()
src.id = id
src.max_distance = max_distance
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/piping_colors_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ GLOBAL_LIST_INIT(pipe_colors_ordered, tim_sort(list(
PIPE_COLOR_PURPLE = 2,
PIPE_COLOR_RED = 3,
PIPE_COLOR_YELLOW = 4
), /proc/cmp_text_asc))
), GLOBAL_PROC_REF(cmp_text_asc)))

///Names shown in the examine for every colored atmos component
GLOBAL_LIST_INIT(pipe_color_name, tim_sort(list(
Expand All @@ -51,4 +51,4 @@ GLOBAL_LIST_INIT(pipe_color_name, tim_sort(list(
PIPE_COLOR_YELLOW = "yellow",
PIPE_COLOR_BROWN = "brown",
PIPE_COLOR_PURPLE = "purple"
), /proc/cmp_text_asc))
), GLOBAL_PROC_REF(cmp_text_asc)))
2 changes: 1 addition & 1 deletion code/__HELPERS/sorts/InsertSort.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* InsertionSort
* - Generally faster than merge for runs of 7 or smaller.
*/
/proc/insertion_sort(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex=0)
/proc/insertion_sort(list/L, cmp= GLOBAL_PROC_REF(cmp_numeric_asc), associative, fromIndex=1, toIndex=0)
if(L && L.len >= 2)
fromIndex = fromIndex % L.len
toIndex = toIndex % (L.len+1)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/sorts/MergeSort.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* MergeSort
* - Gernerally faster than insert sort, for runs of 7 or larger.
*/
/proc/merge_sort(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex)
/proc/merge_sort(list/L, cmp= GLOBAL_PROC_REF(cmp_numeric_asc), associative, fromIndex=1, toIndex)
if(L && L.len >= 2)
fromIndex = fromIndex % L.len
toIndex = toIndex % (L.len+1)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/sorts/TimSort.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* TimSort
*/
/proc/tim_sort(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex=0)
/proc/tim_sort(list/L, cmp= GLOBAL_PROC_REF(cmp_numeric_asc), associative, fromIndex=1, toIndex=0)
if(L && L.len >= 2)
fromIndex = fromIndex % L.len
toIndex = toIndex % (L.len+1)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/sorts/__main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GLOBAL_DATUM_INIT(sort_instance, /datum/sort_instance, new())
var/list/L

/// The comparator proc-reference.
var/cmp = /proc/cmp_numeric_asc
var/cmp = GLOBAL_PROC_REF(cmp_numeric_asc)

/// Whether we are sorting list keys (0: L[i]) or associated values (1: L[L[i]])
var/associative = 0
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
/// Orders mobs by type then by name.
/proc/sortmobs()
var/list/moblist = list()
var/list/sortmob = sortList(GLOB.mob_list, cmp=/proc/cmp_name_asc)
var/list/sortmob = sortList(GLOB.mob_list, cmp= GLOBAL_PROC_REF(cmp_name_asc))
for(var/mob/observer/eye/M in sortmob)
moblist.Add(M)
for(var/mob/observer/blob/M in sortmob)
Expand Down
24 changes: 12 additions & 12 deletions code/_globals/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ GLOBAL_LIST(legacy_marking_lookup)
continue
.[S.id] = S
by_name[S.name] = S
tim_sort(by_name, /proc/cmp_text_asc, associative = FALSE)
tim_sort(by_name, GLOBAL_PROC_REF(cmp_text_asc), associative = FALSE)
GLOB.legacy_hair_lookup = by_name
tim_sort(., /proc/cmp_name_asc, associative = TRUE)
tim_sort(., GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)

/proc/all_ear_styles()
. = list()
Expand All @@ -74,9 +74,9 @@ GLOBAL_LIST(legacy_marking_lookup)
continue
.[S.id] = S
by_type[S.type] = S
tim_sort(by_type, /proc/cmp_name_asc, associative = TRUE)
tim_sort(by_type, GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)
GLOB.legacy_ears_lookup = by_type
tim_sort(., /proc/cmp_name_asc, associative = TRUE)
tim_sort(., GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)

/proc/all_wing_styles()
. = list()
Expand All @@ -94,9 +94,9 @@ GLOBAL_LIST(legacy_marking_lookup)
continue
.[S.id] = S
by_type[S.type] = S
tim_sort(by_type, /proc/cmp_name_asc, associative = TRUE)
tim_sort(by_type, GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)
GLOB.legacy_wing_lookup = by_type
tim_sort(., /proc/cmp_name_asc, associative = TRUE)
tim_sort(., GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)

/proc/all_tail_styles()
. = list()
Expand All @@ -114,9 +114,9 @@ GLOBAL_LIST(legacy_marking_lookup)
continue
.[S.id] = S
by_type[S.type] = S
tim_sort(by_type, /proc/cmp_name_asc, associative = TRUE)
tim_sort(by_type, GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)
GLOB.legacy_tail_lookup = by_type
tim_sort(., /proc/cmp_name_asc, associative = TRUE)
tim_sort(., GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)

/proc/all_facial_hair_styles()
. = list()
Expand All @@ -137,9 +137,9 @@ GLOBAL_LIST(legacy_marking_lookup)
continue
.[S.id] = S
by_name[S.name] = S
tim_sort(by_name, /proc/cmp_text_asc, associative = FALSE)
tim_sort(by_name, GLOBAL_PROC_REF(cmp_text_asc), associative = FALSE)
GLOB.legacy_facial_hair_lookup = by_name
tim_sort(., /proc/cmp_name_asc, associative = TRUE)
tim_sort(., GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)

/proc/all_marking_styles()
. = list()
Expand All @@ -160,6 +160,6 @@ GLOBAL_LIST(legacy_marking_lookup)
continue
.[S.id] = S
by_name[S.name] = S
tim_sort(by_name, /proc/cmp_text_asc, associative = FALSE)
tim_sort(by_name, GLOBAL_PROC_REF(cmp_text_asc), associative = FALSE)
GLOB.legacy_marking_lookup = by_name
tim_sort(., /proc/cmp_name_asc, associative = TRUE)
tim_sort(., GLOBAL_PROC_REF(cmp_name_asc), associative = TRUE)
2 changes: 1 addition & 1 deletion code/controllers/configuration/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
var/good_update = istext(new_value)
log_config("LINE [linenumber]: Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
if(!warned_deprecated_configs)
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(message_admins), "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
warned_deprecated_configs = TRUE
if(good_update)
value = new_value
Expand Down
12 changes: 6 additions & 6 deletions code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
qdel(Master)
else
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
tim_sort(subsytem_types, /proc/cmp_subsystem_init)
tim_sort(subsytem_types, GLOBAL_PROC_REF(cmp_subsystem_init))
for(var/I in subsytem_types)
var/datum/controller/subsystem/S = new I
_subsystems += S
Expand Down Expand Up @@ -142,7 +142,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new

/datum/controller/master/Shutdown()
processing = FALSE
tim_sort(subsystems, /proc/cmp_subsystem_init)
tim_sort(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
reverseRange(subsystems)
for(var/datum/controller/subsystem/ss in subsystems)
log_world("Shutting down [ss.name] subsystem...")
Expand Down Expand Up @@ -245,7 +245,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
to_chat(world, SPAN_BOLDANNOUNCE("Initializing subsystems..."))

// Sort subsystems by init_order, so they initialize in the correct order.
tim_sort(subsystems, /proc/cmp_subsystem_init)
tim_sort(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))

var/start_timeofday = REALTIMEOFDAY
// Initialize subsystems.
Expand All @@ -268,7 +268,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
SetRunLevel(RUNLEVEL_LOBBY)

// Sort subsystems by display setting for easy access.
tim_sort(subsystems, /proc/cmp_subsystem_display)
tim_sort(subsystems, GLOBAL_PROC_REF(cmp_subsystem_display))

if(world.system_type == MS_WINDOWS && CONFIG_GET(flag/toast_notification_on_init) && !length(GLOB.clients))
world.shelleo("start /min powershell -ExecutionPolicy Bypass -File tools/initToast/initToast.ps1 -name \"[world.name]\" -icon %CD%\\icons\\CS13_16.png -port [world.port]")
Expand Down Expand Up @@ -378,9 +378,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
* 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)
*/
tim_sort(SStickersubsystems, /proc/cmp_subsystem_priority)
tim_sort(SStickersubsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
for(var/I in runlevel_sorted_subsystems)
tim_sort(I, /proc/cmp_subsystem_priority)
tim_sort(I, GLOBAL_PROC_REF(cmp_subsystem_priority))
I += SStickersubsystems

var/cached_runlevel = current_runlevel
Expand Down
10 changes: 5 additions & 5 deletions code/controllers/subsystem/characters/backgrounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
character_cultures[L.id] = L


tim_sort(character_origins, /proc/cmp_auto_compare, TRUE)
tim_sort(character_citizenships, /proc/cmp_auto_compare, TRUE)
tim_sort(character_religions, /proc/cmp_auto_compare, TRUE)
tim_sort(character_factions, /proc/cmp_auto_compare, TRUE)
tim_sort(character_cultures, /proc/cmp_auto_compare, TRUE)
tim_sort(character_origins, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(character_citizenships, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(character_religions, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(character_factions, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(character_cultures, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)

/datum/controller/subsystem/characters/proc/available_citizenships(species_id, category)
. = list()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/characters/character_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
stack_trace("ignoring custom character species path [path] - collides on uid [S.uid]")
continue
character_species_lookup[S.uid] = S
tim_sort(character_species_lookup, /proc/cmp_auto_compare, TRUE)
tim_sort(character_species_lookup, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
rebuild_character_species_ui_cache()

/datum/controller/subsystem/characters/proc/rebuild_character_species_ui_cache()
Expand Down
6 changes: 3 additions & 3 deletions code/controllers/subsystem/characters/languages.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
if(!(L.language_flags & LANGUAGE_NONGLOBAL) && L.key)
language_keys[L.key] = L

tim_sort(language_names, /proc/cmp_auto_compare, TRUE)
tim_sort(language_keys, /proc/cmp_auto_compare)
tim_sort(language_paths, /proc/cmp_auto_compare, TRUE)
tim_sort(language_names, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(language_keys, GLOBAL_PROC_REF(cmp_auto_compare))
tim_sort(language_paths, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)

/datum/controller/subsystem/characters/proc/resolve_language(id_path_name)
if(ispath(id_path_name))
Expand Down
10 changes: 5 additions & 5 deletions code/controllers/subsystem/characters/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
if((!(S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_SPECIAL)) && !(S.get_species_id() in blacklisted_icon_ids)) || (S.get_species_id() in whitelisted_icon_ids))
custom_species_bases += S.name

tim_sort(species_lookup, /proc/cmp_auto_compare, TRUE)
tim_sort(species_names, /proc/cmp_auto_compare, TRUE)
tim_sort(species_paths, /proc/cmp_auto_compare, TRUE)
tim_sort(playable_species, /proc/cmp_auto_compare)
tim_sort(custom_species_bases, /proc/cmp_auto_compare)
tim_sort(species_lookup, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(species_names, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(species_paths, GLOBAL_PROC_REF(cmp_auto_compare), TRUE)
tim_sort(playable_species, GLOBAL_PROC_REF(cmp_auto_compare))
tim_sort(custom_species_bases, GLOBAL_PROC_REF(cmp_auto_compare))

/datum/controller/subsystem/characters/proc/resolve_species(id_path_name)
RETURN_TYPE(/datum/species)
Expand Down
Loading

0 comments on commit 93de2c0

Please sign in to comment.