please do not end your paths with /
This commit is contained in:
+1
-1
@@ -167,5 +167,5 @@
|
||||
|
||||
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time = 3)
|
||||
var/datum/beam/newbeam = new(src,BeamTarget,icon,icon_state,time,maxdistance,beam_type,beam_sleep_time)
|
||||
INVOKE_ASYNC(newbeam, TYPE_PROC_REF(/datum/beam/, Start))
|
||||
INVOKE_ASYNC(newbeam, TYPE_PROC_REF(/datum/beam, Start))
|
||||
return newbeam
|
||||
|
||||
+9
-17
@@ -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
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
RegisterSignal(shooter, COMSIG_MOB_CLIENT_LOGOUT, PROC_REF(autofire_off))
|
||||
if(!QDELETED(shooter))
|
||||
UnregisterSignal(shooter, COMSIG_MOB_CLIENT_LOGIN)
|
||||
parent.RegisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN, TYPE_PROC_REF(/obj/item/gun/, autofire_bypass_check))
|
||||
parent.RegisterSignal(parent, COMSIG_AUTOFIRE_SHOT, TYPE_PROC_REF(/obj/item/gun/, do_autofire))
|
||||
parent.RegisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN, TYPE_PROC_REF(/obj/item/gun, autofire_bypass_check))
|
||||
parent.RegisterSignal(parent, COMSIG_AUTOFIRE_SHOT, TYPE_PROC_REF(/obj/item/gun, do_autofire))
|
||||
|
||||
|
||||
/datum/component/automatic_fire/proc/autofire_off(datum/source)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
strip_menu = new(source, src)
|
||||
LAZYSET(strip_menus, source, strip_menu)
|
||||
|
||||
INVOKE_ASYNC(strip_menu, TYPE_PROC_REF(/datum/, ui_interact), user)
|
||||
INVOKE_ASYNC(strip_menu, TYPE_PROC_REF(/datum, ui_interact), user)
|
||||
|
||||
/// A representation of an item that can be stripped down
|
||||
/datum/strippable_item
|
||||
|
||||
Reference in New Issue
Block a user