diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 79fd1d11863..85f170efd1c 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -177,11 +177,11 @@ SUBSYSTEM_DEF(garbage) if(GC_QUEUE_CHECK) #ifdef REFERENCE_TRACKING if(reference_find_on_fail[refID] && !ref_search_stop) - INVOKE_ASYNC(D, /datum/proc/find_references) + INVOKE_ASYNC(D, TYPE_PROC_REF(/datum, find_references)) ref_searching = TRUE #ifdef GC_FAILURE_HARD_LOOKUP else if (!ref_search_stop) - INVOKE_ASYNC(D, /datum/proc/find_references) + INVOKE_ASYNC(D, TYPE_PROC_REF(/datum, find_references)) ref_searching = TRUE #endif reference_find_on_fail -= refID diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index e01621f8991..7cdec1acaa1 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -81,7 +81,7 @@ playsound(loc, 'sound/weapons/flash.ogg', 100, 1) flick("[base_state]_flash", src) set_light(2, 1, COLOR_WHITE) - addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light), 0), 2) last_flash = world.time use_power(1000) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 0c32af8759b..27235695a36 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -105,7 +105,7 @@ M.playsound_local(epicenter, null, echo_volume, 1, frequency, S = explosion_echo_sound, distance_multiplier = 0) if(creaking_explosion) // 5 seconds after the bang, the station begins to creak - addtimer(CALLBACK(M, /mob/proc/playsound_local, epicenter, null, rand(FREQ_LOWER, FREQ_UPPER), 1, frequency, null, null, FALSE, hull_creaking_sound, 0), CREAK_DELAY) + addtimer(CALLBACK(M, TYPE_PROC_REF(/mob, playsound_local), epicenter, null, rand(FREQ_LOWER, FREQ_UPPER), 1, frequency, null, null, FALSE, hull_creaking_sound, 0), CREAK_DELAY) if(heavy_impact_range > 1) var/datum/effect_system/explosion/E diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 3212bffad1c..cd74120329a 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -89,7 +89,7 @@ playsound(loc, use_sound, 100, 1) flick("[initial(icon_state)]2", src) set_light(2, 1, COLOR_WHITE) - addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light), 0), 2) times_used++ if(user && !clown_check(user)) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 47371ee329e..25ffa1d0e4f 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -431,7 +431,7 @@ REAGENT SCANNER else to_chat(user, "[src]'s barometer function says a storm will land in approximately [butchertime(fixed)].") cooldown = TRUE - addtimer(CALLBACK(src,/obj/item/analyzer/proc/ping), cooldown_time) + addtimer(CALLBACK(src, PROC_REF(ping)), cooldown_time) /obj/item/analyzer/proc/ping() if(isliving(loc)) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index e6cc8e74c72..2900aaa2970 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -201,7 +201,7 @@ var/previouscolor = color color = "#960000" animate(src, color = previouscolor, time = 8) - addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 8) /turf/simulated/floor/clockwork/reebe name = "cogplate" diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index 9fc986b3d2e..4f17c4ee48b 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -68,7 +68,7 @@ var/previouscolor = color color = "#960000" animate(src, color = previouscolor, time = 8) - addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 8) /turf/simulated/wall/clockwork/devastate_wall() for(var/i in 1 to 2) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 145c995e493..76421ed6672 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -315,12 +315,12 @@ if(INTENT_GRAB) C.visible_message("[L] is grabbed by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!") add_attack_logs(H, C, "[H] grabbed [C] with a changeling tentacle") - C.throw_at(get_step_towards(H,C), 8, 2, callback=CALLBACK(H, /mob/proc/tentacle_grab, C)) + C.throw_at(get_step_towards(H,C), 8, 2, callback=CALLBACK(H, TYPE_PROC_REF(/mob, tentacle_grab), C)) return 1 if(INTENT_HARM) C.visible_message("[L] is thrown towards [H] by a tentacle!","A tentacle grabs you and throws you towards [H]!") - C.throw_at(get_step_towards(H,C), 8, 2, callback=CALLBACK(H, /mob/proc/tentacle_stab, C)) + C.throw_at(get_step_towards(H,C), 8, 2, callback=CALLBACK(H, TYPE_PROC_REF(/mob, tentacle_stab), C)) return 1 else L.visible_message("[L] is pulled by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!") diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index 83564d3159c..3870fb5937e 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -121,7 +121,7 @@ temp_power = light_power temp_range = light_range set_light(_range, _power, _color) - addtimer(CALLBACK(src, /atom/proc/set_light, _reset_lighting ? initial(light_range) : temp_range, _reset_lighting ? initial(light_power) : temp_power, _reset_lighting ? initial(light_color) : temp_color), _duration, TIMER_OVERRIDE|TIMER_UNIQUE) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light), _reset_lighting ? initial(light_range) : temp_range, _reset_lighting ? initial(light_power) : temp_power, _reset_lighting ? initial(light_color) : temp_color), _duration, TIMER_OVERRIDE|TIMER_UNIQUE) /mob/living/flash_lighting_fx(_range = FLASH_LIGHT_RANGE, _power = FLASH_LIGHT_POWER, _color = LIGHT_COLOR_WHITE, _duration = FLASH_LIGHT_DURATION, _reset_lighting = TRUE) mob_light(_color, _range, _power, _duration) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 48b0ffe8093..db3b4912b0e 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -87,8 +87,8 @@ //Handle species-specific deaths. dna.species.handle_death(gibbed, src) - if(SSticker && SSticker.mode) - INVOKE_ASYNC(SSblackbox, /datum/controller/subsystem/blackbox/proc/ReportDeath, src) + if(SSticker.mode) + INVOKE_ASYNC(SSblackbox, TYPE_PROC_REF(/datum/controller/subsystem/blackbox, ReportDeath), src) /mob/living/carbon/human/update_revive(updating) . = ..() diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 7bb99d4b2ac..97ace1e5fc3 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -59,7 +59,7 @@ grow.Grant(H) var/datum/action/innate/slimecolor/recolor = new() recolor.Grant(H) - RegisterSignal(H, COMSIG_HUMAN_UPDATE_DNA, /datum/species/slime/./proc/blend) + RegisterSignal(H, COMSIG_HUMAN_UPDATE_DNA, PROC_REF(blend)) blend(H) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index e95a044a822..8c7d18cc2e6 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -291,7 +291,7 @@ Difficulty: Very Hard /obj/effect/temp_visual/at_shield/Initialize(mapload, new_target) . = ..() target = new_target - INVOKE_ASYNC(src, /atom/movable/proc/orbit, target, 0, FALSE, 0, 0, FALSE, TRUE) + INVOKE_ASYNC(src, TYPE_PROC_REF(/atom/movable, orbit), target, 0, FALSE, 0, 0, FALSE, TRUE) /mob/living/simple_animal/hostile/megafauna/colossus/bullet_act(obj/item/projectile/P) if(!stat) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 544cddb70f4..b2e8e2f86a2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -210,7 +210,7 @@ Difficulty: Hard blinking = TRUE SLEEP_CHECK_DEATH(4 + target_slowness) animate(src, color = oldcolor, time = 8) - addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 8) SLEEP_CHECK_DEATH(8) blinking = FALSE else @@ -231,7 +231,7 @@ Difficulty: Hard INVOKE_ASYNC(src, PROC_REF(blasts), target, GLOB.diagonals) SLEEP_CHECK_DEATH(6 + target_slowness) animate(src, color = oldcolor, time = 8) - addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 8) SLEEP_CHECK_DEATH(8) blinking = FALSE @@ -259,7 +259,7 @@ Difficulty: Hard SLEEP_CHECK_DEATH(8 + target_slowness) chaser_cooldown = world.time + initial(chaser_cooldown) animate(src, color = oldcolor, time = 8) - addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 8) SLEEP_CHECK_DEATH(8) blinking = FALSE diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 62444deae00..4c288e7a6a1 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -91,7 +91,7 @@ STATUS EFFECTS if(stat == DEAD && !work_when_dead) return - if(!instant && !do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, /mob/living/proc/cannot_stand)), only_use_extra_checks = TRUE)) + if(!instant && !do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/mob/living, cannot_stand))), only_use_extra_checks = TRUE)) return if(resting || body_position == STANDING_UP || HAS_TRAIT(src, TRAIT_FLOORED)) return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 02677741abb..fa1140cd3d0 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -471,7 +471,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM resting = !resting // this happens before the do_mob so that you can stay resting if you are stunned. - if(!do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, /mob/living/proc/cannot_stand)), only_use_extra_checks = TRUE)) + if(!do_mob(src, src, 1 SECONDS, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/mob/living, cannot_stand))), only_use_extra_checks = TRUE)) return if(resting) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 2a80dcc9d59..d38bcda6c3d 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -350,7 +350,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3) set_light(3, 2, LIGHT_COLOR_TUNGSTEN) - addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light), 0), 2) pictures_left-- to_chat(user, "[pictures_left] photos left.") icon_state = icon_off diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 2fb018effda..82dffb388bc 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -480,7 +480,7 @@ if(stat & (NOPOWER | BROKEN)) return FALSE if(!second_pass) //The first time, we just cut overlays - addtimer(CALLBACK(src, /obj/machinery/power/apc/proc.flicker, TRUE), 1) + addtimer(CALLBACK(src, PROC_REF(flicker), TRUE), 1) cut_overlays() managed_overlays = null // APC power distruptions have a chance to propogate to other machines on its network @@ -492,7 +492,7 @@ M.flicker() else flick("apcemag", src) //Second time we cause the APC to update its icon, then add a timer to update icon later - addtimer(CALLBACK(src, /obj/machinery/power/apc/proc.update_icon, TRUE), 10) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon), TRUE), 10) return TRUE diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index cec57ae61c3..0994e6afd6a 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -992,7 +992,7 @@ else if(isliving(target))//If we got a fleshbag on our hands var/mob/living/creature = target creature.set_shocked() - addtimer(CALLBACK(creature, /mob/living/proc/reset_shocked), 10) + addtimer(CALLBACK(creature, TYPE_PROC_REF(/mob/living, reset_shocked)), 10) //3 shots a human with no resistance. 2 to crit, one to death. This is at at least 10000 power. //There's no increase after that because the input power is effectivly capped at 10k //Does 1.5 damage at the least diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 0bdb03c4c4b..d091f998e36 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -334,7 +334,7 @@ if(closest_type == LIVING) var/mob/living/closest_mob = closest_atom closest_mob.set_shocked() - addtimer(CALLBACK(closest_mob, /mob/living/proc/reset_shocked), 10) + addtimer(CALLBACK(closest_mob, TYPE_PROC_REF(/mob/living, reset_shocked)), 10) var/shock_damage = (zap_flags & ZAP_MOB_DAMAGE) ? (min(round(power / 600), 90) + rand(-5, 5)) : 0 closest_mob.electrocute_act(shock_damage, source, 1, SHOCK_TESLA | ((zap_flags & ZAP_MOB_STUN) ? NONE : SHOCK_NOSTUN)) if(issilicon(closest_mob)) diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index b0fb5eb0310..ad09e951fae 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -65,7 +65,7 @@ stack_name = initial(S.name) use_power(min(1000, (amount_inserted / 100))) add_overlay("protolathe_[stack_name]") - addtimer(CALLBACK(src, /atom/proc/cut_overlay, "protolathe_[stack_name]"), 10) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, cut_overlay), "protolathe_[stack_name]"), 10) /obj/machinery/r_n_d/proc/check_mat(datum/design/being_built, M) return 0 // number of copies of design beign_built you can make with material M diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index fe318901c2e..bf943bc8657 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -115,7 +115,7 @@ if(designate_time && (landing_clear != SHUTTLE_DOCKER_BLOCKED)) to_chat(current_user, "Targeting transit location, please wait [DisplayTimeText(designate_time)]...") designating_target_loc = the_eye.loc - var/wait_completed = do_after(current_user, designate_time, FALSE, designating_target_loc, TRUE, CALLBACK(src, /obj/machinery/computer/camera_advanced/shuttle_docker/proc/canDesignateTarget)) + var/wait_completed = do_after(current_user, designate_time, FALSE, designating_target_loc, TRUE, CALLBACK(src, PROC_REF(canDesignateTarget))) designating_target_loc = null if(!current_user) return diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index 12b6b99475d..7a6283f891c 100755 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -41,7 +41,7 @@ if grep -P '/obj/merge_conflict_marker' _maps/**/*.dmm; then st=1 fi; # Check for non-515 compatable .proc/ syntax -if grep -P --exclude='__byond_version_compat.dm' '\.proc/' code/**/*.dm; then +if grep -P --exclude='__byond_version_compat.dm' '(\.proc\/)|(CALLBACK\(.*proc\/)|(INVOKE_ASYNC\(.*proc\/)' code/**/*.dm; then echo "ERROR: Outdated proc reference use detected in code, please use proc reference helpers." st=1 fi;