[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:
Kyle Spier-Swenson
2017-01-04 16:02:56 +13:00
committed by oranges
parent fd337f0741
commit bee4b132a3
183 changed files with 358 additions and 376 deletions
+4 -4
View File
@@ -118,13 +118,13 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
var/old_color = color
color = "#960000"
animate(src, color = old_color, time = 10)
addtimer(src, "update_atom_colour", 10)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
/mob/dead/observer/ratvar_act()
var/old_color = color
color = "#FAE48C"
animate(src, color = old_color, time = 10)
addtimer(src, "update_atom_colour", 10)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
/mob/dead/observer/Destroy()
ghost_images_full -= ghostimage
@@ -501,14 +501,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
listclearnulls(ghost_images_default)
listclearnulls(ghost_images_simple)
listclearnulls(ghost_darkness_images)
for (var/mob/dead/observer/O in player_list)
O.updateghostimages()
/mob/dead/observer/proc/updateghostimages()
if (!client)
return
if(lastsetting)
switch(lastsetting) //checks the setting we last came from, for a little efficiency so we don't try to delete images from the client that it doesn't have anyway
if(GHOST_OTHERS_THEIR_SETTING)
+1 -1
View File
@@ -743,7 +743,7 @@
tryWalk(TARGET)
LAST_TARGET = TARGET
if(alternateProcessing)
addtimer(src, "doProcess", processTime)
addtimer(CALLBACK(src, .proc/doProcess), processTime)
/mob/living/carbon/human/interactive/proc/favouredObjIn(var/list/inList)
var/list/outList = list()
+1 -1
View File
@@ -40,7 +40,7 @@ var/global/posibrain_notif_cooldown = 0
notify_ghosts("[name] [msg] in [get_area(src)]!", ghost_sound = !newlymade ? 'sound/effects/ghost2.ogg':null, enter_link = "<a href=?src=\ref[src];activate=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
if(!newlymade)
posibrain_notif_cooldown = 1
addtimer(src, "reset_posibrain_cooldown", askDelay, TIMER_NORMAL)
addtimer(CALLBACK(src, .proc/reset_posibrain_cooldown), askDelay)
/obj/item/device/mmi/posibrain/proc/reset_posibrain_cooldown()
posibrain_notif_cooldown = 0
@@ -33,7 +33,7 @@
if(ticker && ticker.mode)
sql_report_death(src)
if(mind && mind.devilinfo)
addtimer(mind.devilinfo, "beginResurrectionCheck", 0, TIMER_NORMAL, src)
addtimer(CALLBACK(mind.devilinfo, /datum/devilinfo.proc/beginResurrectionCheck, src), 0)
/mob/living/carbon/human/proc/makeSkeleton()
status_flags |= DISFIGURED
@@ -729,7 +729,7 @@
var/static/image/electrocution_skeleton_anim = image(icon = icon, icon_state = "electrocuted_base")
electrocution_skeleton_anim.appearance_flags = RESET_COLOR
add_overlay(electrocution_skeleton_anim)
addtimer(src, "end_electrocution_animation", anim_duration, TIMER_NORMAL, electrocution_skeleton_anim)
addtimer(CALLBACK(src, .proc/end_electrocution_animation, electrocution_skeleton_anim), anim_duration)
else //or just do a generic animation
flick_overlay_view(image(icon,src,"electrocuted_generic",ABOVE_MOB_LAYER), src, anim_duration)
@@ -842,7 +842,7 @@
if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits))
H << "<span class='danger'>Your hair starts to \
fall out in clumps...<span>"
addtimer(src, "go_bald", 50, TIMER_UNIQUE, H)
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
if(75 to 100)
if(prob(1))
@@ -366,7 +366,7 @@
var/mob/living/carbon/human/H = owner
H.visible_message("<span class='warning'>[H] starts vibrating!</span>", "<span class='danger'>You start charging your bluespace core...</span>")
playsound(get_turf(H), 'sound/weapons/flash.ogg', 25, 1)
addtimer(src, "teleport", 15, TIMER_NORMAL, H)
addtimer(CALLBACK(src, .proc/teleport, H), 15)
/datum/action/innate/unstable_teleport/proc/teleport(mob/living/carbon/human/H)
H.visible_message("<span class='warning'>[H] disappears in a shower of sparks!</span>", "<span class='danger'>You teleport!</span>")
+1 -1
View File
@@ -124,7 +124,7 @@
H.CloseWings()
else
H.OpenWings()
addtimer(H, "[open ? "Open" : "Close"]Wings", wing_time)
addtimer(CALLBACK(H, open ? /mob/living/carbon/human.proc/OpenWings : /mob/living/carbon/human.proc/CloseWings), wing_time)
/datum/emote/living/flap/aflap
key = "aflap"
+1 -1
View File
@@ -338,7 +338,7 @@
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
if(get_eye_protection() < intensity && (override_blindness_check || !(disabilities & BLIND)))
overlay_fullscreen("flash", type)
addtimer(src, "clear_fullscreen", 25, TIMER_NORMAL, "flash", 25)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
return 1
//called when the mob receives a loud bang
+1 -1
View File
@@ -167,7 +167,7 @@
blind_eyes(1)
update_sight()
src << "You've lost power!"
addtimer(src, "start_RestorePowerRoutine", 20)
addtimer(CALLBACK(src, .proc/start_RestorePowerRoutine), 20)
#undef POWER_RESTORATION_OFF
#undef POWER_RESTORATION_START
+1 -1
View File
@@ -119,7 +119,7 @@
AR.Grant(src)
AL.Grant(src)
emittersemicd = TRUE
addtimer(src, "emittercool", 600)
addtimer(CALLBACK(src, .proc/emittercool), 600)
/mob/living/silicon/pai/make_laws()
laws = new /datum/ai_laws/pai()
@@ -17,7 +17,7 @@
return FALSE
emittersemicd = TRUE
addtimer(src, "emittercool", emittercd)
addtimer(CALLBACK(src, .proc/emittercool), emittercd)
canmove = TRUE
density = TRUE
if(istype(card.loc, /obj/item/device/pda))
@@ -46,9 +46,9 @@
/mob/living/silicon/pai/proc/fold_in(force = FALSE)
emittersemicd = TRUE
if(!force)
addtimer(src, "emittercool", emittercd)
addtimer(CALLBACK(src, .proc/emittercool), emittercd)
else
addtimer(src, "emittercool", emitteroverloadcd)
addtimer(CALLBACK(src, .proc/emittercool), emitteroverloadcd)
icon_state = "[chassis]"
if(!holoform)
. = fold_out(force)
@@ -178,7 +178,7 @@
R.module = RM
R.update_module_innate()
RM.rebuild_modules()
addtimer(RM, "do_transform_animation", 0)
addtimer(CALLBACK(RM, .proc/do_transform_animation), 0)
qdel(src)
return RM
@@ -306,13 +306,13 @@ Auto Patrol[]"},
target = null
last_found = world.time
frustration = 0
addtimer(src, "handle_automated_action", 0) //ensure bot quickly responds
addtimer(CALLBACK(src, .proc/handle_automated_action), 0) //ensure bot quickly responds
/mob/living/simple_animal/bot/ed209/proc/back_to_hunt()
anchored = 0
frustration = 0
mode = BOT_HUNT
addtimer(src, "handle_automated_action", 0) //ensure bot quickly responds
addtimer(CALLBACK(src, .proc/handle_automated_action), 0) //ensure bot quickly responds
// look for a criminal in view of the bot
@@ -61,7 +61,7 @@
anchored = A.anchored
density = A.density
appearance = A.appearance
addtimer(src, "disable", 600, TIMER_NORMAL)
addtimer(CALLBACK(src, .proc/disable), 600)
/obj/guardian_bomb/proc/disable()
stored_obj.forceMove(get_turf(src))
@@ -421,7 +421,7 @@
/mob/living/simple_animal/hostile/proc/GainPatience()
if(lose_patience_timeout)
LosePatience()
lose_patience_timer_id = addtimer(src, "LoseTarget", lose_patience_timeout)
lose_patience_timer_id = addtimer(CALLBACK(src, .proc/LoseTarget), lose_patience_timeout)
/mob/living/simple_animal/hostile/proc/LosePatience()
@@ -432,7 +432,7 @@
/mob/living/simple_animal/hostile/proc/LoseSearchObjects()
search_objects = 0
deltimer(search_objects_timer_id)
search_objects_timer_id = addtimer(src, "RegainSearchObjects", search_objects_regain_time)
search_objects_timer_id = addtimer(CALLBACK(src, .proc/RegainSearchObjects), search_objects_regain_time)
/mob/living/simple_animal/hostile/proc/RegainSearchObjects(value)
@@ -231,13 +231,13 @@
if(mecha.defense_action && mecha.defense_action.owner && !mecha.defence_mode)
mecha.leg_overload_mode = 0
mecha.defense_action.Activate(TRUE)
addtimer(mecha.defense_action, "Activate", 100, TIMER_NORMAL, FALSE) //10 seconds of defence, then toggle off
addtimer(CALLBACK(mecha.defense_action, /datum/action/innate/mecha/mech_defence_mode.proc/Activate, FALSE), 100) //10 seconds of defence, then toggle off
else if(prob(retreat_chance))
//Speed boost if possible
if(mecha.overload_action && mecha.overload_action.owner && !mecha.leg_overload_mode)
mecha.overload_action.Activate(TRUE)
addtimer(mecha.overload_action, "Activate", 100, TIMER_NORMAL, FALSE) //10 seconds of speeeeed, then toggle off
addtimer(CALLBACK(mecha.overload_action, /datum/action/innate/mecha/mech_defence_mode.proc/Activate, FALSE), 100) //10 seconds of speeeeed, then toggle off
retreat_distance = 50
spawn(100)
@@ -88,19 +88,19 @@ Difficulty: Hard
var/warped = FALSE
if(!try_bloodattack())
addtimer(src, "blood_spray", 0)
addtimer(CALLBACK(src, .proc/blood_spray), 0)
warped = blood_warp()
if(warped && prob(100 - anger_modifier))
return
if(prob(90 - anger_modifier) || slaughterlings())
if(health > maxHealth * 0.5)
addtimer(src, "charge", 0)
addtimer(CALLBACK(src, .proc/charge), 0)
else
if(prob(70) || warped)
addtimer(src, "triple_charge", 0)
addtimer(CALLBACK(src, .proc/triple_charge), 0)
else
addtimer(src, "warp_charge", 0)
addtimer(CALLBACK(src, .proc/warp_charge), 0)
/mob/living/simple_animal/hostile/megafauna/bubblegum/New()
@@ -201,7 +201,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/try_bloodattack()
var/list/targets = get_mobs_on_blood()
if(targets.len)
addtimer(src, "bloodattack", 0, TIMER_NORMAL, targets, prob(50))
addtimer(CALLBACK(src, .proc/bloodattack, targets, prob(50)), 0)
return TRUE
return FALSE
@@ -268,7 +268,7 @@ Difficulty: Hard
L.forceMove(targetturf)
playsound(targetturf, 'sound/magic/exit_blood.ogg', 100, 1, -1)
if(L.stat != CONSCIOUS)
addtimer(src, "devour", 2, TIMER_NORMAL, L)
addtimer(CALLBACK(src, .proc/devour, L), 2)
sleep(1)
/obj/effect/overlay/temp/bubblegum_hands
@@ -77,7 +77,7 @@ Difficulty: Very Hard
double_spiral()
else
visible_message("<span class='colossus'>\"<b>Judgement.</b>\"</span>")
addtimer(src, "spiral_shoot", 0, TIMER_NORMAL, rand(0, 1))
addtimer(CALLBACK(src, .proc/spiral_shoot, rand(0, 1)), 0)
else if(prob(20))
ranged_cooldown = world.time + 30
@@ -88,7 +88,7 @@ Difficulty: Very Hard
blast()
else
ranged_cooldown = world.time + 40
addtimer(src, "alternating_dir_shots", 0)
addtimer(CALLBACK(src, .proc/alternating_dir_shots), 0)
/mob/living/simple_animal/hostile/megafauna/colossus/New()
@@ -108,7 +108,7 @@ Difficulty: Very Hard
/obj/effect/overlay/temp/at_shield/New(new_loc, new_target)
..()
target = new_target
addtimer(src, "orbit", 0, TIMER_NORMAL, target, 0, FALSE, 0, 0, FALSE, TRUE)
addtimer(CALLBACK(src, /atom/movable/proc/orbit, target, 0, FALSE, 0, 0, FALSE, TRUE), 0)
/mob/living/simple_animal/hostile/megafauna/colossus/bullet_act(obj/item/projectile/P)
if(!stat)
@@ -139,8 +139,8 @@ Difficulty: Very Hard
visible_message("<span class='colossus'>\"<b>Die.</b>\"</span>")
sleep(10)
addtimer(src, "spiral_shoot", 0)
addtimer(src, "spiral_shoot", 0, TIMER_NORMAL, 1)
addtimer(CALLBACK(src, .proc/spiral_shoot), 0)
addtimer(CALLBACK(src, .proc/spiral_shoot, 1), 0)
/mob/living/simple_animal/hostile/megafauna/colossus/proc/spiral_shoot(negative = 0, counter_start = 1)
var/counter = counter_start
@@ -123,7 +123,7 @@ Difficulty: Medium
/obj/effect/overlay/temp/target/New(loc)
..()
addtimer(src, "fall", 0)
addtimer(CALLBACK(src, .proc/fall), 0)
/obj/effect/overlay/temp/target/proc/fall()
var/turf/T = get_turf(src)
@@ -141,15 +141,15 @@ Difficulty: Medium
if(prob(15 + anger_modifier) && !client)
if(health < maxHealth/2)
addtimer(src, "swoop_attack", 0, TIMER_NORMAL, 1)
addtimer(CALLBACK(src, .proc/swoop_attack, 1), 0)
else
fire_rain()
else if(prob(10+anger_modifier) && !client)
if(health > maxHealth/2)
addtimer(src, "swoop_attack", 0)
addtimer(CALLBACK(src, .proc/swoop_attack), 0)
else
addtimer(src, "triple_swoop", 0)
addtimer(CALLBACK(src, .proc/triple_swoop), 0)
else
fire_walls()
@@ -163,7 +163,7 @@ Difficulty: Medium
playsound(get_turf(src),'sound/magic/Fireball.ogg', 200, 1)
for(var/d in cardinal)
addtimer(src, "fire_wall", 0, TIMER_NORMAL, d)
addtimer(CALLBACK(src, .proc/fire_wall, d), 0)
/mob/living/simple_animal/hostile/megafauna/dragon/proc/fire_wall(dir)
var/list/hit_things = list(src)
@@ -139,7 +139,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/hierophant/AttackingTarget()
if(!blinking)
if(target && isliving(target))
addtimer(src, "melee_blast", 0, TIMER_NORMAL, get_turf(target)) //melee attacks on living mobs produce a 3x3 blast
addtimer(CALLBACK(src, .proc/melee_blast, get_turf(target)), 0) //melee attacks on living mobs produce a 3x3 blast
..()
/mob/living/simple_animal/hostile/megafauna/hierophant/DestroySurroundings()
@@ -215,7 +215,7 @@ Difficulty: Hard
blinking = TRUE
sleep(5)
animate(src, color = oldcolor, time = 8)
addtimer(src, "update_atom_colour", 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
sleep(8)
blinking = FALSE
else
@@ -229,13 +229,13 @@ Difficulty: Hard
cross_counter--
var/delay = 7
if(prob(60))
addtimer(src, "cardinal_blasts", 0, TIMER_NORMAL, target)
addtimer(CALLBACK(src, .proc/cardinal_blasts, target), 0)
else
addtimer(src, "diagonal_blasts", 0, TIMER_NORMAL, target)
addtimer(CALLBACK(src, .proc/diagonal_blasts, target), 0)
delay = 5 //this one isn't so mean, so do the next one faster(if there is one)
sleep(delay)
animate(src, color = oldcolor, time = 8)
addtimer(src, "update_atom_colour", 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
sleep(8)
blinking = FALSE
if("chaser_swarm") //fire four fucking chasers at a target and their friends.
@@ -257,7 +257,7 @@ Difficulty: Hard
sleep(10)
chaser_cooldown = world.time + initial(chaser_cooldown)
animate(src, color = oldcolor, time = 8)
addtimer(src, "update_atom_colour", 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
sleep(8)
blinking = FALSE
return
@@ -268,18 +268,18 @@ Difficulty: Hard
else if(prob(70 - anger_modifier)) //a cross blast of some type
if(prob(anger_modifier)) //at us?
if(prob(anger_modifier * 2) && health < maxHealth * 0.5) //we're super angry do it at all dirs
addtimer(src, "alldir_blasts", 0, TIMER_NORMAL, src)
addtimer(CALLBACK(src, .proc/alldir_blasts, src), 0)
else if(prob(60))
addtimer(src, "cardinal_blasts", 0, TIMER_NORMAL, src)
addtimer(CALLBACK(src, .proc/cardinal_blasts, src), 0)
else
addtimer(src, "diagonal_blasts", 0, TIMER_NORMAL, src)
addtimer(CALLBACK(src, .proc/diagonal_blasts, src), 0)
else //at them?
if(prob(anger_modifier * 2) && health < maxHealth * 0.5 && !target_is_slow) //we're super angry do it at all dirs
addtimer(src, "alldir_blasts", 0, TIMER_NORMAL, target)
addtimer(CALLBACK(src, .proc/alldir_blasts, target), 0)
else if(prob(60))
addtimer(src, "cardinal_blasts", 0, TIMER_NORMAL, target)
addtimer(CALLBACK(src, .proc/cardinal_blasts, target), 0)
else
addtimer(src, "diagonal_blasts", 0, TIMER_NORMAL, target)
addtimer(CALLBACK(src, .proc/diagonal_blasts, target), 0)
else if(chaser_cooldown < world.time) //if chasers are off cooldown, fire some!
var/obj/effect/overlay/temp/hierophant/chaser/C = PoolOrNew(/obj/effect/overlay/temp/hierophant/chaser, list(loc, src, target, chaser_speed, FALSE))
chaser_cooldown = world.time + initial(chaser_cooldown)
@@ -288,7 +288,7 @@ Difficulty: Hard
OC.moving = 4
OC.moving_dir = pick(cardinal - C.moving_dir)
else //just release a burst of power
addtimer(src, "burst", 0, TIMER_NORMAL, get_turf(src))
addtimer(CALLBACK(src, .proc/burst, get_turf(src)), 0)
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/diagonal_blasts(mob/victim) //fire diagonal cross blasts with a delay
var/turf/T = get_turf(victim)
@@ -299,7 +299,7 @@ Difficulty: Hard
sleep(2)
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(T, src, FALSE))
for(var/d in diagonals)
addtimer(src, "blast_wall", 0, TIMER_NORMAL, T, d)
addtimer(CALLBACK(src, .proc/blast_wall, T, d), 0)
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/cardinal_blasts(mob/victim) //fire cardinal cross blasts with a delay
var/turf/T = get_turf(victim)
@@ -310,7 +310,7 @@ Difficulty: Hard
sleep(2)
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(T, src, FALSE))
for(var/d in cardinal)
addtimer(src, "blast_wall", 0, TIMER_NORMAL, T, d)
addtimer(CALLBACK(src, .proc/blast_wall, T, d), 0)
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/alldir_blasts(mob/victim) //fire alldir cross blasts with a delay
var/turf/T = get_turf(victim)
@@ -321,7 +321,7 @@ Difficulty: Hard
sleep(2)
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(T, src, FALSE))
for(var/d in alldirs)
addtimer(src, "blast_wall", 0, TIMER_NORMAL, T, d)
addtimer(CALLBACK(src, .proc/blast_wall, T, d), 0)
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/blast_wall(turf/T, set_dir) //make a wall of blasts beam_range tiles long
var/range = beam_range
@@ -340,13 +340,13 @@ Difficulty: Hard
return
arena_cooldown = world.time + initial(arena_cooldown)
for(var/d in cardinal)
addtimer(src, "arena_squares", 0, TIMER_NORMAL, T, d)
addtimer(CALLBACK(src, .proc/arena_squares, T, d), 0)
for(var/t in RANGE_TURFS(11, T))
if(t && get_dist(t, T) == 11)
new /obj/effect/overlay/temp/hierophant/wall(t)
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, src, FALSE))
if(get_dist(src, T) >= 11) //hey you're out of range I need to get closer to you!
addtimer(src, "blink", 0, TIMER_NORMAL, T)
addtimer(CALLBACK(src, .proc/blink, T), 0)
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/arena_squares(turf/T, set_dir) //make a fancy effect extending from the arena target
var/turf/previousturf = T
@@ -487,7 +487,7 @@ Difficulty: Hard
friendly_fire_check = is_friendly_fire
if(new_speed)
speed = new_speed
addtimer(src, "seek_target", 1)
addtimer(CALLBACK(src, .proc/seek_target), 1)
/obj/effect/overlay/temp/hierophant/chaser/proc/get_target_dir()
. = get_cardinal_dir(src, targetturf)
@@ -567,7 +567,7 @@ Difficulty: Hard
if(ismineralturf(loc)) //drill mineral turfs
var/turf/closed/mineral/M = loc
M.gets_drilled(caster)
addtimer(src, "blast", 0)
addtimer(CALLBACK(src, .proc/blast), 0)
/obj/effect/overlay/temp/hierophant/blast/proc/blast()
var/turf/T = get_turf(src)
@@ -629,7 +629,7 @@ Difficulty: Hard
if(H.beacon == src)
user << "<span class='notice'>You start removing your hierophant beacon...</span>"
H.timer = world.time + 51
addtimer(H, "prepare_icon_update", 0)
addtimer(CALLBACK(H, /obj/item/weapon/hierophant_club.proc/prepare_icon_update), 0)
if(do_after(user, 50, target = src))
playsound(src,'sound/magic/Blind.ogg', 200, 1, -4)
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(get_turf(src), user))
@@ -639,7 +639,7 @@ Difficulty: Hard
qdel(src)
else
H.timer = world.time
addtimer(H, "prepare_icon_update", 0)
addtimer(CALLBACK(H, /obj/item/weapon/hierophant_club.proc/prepare_icon_update), 0)
else
user << "<span class='hierophant_warning'>You touch the beacon with the club, but nothing happens.</span>"
else
@@ -78,7 +78,7 @@ Difficulty: Medium
minimum_distance = 0
speed = 0
charging = 1
addtimer(src, "reset_charge", 50)
addtimer(CALLBACK(src, .proc/reset_charge), 50)
/mob/living/simple_animal/hostile/megafauna/legion/proc/reset_charge()
ranged = 1
@@ -156,7 +156,7 @@ var/global/list/AISwarmerCapsByType = list(/mob/living/simple_animal/hostile/swa
/mob/living/simple_animal/hostile/swarmer/ai/proc/StartAction(deci = 0)
stop_automated_movement = TRUE
AIStatus = AI_OFF
addtimer(src, "EndAction", deci, TIMER_NORMAL)
addtimer(CALLBACK(src, .proc/EndAction), deci)
/mob/living/simple_animal/hostile/swarmer/ai/proc/EndAction()
@@ -159,7 +159,7 @@
retreat_distance = 10
minimum_distance = 10
if(will_burrow)
addtimer(src, "Burrow", chase_time)
addtimer(CALLBACK(src, .proc/Burrow), chase_time)
/mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget()
if(istype(target, /obj/item/weapon/ore))
@@ -251,7 +251,7 @@
/obj/item/organ/hivelord_core/New()
..()
addtimer(src, "inert_check", 2400)
addtimer(CALLBACK(src, .proc/inert_check), 2400)
/obj/item/organ/hivelord_core/proc/inert_check()
if(!owner && !preserved)
@@ -339,7 +339,7 @@
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/New()
..()
addtimer(src, "death", 100)
addtimer(CALLBACK(src, .proc/death), 100)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood
name = "blood brood"
@@ -493,7 +493,7 @@
if(ismineralturf(turftype))
var/turf/closed/mineral/M = turftype
M.gets_drilled()
addtimer(src, "Trip", 10)
addtimer(CALLBACK(src, .proc/Trip), 10)
/obj/effect/goliath_tentacle/original
@@ -642,7 +642,7 @@
environment_smash = 2
mob_size = MOB_SIZE_LARGE
speed = 1
addtimer(src, "Deflate", 100)
addtimer(CALLBACK(src, .proc/Deflate), 100)
/mob/living/simple_animal/hostile/asteroid/fugu/proc/Deflate()
if(wumbo)
@@ -65,7 +65,7 @@
/mob/living/simple_animal/hostile/mushroom/adjustHealth(amount, updating_health = TRUE, forced = FALSE) //Possibility to flee from a fight just to make it more visually interesting
if(!retreat_distance && prob(33))
retreat_distance = 5
addtimer(src, "stop_retreat", 30)
addtimer(CALLBACK(src, .proc/stop_retreat), 30)
. = ..()
/mob/living/simple_animal/hostile/mushroom/proc/stop_retreat()
@@ -111,7 +111,7 @@
revive(full_heal = 1)
UpdateMushroomCap()
recovery_cooldown = 1
addtimer(src, "recovery_recharge", 300)
addtimer(CALLBACK(src, .proc/recovery_recharge), 300)
/mob/living/simple_animal/hostile/mushroom/proc/recovery_recharge()
recovery_cooldown = 0
@@ -23,7 +23,7 @@
for(var/turf/T in anchors)
var/datum/beam/B = Beam(T, "vine", time=INFINITY, maxdistance=5, beam_type=/obj/effect/ebeam/vine)
B.sleep_time = 10 //these shouldn't move, so let's slow down updates to 1 second (any slower and the deletion of the vines would be too slow)
addtimer(src, "bear_fruit", growth_time)
addtimer(CALLBACK(src, .proc/bear_fruit), growth_time)
/obj/structure/alien/resin/flower_bud_enemy/proc/bear_fruit()
visible_message("<span class='danger'>the plant has borne fruit!</span>")
@@ -393,7 +393,7 @@
else if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal))
else if(!AIproc)
addtimer(src, "AIprocess", 0)
addtimer(CALLBACK(src, .proc/AIprocess), 0)
/mob/living/simple_animal/slime/handle_automated_movement()
return //slime random movement is currently handled in handle_targets()