Skip to content

Commit

Permalink
Update more proc calls to use the macro
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Nov 4, 2023
1 parent 322f322 commit dde25fe
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(

//fun fact: Topic() acts like a verb and is executed at the end of the tick like other verbs. So we have to queue it if the server is
//overloaded
if(hsrc && hsrc != holder && DEFAULT_TRY_QUEUE_VERB(VERB_CALLBACK(src, .proc/_Topic, hsrc, href, href_list)))
if(hsrc && hsrc != holder && DEFAULT_TRY_QUEUE_VERB(VERB_CALLBACK(src, PROC_REF(_Topic), hsrc, href, href_list)))
return
..() //redirect to hsrc.Topic()

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
set name = "quick-equip"
set hidden = TRUE

DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/execute_quick_equip))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(execute_quick_equip)))

///proc extender of [/mob/verb/quick_equip] used to make the verb queuable if the server is overloaded
/mob/proc/execute_quick_equip()
Expand All @@ -443,7 +443,7 @@
set name = "equipment-swap"
set hidden = TRUE

DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/execute_equipment_swap))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(execute_equipment_swap)))

/mob/proc/execute_equipment_swap()
var/obj/item/I = get_active_held_item()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@
set name = "Resist"
set category = "IC"

DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/execute_resist))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(execute_resist)))

///proc extender of [/mob/living/verb/resist] meant to make the process queable if the server is overloaded when the verb is called
/mob/living/proc/execute_resist()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
set name = "Examine"
set category = "IC"

DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/run_examinate, examinify))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(run_examinate), examinify))

/mob/proc/run_examinate(atom/examinify)

Expand Down Expand Up @@ -608,7 +608,7 @@
set category = "Object"
set src = usr

DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/execute_mode))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(execute_mode)))

///proc version to finish /mob/verb/mode() execution. used in case the proc needs to be queued for the tick after its first called
/mob/proc/execute_mode()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/point/point.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
if(istype(A, /obj/effect/temp_visual/point))
return FALSE

DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/_pointed, A))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(_pointed), A))

/// possibly delayed verb that finishes the pointing process starting in [/mob/verb/pointed()].
/// either called immediately or in the tick after pointed() was called, as per the [DEFAULT_QUEUE_OR_CALL_VERB()] macro
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/ammunition/_ammunition.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
SpinAnimation(10, 1)
var/turf/T = get_turf(src)
if(bounce_sfx_override)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, pick(bounce_sfx_override), 20, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.
addtimer(CALLBACK(GLOBAL_PROC, PROC_REF(playsound), src, pick(bounce_sfx_override), 20, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.
return
if(still_warm && T && T.bullet_sizzle)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound), src, 'sound/items/welder.ogg', 20, 1), bounce_delay) //If the turf is made of water and the shell casing is still hot, make a sizzling sound when it's ejected.
Expand Down
10 changes: 5 additions & 5 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@

/obj/item/gun/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, PROC_REF(on_wield))
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, PROC_REF(on_unwield))
if(pin)
pin = new pin(src)
if(gun_light)
Expand All @@ -133,7 +133,7 @@
user.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/gun, multiplicative_slowdown = wield_slowdown)
wield_time = world.time + wield_delay
if(wield_time > 0)
if(do_mob(user, user, wield_delay, FALSE, TRUE, CALLBACK(src, .proc/is_wielded), ignore_loc_change = TRUE))
if(do_mob(user, user, wield_delay, FALSE, TRUE, CALLBACK(src, PROC_REF(is_wielded)), ignore_loc_change = TRUE))
wielded_fully = TRUE
else
wielded_fully = TRUE
Expand Down Expand Up @@ -730,7 +730,7 @@
set_light_color(muzzle_flash_color)
set_light_on(TRUE)
update_light()
addtimer(CALLBACK(src, .proc/reset_light_range, prev_light), 1 SECONDS)
addtimer(CALLBACK(src, PROC_REF(reset_light_range), prev_light), 1 SECONDS)
//Offset the pixels.
switch(firing_angle)
if(0, 360)
Expand Down Expand Up @@ -803,7 +803,7 @@
flash_loc.vis_contents += muzzle_flash
muzzle_flash.applied = TRUE

addtimer(CALLBACK(src, .proc/remove_muzzle_flash, flash_loc, muzzle_flash), 0.2 SECONDS)
addtimer(CALLBACK(src, PROC_REF(remove_muzzle_flash), flash_loc, muzzle_flash), 0.2 SECONDS)

/obj/item/gun/proc/reset_light_range(lightrange)
set_light_range(lightrange)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
window = window,
src_object = src_object)
process_status()
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, .proc/on_act_message, act_type, payload, state))
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(on_act_message), act_type, payload, state))
return FALSE
switch(type)
if("ready")
Expand Down

0 comments on commit dde25fe

Please sign in to comment.