procs
This commit is contained in:
@@ -85,6 +85,6 @@
|
||||
pixel_y = rand(-12, 12)
|
||||
var/turf/T = get_turf(src)
|
||||
if(still_warm && T && T.bullet_sizzle)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/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.
|
||||
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.
|
||||
else if(T && T.bullet_bounce_sound)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, T.bullet_bounce_sound, 60, 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, GLOBAL_PROC_REF(playsound), src, T.bullet_bounce_sound, 60, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
burst_size = 1
|
||||
|
||||
sortList(fire_select_modes, /proc/cmp_numeric_asc)
|
||||
sortList(fire_select_modes, GLOBAL_PROC_REF(cmp_numeric_asc))
|
||||
|
||||
if(fire_select_modes.len > 1)
|
||||
firemode_action = new(src)
|
||||
@@ -788,7 +788,7 @@
|
||||
zoomed = !zoomed
|
||||
|
||||
if(zoomed)
|
||||
RegisterSignal(user, COMSIG_ATOM_DIR_CHANGE, .proc/rotate)
|
||||
RegisterSignal(user, COMSIG_ATOM_DIR_CHANGE, PROC_REF(rotate))
|
||||
user.client.view_size.zoomOut(zoom_out_amt, zoom_amt, direct)
|
||||
else
|
||||
UnregisterSignal(user, COMSIG_ATOM_DIR_CHANGE)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
playsound(src, "gun_insert_full_magazine", 70, 1)
|
||||
if(!chambered)
|
||||
chamber_round()
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/gun_chamber_round.ogg', 100, 1), 3)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound), src, 'sound/weapons/gun_chamber_round.ogg', 100, 1), 3)
|
||||
else
|
||||
playsound(src, "gun_insert_empty_magazine", 70, 1)
|
||||
A.update_icon()
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
if(!QDELING(src) && !holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
// calls dropped().
|
||||
addtimer(CALLBACK(src, .proc/empty_if_not_held), 2)
|
||||
addtimer(CALLBACK(src, PROC_REF(empty_if_not_held)), 2)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/empty_if_not_held()
|
||||
if(!ismob(loc) && !istype(loc, /obj/item/integrated_circuit))
|
||||
@@ -176,7 +176,7 @@
|
||||
carried = 1
|
||||
|
||||
deltimer(recharge_timerid)
|
||||
recharge_timerid = addtimer(CALLBACK(src, .proc/reload), recharge_time * carried, TIMER_STOPPABLE)
|
||||
recharge_timerid = addtimer(CALLBACK(src, PROC_REF(reload)), recharge_time * carried, TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/emp_act(severity)
|
||||
return
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
current_user = null
|
||||
if(istype(user))
|
||||
current_user = user
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(on_mob_move))
|
||||
|
||||
/obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
if(aiming)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
teletarget = com.target
|
||||
|
||||
addtimer(CALLBACK(src, .proc/pop, teletarget), 30)
|
||||
addtimer(CALLBACK(src, PROC_REF(pop), teletarget), 30)
|
||||
|
||||
/obj/effect/nettingportal/proc/pop(teletarget)
|
||||
if(teletarget)
|
||||
|
||||
@@ -384,8 +384,8 @@
|
||||
/obj/structure/closet/decay/Initialize(mapload)
|
||||
. = ..()
|
||||
if(auto_destroy)
|
||||
addtimer(CALLBACK(src, .proc/bust_open), 5 MINUTES)
|
||||
addtimer(CALLBACK(src, .proc/magicly_lock), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(bust_open)), 5 MINUTES)
|
||||
addtimer(CALLBACK(src, PROC_REF(magicly_lock)), 5)
|
||||
|
||||
/obj/structure/closet/decay/proc/magicly_lock()
|
||||
if(!welded)
|
||||
@@ -399,7 +399,7 @@
|
||||
|
||||
/obj/structure/closet/decay/proc/decay()
|
||||
animate(src, alpha = 0, time = 30)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 30)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src), 30)
|
||||
|
||||
/obj/structure/closet/decay/open(mob/living/user)
|
||||
. = ..()
|
||||
@@ -407,12 +407,12 @@
|
||||
if(icon_state == magic_icon) //check if we used the magic icon at all before giving it the lesser magic icon
|
||||
unmagify()
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(decay)), 15 SECONDS)
|
||||
|
||||
/obj/structure/closet/decay/proc/unmagify()
|
||||
icon_state = weakened_icon
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(decay)), 15 SECONDS)
|
||||
icon_welded = "welded"
|
||||
|
||||
/obj/item/projectile/magic/aoe
|
||||
@@ -503,7 +503,7 @@
|
||||
return BULLET_ACT_BLOCK
|
||||
var/turf/T = get_turf(target)
|
||||
for(var/i=0, i<50, i+=10)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(explosion), T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)
|
||||
|
||||
/obj/item/projectile/magic/nuclear
|
||||
name = "\proper blazing manliness"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
hal_target.client.images += blood
|
||||
animate(blood, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = 5)
|
||||
addtimer(CALLBACK(src, .proc/cleanup_blood), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(cleanup_blood)), 5)
|
||||
|
||||
/obj/item/projectile/hallucination/proc/cleanup_blood(image/blood)
|
||||
hal_target.client.images -= blood
|
||||
|
||||
Reference in New Issue
Block a user