mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
[READY]Makes addtimer use callbacks (#22660)
* Makes addtimer use callbacks * I broke the comment * I fucked up the regex * this was a silly idea.
This commit is contained in:
committed by
oranges
parent
fd337f0741
commit
bee4b132a3
@@ -222,7 +222,7 @@
|
||||
/obj/structure/alien/egg/New()
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
..()
|
||||
addtimer(src, "Grow", rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
addtimer(CALLBACK(src, .proc/Grow), rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
|
||||
/obj/structure/alien/egg/Destroy()
|
||||
remove_from_proximity_list(src, 1)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
user << "<span class='notice'>The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.</span>"
|
||||
user.reagents.add_reagent("godblood",20)
|
||||
update_icons()
|
||||
addtimer(src, "update_icons", time_between_uses)
|
||||
addtimer(CALLBACK(src, .proc/update_icons), time_between_uses)
|
||||
|
||||
|
||||
/obj/structure/healingfountain/proc/update_icons()
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
addtimer(src, "update_atom_colour", 8)
|
||||
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
|
||||
|
||||
/obj/structure/grille/ratvar/ratvar_act()
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
smoke.start()
|
||||
visible_message("<span class='boldannounce'>The [src] warps in!</span>")
|
||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
|
||||
addtimer(src, "warpbots", rand(10, 600))
|
||||
addtimer(CALLBACK(src, .proc/warpbots), rand(10, 600))
|
||||
|
||||
/obj/structure/hivebot_beacon/proc/warpbots()
|
||||
icon_state = "def_radar"
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
shockcd = TRUE
|
||||
addtimer(src, "cooldown", 5)
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/user)
|
||||
if(!shockcd)
|
||||
@@ -107,4 +107,4 @@
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
shockcd = TRUE
|
||||
addtimer(src, "cooldown", 5)
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
isSwitchingStates = 0
|
||||
|
||||
if(close_delay != -1)
|
||||
addtimer(src, "Close", close_delay)
|
||||
addtimer(CALLBACK(src, .proc/Close), close_delay)
|
||||
|
||||
/obj/structure/mineral_door/proc/Close()
|
||||
if(isSwitchingStates || state != 1)
|
||||
|
||||
@@ -160,4 +160,4 @@
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
addtimer(src, "update_atom_colour", 8)
|
||||
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
return
|
||||
// Don't break if they're just flying past
|
||||
if(AM.throwing)
|
||||
addtimer(src, "throw_check", 5, TIMER_NORMAL, AM)
|
||||
addtimer(CALLBACK(src, .proc/throw_check, AM), 5)
|
||||
else
|
||||
check_break(AM)
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
addtimer(src, "update_atom_colour", 8)
|
||||
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
|
||||
|
||||
/obj/structure/table/reinforced/brass/ratvar_act()
|
||||
obj_integrity = max_integrity
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
addtimer(src, "update_atom_colour", 8)
|
||||
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/fulltile
|
||||
icon_state = "clockwork_window"
|
||||
|
||||
Reference in New Issue
Block a user