please do not end your paths with /

This commit is contained in:
SandPoot
2024-03-13 14:43:40 -03:00
parent f68671320b
commit 8516b07eee
20 changed files with 35 additions and 43 deletions
+9 -17
View File
@@ -5,10 +5,10 @@
* ## USAGE
*
* ```
* var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
* var/datum/callback/C = new(object|null, PROC_REF(procname), arg1, arg2, ... argn)
* var/timerid = addtimer(C, time, timertype)
* you can also use the compiler define shorthand
* var/timerid = addtimer(CALLBACK(object|null, PROC_REF(type/path|procstring), arg1, arg2, ... argn), time, timertype)
* var/timerid = addtimer(CALLBACK(object|null, PROC_REF(procname), arg1, arg2, ... argn), time, timertype)
* ```
*
* Note: proc strings can only be given for datum proc calls, global procs must be proc paths
@@ -26,27 +26,19 @@
* ## PROC TYPEPATH SHORTCUTS
* (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
*
* ### global proc while in another global proc:
* .procname
*
* `CALLBACK(GLOBAL_PROC, .some_proc_here)`
*
* ### proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
* .procname
*
* `CALLBACK(src, .some_proc_here)`
*
* ### when the above doesn't apply:
*PROC_REF(procname)
* ### proc defined on current(src) object OR overridden at src or any of it's parents:
* PROC_REF(procname)
*
* `CALLBACK(src, PROC_REF(some_proc_here))`
*
* ### global proc
* GLOBAL_PROC_REF(procname)
*
* proc defined on a parent of a some type
* `CALLBACK(src, GLOBAL_PROC_REF(some_proc_here))`
*
* `TYPE_PROC_REF(/some/type/, some_proc_here)`
*
* Otherwise you must always provide the full typepath of the proc (/type/of/thing/proc/procname)
* ### proc defined on some type
* TYPE_PROC_REF(/some/type/, some_proc_here)
*/
/datum/callback