From aaf7d3b6e302f1317cfbf3946edc058e080499f4 Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Wed, 9 Nov 2022 20:13:08 +0000 Subject: [PATCH] CI check for old style procrefs, tidies some that slipped in (#19649) * CI_procref * tidy these * exclude the one place we will permit this --- code/controllers/subsystem/pathfinder.dm | 2 +- code/controllers/subsystem/ticker.dm | 2 +- code/modules/pda/PDA.dm | 2 +- tools/ci/check_grep.sh | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/pathfinder.dm b/code/controllers/subsystem/pathfinder.dm index 0dd3cc39354..a7f99a4c13b 100644 --- a/code/controllers/subsystem/pathfinder.dm +++ b/code/controllers/subsystem/pathfinder.dm @@ -29,7 +29,7 @@ SUBSYSTEM_DEF(pathfinder) while(flow[free]) CHECK_TICK free = (free % lcount) + 1 - var/t = addtimer(CALLBACK(src, /datum/flowcache.proc/toolong, free), 150, TIMER_STOPPABLE) + var/t = addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/flowcache, toolong), free), 150, TIMER_STOPPABLE) flow[free] = t flow[t] = M return free diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index a174eee7edd..33cec95cdc1 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -338,7 +338,7 @@ SUBSYSTEM_DEF(ticker) #endif // Do this 10 second after roundstart because of roundstart lag, and make it more visible - addtimer(CALLBACK(src, .proc/handle_antagfishing_reporting), 10 SECONDS) + addtimer(CALLBACK(src, PROC_REF(handle_antagfishing_reporting)), 10 SECONDS) return TRUE diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 1ca786c69b9..30836268fcc 100644 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -306,7 +306,7 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/add_pen(obj/item/P) P.forceMove(src) held_pen = P - RegisterSignal(held_pen, COMSIG_PARENT_QDELETING, .proc/clear_pen) + RegisterSignal(held_pen, COMSIG_PARENT_QDELETING, PROC_REF(clear_pen)) /obj/item/pda/proc/clear_pen() UnregisterSignal(held_pen, COMSIG_PARENT_QDELETING) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index b34715bc5c8..12b6b99475d 100755 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -40,6 +40,11 @@ if grep -P '/obj/merge_conflict_marker' _maps/**/*.dmm; then echo "ERROR: Merge conflict markers detected in map, please resolve all merge failures!" st=1 fi; +# Check for non-515 compatable .proc/ syntax +if grep -P --exclude='__byond_version_compat.dm' '\.proc/' code/**/*.dm; then + echo "ERROR: Outdated proc reference use detected in code, please use proc reference helpers." + st=1 +fi; nl=' ' nl=$'\n'