diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 515d7722ecf..76e1e09f644 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -1717,8 +1717,7 @@
if(istype(S, type))
continue
S.charge_counter = delay
- spawn(0)
- S.start_recharge()
+ addtimer(S, "start_recharge", 0)
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
for(var/mob/dead/observer/G in dead_mob_list)
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 2f7d234255b..6d4333f511a 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -117,8 +117,7 @@
if(D.operating)
D.nextstate = CLOSED
else if(!D.density)
- spawn(0)
- D.close()
+ addtimer(D, "close", 0)
for(var/obj/machinery/firealarm/F in RA)
F.update_icon()
for (var/obj/machinery/camera/C in RA)
@@ -143,8 +142,7 @@
if(D.operating)
D.nextstate = OPEN
else if(D.density)
- spawn(0)
- D.open()
+ addtimer(D, "open", 0)
for(var/obj/machinery/firealarm/F in RA)
F.update_icon()
@@ -177,8 +175,7 @@
for (var/mob/living/silicon/SILICON in player_list)
if(SILICON.triggerAlarm("Burglar", src, cameras, trigger))
//Cancel silicon alert after 1 minute
- spawn(600)
- SILICON.cancelAlarm("Burglar", src, trigger)
+ addtimer(SILICON, "cancelAlarm", 600, FALSE,"Burglar",src,trigger)
/area/proc/set_fire_alarm_effect()
fire = 1
@@ -218,9 +215,7 @@
if(D.operating)
D.nextstate = OPEN
else if(D.density)
- spawn(0)
- D.open()
- return
+ addtimer(D, "open", 0)
/area/proc/updateicon()
if ((fire || eject || party) && (!requires_power||power_environ))//If it doesn't require power, can still activate this proc.
diff --git a/code/game/gamemodes/clock_cult/clock_ratvar.dm b/code/game/gamemodes/clock_cult/clock_ratvar.dm
index e00a69efbee..831bbb18857 100644
--- a/code/game/gamemodes/clock_cult/clock_ratvar.dm
+++ b/code/game/gamemodes/clock_cult/clock_ratvar.dm
@@ -196,8 +196,7 @@
var/image/alert_overlay = image('icons/effects/clockwork_effects.dmi', "ratvar_alert")
var/area/A = get_area(src)
notify_ghosts("The Justiciar's light calls to you! Reach out to Ratvar in [A.name] to be granted a shell to spread his glory!", null, source = src, alert_overlay = alert_overlay)
- spawn(50)
- SSshuttle.emergency.request(null, 0.3)
+ addtimer(SSshuttle.emergency, "request", 50, FALSE, null, 0.3)
/obj/structure/clockwork/massive/ratvar/Destroy()
diff --git a/code/game/gamemodes/handofgod/structures.dm b/code/game/gamemodes/handofgod/structures.dm
index c33975c336a..2e85511d805 100644
--- a/code/game/gamemodes/handofgod/structures.dm
+++ b/code/game/gamemodes/handofgod/structures.dm
@@ -451,9 +451,7 @@
user << "The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards."
user.reagents.add_reagent("godblood",20)
update_icons()
- spawn(time_between_uses)
- if(src)
- update_icons()
+ addtimer(src, "update_icons", time_between_uses)
/obj/structure/divine/healingfountain/update_icons()
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index ce4ad5aa05a..a39f013f5eb 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -96,9 +96,7 @@
if(can_use())
cameranet.addCamera(src)
emped = 0 //Resets the consecutive EMP count
- spawn(100)
- if(!qdeleted(src))
- cancelCameraAlarm()
+ addtimer(src, "cancelCameraAlarm", 100)
for(var/mob/O in mob_list)
if (O.client && O.client.eye == src)
O.unset_machine()
@@ -282,9 +280,7 @@
if(status)
change_msg = "reactivates"
triggerCameraAlarm()
- spawn(100)
- if(!qdeleted(src))
- cancelCameraAlarm()
+ addtimer(src, "cancelCameraAlarm", 100)
if(displaymessage)
if(user)
visible_message("[user] [change_msg] [src]!")
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index ca136bbf26b..70d099b1228 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -108,8 +108,7 @@
user.reset_perspective(C)
watchers[user] = C
use_power(50)
- spawn(5)
- use_camera_console(user)
+ addtimer(src, "use_camera_console", 5, FALSE, user)
else
user.unset_machine()
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index 262fc4e42a8..420c7cba9c6 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -22,8 +22,6 @@
..()
spawn(5)
updatemodules()
- return
- return
/obj/machinery/computer/cloning/process()
if(!(scanner && pod1 && autoprocess))
@@ -401,4 +399,4 @@
R.fields["mind"] = "\ref[subject.mind]"
src.records += R
- scantemp = "Subject successfully scanned."
\ No newline at end of file
+ scantemp = "Subject successfully scanned."
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 0f09567dbe0..b277e7b5e8d 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -48,7 +48,8 @@
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "
£%@%(*$%&(£&?*(%&£/{}"
- spawn(100*length(src.linkedServer.decryptkey)) UnmagConsole()
+ var/time = 100 * length(src.linkedServer.decryptkey)
+ addtimer(src, "UnmagConsole", time)
message = rebootmsg
else
user << "A no server error appears on the screen."
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index dd14f9920a9..cf3b596ca11 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -92,8 +92,7 @@
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(door.density)
continue
- spawn(0)
- door.close()
+ addtimer(door, "close", 0)
for(var/obj/structure/closet/secure_closet/brig/C in targets)
if(C.broken)
@@ -122,8 +121,7 @@
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(!door.density)
continue
- spawn(0)
- door.open()
+ addtimer(door, "open", 0)
for(var/obj/structure/closet/secure_closet/brig/C in targets)
if(C.broken)
diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm
index 02de1393820..af93cc9987b 100644
--- a/code/game/machinery/embedded_controller/embedded_controller_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm
@@ -58,10 +58,10 @@
if(program)
program.receive_user_command(href_list["command"])
- spawn(5) program.process()
+ addtimer(program, "process", 5)
usr.set_machine(src)
- spawn(5) src.updateDialog()
+ addtimer(src, "updateDialog", 5)
/obj/machinery/embedded_controller/process()
if(program)
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index 56267483da4..9d6f5fc555e 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -134,8 +134,7 @@
on = !on
if(on)
- spawn()
- magnetic_process()
+ addtimer(src, "magnetic_process", 0)
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 4cebbf7c5ce..492aab08a48 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -55,7 +55,7 @@
if(1)
temptext = "Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind."
src.updateUsrDialog()
- spawn(rand(50,200)) selfdestruct()
+ addtimer(src, "selfdestruct", rand(50, 200))
return
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 0903c6595dd..e9d510ef459 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -362,9 +362,8 @@
RC.reagents.trans_to(reactants, RC.reagents.total_volume*fraction, 1, 1, 1)
chem_splash(get_turf(src), spread_range, list(reactants), temp_boost)
- spawn(10)
- detonate() // Detonate it again in one second, until it's out of juice.
-
+ // Detonate it again in one second, until it's out of juice.
+ addtimer(src, "detonate", 10)
// If it's not a time release bomb, do normal explosion
diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm
index 9d061f39e39..1bc6ff16347 100644
--- a/code/game/mecha/equipment/mecha_equipment.dm
+++ b/code/game/mecha/equipment/mecha_equipment.dm
@@ -85,8 +85,7 @@
/obj/item/mecha_parts/mecha_equipment/proc/start_cooldown()
set_ready_state(0)
chassis.use_power(energy_drain)
- spawn(equip_cooldown)
- set_ready_state(1)
+ addtimer(src, "set_ready_state", equip_cooldown, FALSE, 1)
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target)
if(!chassis)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index ec0baa33681..4c2ccc7f56f 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -63,8 +63,7 @@
/obj/item/mecha_parts/mecha_equipment/weapon/energy/start_cooldown()
set_ready_state(0)
chassis.use_power(energy_drain*get_shot_amount())
- spawn(equip_cooldown)
- set_ready_state(1)
+ addtimer(src, "set_ready_state", equip_cooldown, FALSE, 1)
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
equip_cooldown = 8
@@ -340,10 +339,7 @@
var/turf/T = get_turf(src)
message_admins("[key_name(chassis.occupant, chassis.occupant.client)](?) fired a [src] in ([T.x],[T.y],[T.z] - JMP)",0,1)
log_game("[key_name(chassis.occupant)] fired a [src] ([T.x],[T.y],[T.z])")
- spawn(det_time)
- if(F)
- F.prime()
-
+ addtimer(F, "prime", det_time)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
name = "\improper SOB-3 grenade launcher"
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index ba483631882..2a15a49fdac 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -383,7 +383,6 @@
speech_bubble_recipients.Add(M.client)
spawn(0)
flick_overlay(image('icons/mob/talk.dmi', src, "machine[say_test(raw_message)]",MOB_LAYER+1), speech_bubble_recipients, 30)
- return
////////////////////////////
///// Action processing ////
@@ -430,7 +429,6 @@
melee_can_hit = 0
spawn(melee_cooldown)
melee_can_hit = 1
- return
/obj/mecha/proc/range_action(atom/target)
@@ -1011,4 +1009,4 @@ var/year_integer = text2num(year) // = 2013???
/obj/mecha/update_remote_sight(mob/living/user)
if(occupant_sight_flags)
if(user == occupant)
- user.sight |= occupant_sight_flags
\ No newline at end of file
+ user.sight |= occupant_sight_flags
diff --git a/code/game/objects/items/body_egg.dm b/code/game/objects/items/body_egg.dm
index a1d2c50ffcb..3c27e321894 100644
--- a/code/game/objects/items/body_egg.dm
+++ b/code/game/objects/items/body_egg.dm
@@ -20,16 +20,14 @@
owner.status_flags |= XENO_HOST
START_PROCESSING(SSobj, src)
owner.med_hud_set_status()
- spawn(0)
- AddInfectionImages(owner)
+ addtimer(src, "AddInfectionImages", 0, FALSE, owner)
/obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0)
STOP_PROCESSING(SSobj, src)
if(owner)
owner.status_flags &= ~(XENO_HOST)
owner.med_hud_set_status()
- spawn(0)
- RemoveInfectionImages(owner)
+ addtimer(src, "RemoveInfectionImages", 0, FALSE, owner)
..()
/obj/item/organ/body_egg/process()
@@ -51,4 +49,4 @@
return
/obj/item/organ/body_egg/proc/RemoveInfectionImages()
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index b15a70a3488..373e4558dd4 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -92,8 +92,7 @@
target.add_overlay(image_overlay, 1)
user << "You plant the bomb. Timer counting down from [timer]."
- spawn(timer*10)
- explode()
+ addtimer(src, "explode", timer * 10)
/obj/item/weapon/c4/proc/explode()
if(qdeleted(src))
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 95a520bd1b4..87f361041c0 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -45,8 +45,7 @@
var/mob/living/carbon/C = user
C.throw_mode_on()
- spawn(det_time)
- prime()
+ addtimer(src, "prime", det_time)
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
diff --git a/code/game/objects/items/weapons/grenades/clusterbuster.dm b/code/game/objects/items/weapons/grenades/clusterbuster.dm
index 4c37eb05a0d..b685a65bac2 100644
--- a/code/game/objects/items/weapons/grenades/clusterbuster.dm
+++ b/code/game/objects/items/weapons/grenades/clusterbuster.dm
@@ -43,9 +43,7 @@
payload = payload_type
active = 1
walk_away(src,loc,rand(1,4))
- spawn(rand(15,60))
- prime()
-
+ addtimer(src, "prime", rand(15,60))
/obj/item/weapon/grenade/clusterbuster/segment/prime()
@@ -127,4 +125,4 @@
/obj/item/weapon/grenade/clusterbuster/clf3
name = "WELCOME TO HELL"
- payload = /obj/item/weapon/grenade/chem_grenade/clf3
\ No newline at end of file
+ payload = /obj/item/weapon/grenade/chem_grenade/clf3
diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm
index 739ff32eb18..7c02af54709 100644
--- a/code/game/objects/items/weapons/grenades/ghettobomb.dm
+++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm
@@ -55,8 +55,7 @@
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
- spawn(det_time)
- prime()
+ addtimer(src, "prime", det_time)
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
update_mob()
diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm
index be576ce514b..f3a18dfaa56 100644
--- a/code/game/objects/structures/aliens.dm
+++ b/code/game/objects/structures/aliens.dm
@@ -186,9 +186,7 @@
if(istype(loc, /turf/open/space))
qdel(src)
return
- spawn(rand(150, 200))
- if(src)
- Life()
+ addtimer(src, "Life", rand(150, 200))
/obj/structure/alien/weeds/Destroy()
linked_node = null
@@ -264,8 +262,7 @@
/obj/structure/alien/egg/New()
new /obj/item/clothing/mask/facehugger(src)
..()
- spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
- Grow()
+ addtimer(src, "Grow", rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
/obj/structure/alien/egg/Destroy()
remove_from_proximity_list(src, 1)
@@ -353,4 +350,4 @@
#undef GROWING
#undef GROWN
#undef MIN_GROWTH_TIME
-#undef MAX_GROWTH_TIME
\ No newline at end of file
+#undef MAX_GROWTH_TIME
diff --git a/code/game/objects/structures/hivebot.dm b/code/game/objects/structures/hivebot.dm
index 02969f8a79a..519e54ee668 100644
--- a/code/game/objects/structures/hivebot.dm
+++ b/code/game/objects/structures/hivebot.dm
@@ -15,8 +15,7 @@
smoke.start()
visible_message("The [src] warps in!")
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
- spawn(rand(10,600))
- warpbots()
+ addtimer(src, "warpbots", rand(10, 600))
/obj/structure/hivebot_beacon/proc/warpbots()
icon_state = "def_radar"
@@ -34,4 +33,4 @@
visible_message("The [src] warps out!")
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
qdel(src)
- return
\ No newline at end of file
+ return
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index 72b3591f831..9b76ccbc2e4 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -102,9 +102,7 @@
pulse(0)
audible_message("\icon[src] *beep* *beep*", null, 3)
cooldown = 2
- spawn(10)
- process_cooldown()
- return
+ addtimer(src, "process_cooldown", 10)
/obj/item/device/assembly/infra/interact(mob/user)//TODO: change this this to the wire control panel
if(is_secured(user))
diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm
index a80429b5416..083709793b0 100644
--- a/code/modules/assembly/proximity.dm
+++ b/code/modules/assembly/proximity.dm
@@ -64,8 +64,7 @@
pulse(0)
audible_message("\icon[src] *beep* *beep*", null, 3)
cooldown = 2
- spawn(10)
- process_cooldown()
+ addtimer(src, "process_cooldown", 10)
/obj/item/device/assembly/prox_sensor/process()
@@ -80,8 +79,7 @@
/obj/item/device/assembly/prox_sensor/dropped()
..()
if(scanning)
- spawn(0)
- sense()
+ addtimer(src, "sense", 0)
/obj/item/device/assembly/prox_sensor/toggle_scan(scan)
diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm
index 6db052067b3..5f9df788728 100644
--- a/code/modules/clothing/glasses/engine_goggles.dm
+++ b/code/modules/clothing/glasses/engine_goggles.dm
@@ -67,8 +67,7 @@
O.invisibility = 0
invis_objects += O
- spawn(5)
- invis_update()
+ addtimer(src, "invis_update", 5)
/obj/item/clothing/glasses/meson/engine/proc/invis_update()
for(var/obj/O in invis_objects)
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 33f19a97371..40f290aa304 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -125,8 +125,7 @@
/datum/spacevine_mutation/space_covering/on_death(obj/effect/spacevine/holder)
if(istype(holder.loc, /turf/open/floor/vines))
var/turf/open/spaceturf = holder.loc
- spawn(0)
- spaceturf.ChangeTurf(/turf/open/space)
+ spaceturf.ChangeTurf(/turf/open/space)
/datum/spacevine_mutation/bluespace
name = "bluespace"
diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm
index 83724c659d3..78672c7f895 100644
--- a/code/modules/food_and_drinks/drinks/drinks.dm
+++ b/code/modules/food_and_drinks/drinks/drinks.dm
@@ -77,10 +77,7 @@
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
var/mob/living/silicon/robot/bro = user
bro.cell.use(30)
- spawn(600)
- reagents.add_reagent(refill, trans)
-
- return
+ addtimer(reagents, "add_reagent", 600, FALSE, refill, trans)
/obj/item/weapon/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params)
if(I.is_hot())
diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm
index ff5081f4fe6..d3212cd40ef 100644
--- a/code/modules/mining/equipment.dm
+++ b/code/modules/mining/equipment.dm
@@ -154,9 +154,7 @@
L.Weaken(3)
if(ishuman(L))
shake_camera(L, 20, 1)
- spawn(20)
- if(L)
- L.vomit(20)
+ addtimer(L, "vomit", 20)
/**********************Resonator**********************/
@@ -483,4 +481,4 @@
C.preserved = 1
feedback_add_details("hivelord_core", "[C.type]|stabilizer") // preserved
user << "You inject the [M] with the stabilizer. It will no longer go inert."
- qdel(src)
\ No newline at end of file
+ qdel(src)
diff --git a/code/modules/mob/interactive.dm b/code/modules/mob/interactive.dm
index 8e7998e8554..ac9f6d110ab 100644
--- a/code/modules/mob/interactive.dm
+++ b/code/modules/mob/interactive.dm
@@ -734,8 +734,7 @@
tryWalk(TARGET)
LAST_TARGET = TARGET
if(alternateProcessing)
- spawn(processTime)
- doProcess()
+ addtimer(src, "doProcess", processTime)
/mob/living/carbon/human/interactive/proc/favouredObjIn(var/list/inList)
var/list/outList = list()
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 25b62417d9c..1957d1d9f21 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -131,8 +131,7 @@
m_type = 2
if(((dna.features["wings"] != "None") && !("wings" in dna.species.mutant_bodyparts)))
OpenWings()
- spawn(20)
- CloseWings()
+ addtimer(src, "CloseWings", 20)
if ("wings")
if (!src.restrained())
@@ -414,4 +413,4 @@
if("wingsopen" in dna.species.mutant_bodyparts)
dna.species.mutant_bodyparts -= "wingsopen"
dna.species.mutant_bodyparts |= "wings"
- update_body()
\ No newline at end of file
+ update_body()
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index b912f1a4ae6..5e7f0db84a4 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -718,8 +718,7 @@
if (prob(85))
Stun(2)
step(src,get_dir(M,src))
- spawn(5)
- step(src,get_dir(M,src))
+ addtimer(src, "step", 5, FALSE, src, get_dir(M, src))
add_logs(M, src, "pushed")
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
visible_message("[M] has forced back [src]!", \
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index 1d33bd97bd3..32cfbee26a9 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -306,15 +306,13 @@ Auto Patrol[]"},
target = null
last_found = world.time
frustration = 0
- spawn(0)
- handle_automated_action() //ensure bot quickly responds
+ addtimer(src, "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
- spawn(0)
- handle_automated_action() //ensure bot quickly responds
+ addtimer(src, "handle_automated_action", 0) //ensure bot quickly responds
// look for a criminal in view of the bot
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index 8b29777419a..502b2105f59 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -117,10 +117,8 @@
visible_message("\"Die.\"")
sleep(10)
- spawn()
- spiral_shoot()
- spawn()
- spiral_shoot(1)
+ addtimer(src, "spiral_shoot", 0)
+ addtimer(src, "spiral_shoot", 0, FALSE, 1)
/mob/living/simple_animal/hostile/megafauna/colossus/proc/spiral_shoot(negative = 0)
spawn()
@@ -327,4 +325,4 @@
return
/obj/machinery/smartfridge/black_box/default_deconstruction_crowbar()
- return
\ No newline at end of file
+ return
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
index 431881a0ed1..12fd124deee 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
@@ -154,8 +154,7 @@
retreat_distance = 10
minimum_distance = 10
if(will_burrow)
- spawn(chase_time)
- Burrow()
+ addtimer(src, "Burrow", chase_time)
/mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget()
if(istype(target, /obj/item/weapon/ore))
@@ -344,8 +343,7 @@
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/New()
..()
- spawn(100)
- death()
+ addtimer(src, "death", 100)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood
name = "blood brood"
@@ -501,8 +499,7 @@
if(istype(turftype, /turf/closed/mineral))
var/turf/closed/mineral/M = turftype
M.gets_drilled()
- spawn(10)
- Trip()
+ addtimer(src, "Trip", 10)
/obj/effect/goliath_tentacle/original
@@ -653,8 +650,7 @@
environment_smash = 2
mob_size = MOB_SIZE_LARGE
speed = 1
- spawn(100)
- Deflate()
+ addtimer(src, "Deflate", 100)
/mob/living/simple_animal/hostile/asteroid/fugu/proc/Deflate()
if(wumbo)
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index d5a8db49af8..367fcbb6a35 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -393,8 +393,7 @@
else if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal))
else if(!AIproc)
- spawn()
- AIprocess()
+ addtimer(src, "AIprocess", 0)
/mob/living/simple_animal/slime/handle_automated_movement()
return //slime random movement is currently handled in handle_targets()
diff --git a/code/modules/projectiles/guns/grenade_launcher.dm b/code/modules/projectiles/guns/grenade_launcher.dm
index 524568e28c8..a5f140cf9c9 100644
--- a/code/modules/projectiles/guns/grenade_launcher.dm
+++ b/code/modules/projectiles/guns/grenade_launcher.dm
@@ -50,5 +50,4 @@
F.active = 1
F.icon_state = initial(icon_state) + "_active"
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
- spawn(15)
- F.prime()
+ addtimer(F, "prime", 15)
diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm
index bb43bbc019b..44a85775453 100644
--- a/code/modules/projectiles/guns/medbeam.dm
+++ b/code/modules/projectiles/guns/medbeam.dm
@@ -47,8 +47,7 @@
current_target = target
active = 1
current_beam = new(user,current_target,time=6000,beam_icon_state="medbeam",btype=/obj/effect/ebeam/medical)
- spawn(0)
- current_beam.Start()
+ addtimer(current_beam, "Start", 0)
feedback_add_details("gun_fired","[src.type]")
diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm
index 3cd537d41ad..ce5682ecb73 100644
--- a/code/modules/projectiles/projectile/energy.dm
+++ b/code/modules/projectiles/projectile/energy.dm
@@ -29,8 +29,7 @@
if(C.dna && C.dna.check_mutation(HULK))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
else if(C.status_flags & CANWEAKEN)
- spawn(5)
- C.do_jitter_animation(jitter)
+ addtimer(C, "do_jitter_animation", 5, FALSE, jitter)
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
@@ -188,4 +187,4 @@
. = ..()
if(isliving(target))
tesla_zap(src, 3, 10000)
- qdel(chain)
\ No newline at end of file
+ qdel(chain)