diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 7f70c5ab29e..876b509d48f 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -115,7 +115,7 @@ Pipelines + Other Objects -> Pipe network return 1 playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to unfasten \the [src]..." - if (do_after(user, 40) && !gc_destroyed) + if (do_after(user, 40, target = src) && !gc_destroyed) user.visible_message( \ "[user] unfastens \the [src].", \ "You unfasten \the [src].", \ diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 13c76fad714..459bf870c66 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -275,7 +275,7 @@ if (WT.remove_fuel(0,user)) playsound(loc, 'sound/items/Welder.ogg', 40, 1) user << "You begin welding the vent..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(!src || !WT.isOn()) return playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) if(!welded) diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 35d7b48d8fb..9588baa7ee7 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -253,7 +253,7 @@ if(WT.remove_fuel(0,user)) playsound(loc, 'sound/items/Welder.ogg', 40, 1) user << "Now welding the scrubber." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(!src || !WT.isOn()) return playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index e8b9f7e6230..dd13bdec54e 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -687,7 +687,7 @@ Turf and target are seperate in case you want to teleport some distance from a t for(var/i = 1 to numticks) if(user.client) if(!progbar) - progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = user, "icon_state" = "prog_bar_0") + progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = target, "icon_state" = "prog_bar_0") switch(round(((i / numticks) * 100))) if(-INFINITY to 10) progbar.icon_state = "prog_bar_0" @@ -747,7 +747,7 @@ Turf and target are seperate in case you want to teleport some distance from a t for (var/i = 1 to numticks) if(user.client) if(!progbar) - progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = user, "icon_state" = "prog_bar_0") + progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = target, "icon_state" = "prog_bar_0") switch(round(((i / numticks) * 100))) if(-INFINITY to 10) progbar.icon_state = "prog_bar_0" diff --git a/code/game/dna.dm b/code/game/dna.dm index 128b7aa1fc6..557f026b047 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -409,7 +409,7 @@ user << "You lean on the back of [src] and start pushing the door open... (this will take about [breakout_time] minutes.)" user.visible_message("You hear a metallic creaking from [src]!") - if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked) return diff --git a/code/game/gamemodes/abduction/abduction_gear.dm b/code/game/gamemodes/abduction/abduction_gear.dm index a13b347907c..5c091dca032 100644 --- a/code/game/gamemodes/abduction/abduction_gear.dm +++ b/code/game/gamemodes/abduction/abduction_gear.dm @@ -218,7 +218,7 @@ user << "You need to be next to the specimen to prepare it for transport!" return user << "You start preparing the specimen for transport..." - if(do_after(user, 100)) + if(do_after(user, 100, target = target)) marked = target user << "You finish preparing the specimen for transport." diff --git a/code/game/gamemodes/abduction/machinery/console.dm b/code/game/gamemodes/abduction/machinery/console.dm index 89f37c05ccf..94a321ad72c 100644 --- a/code/game/gamemodes/abduction/machinery/console.dm +++ b/code/game/gamemodes/abduction/machinery/console.dm @@ -41,7 +41,7 @@ return if(!IsAbductor(user)) user << "You start mashing alien buttons at random!" - if(do_after(user,100)) + if(do_after(user,100, target = src)) TeleporterSend() return user.set_machine(src) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 18a63e3ed4f..7f671c28610 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -629,7 +629,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", V.show_message("[user] slices open a finger and begins to chant and paint symbols on the floor.", 3, "You hear chanting.", 2) user << "You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world." user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage - if(do_after(user, 50)) + if(do_after(user, 50, target = user)) if(usr.get_active_hand() != src) return var/mob/living/carbon/human/H = user diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index d6abcab574f..77d9ce4db78 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -285,7 +285,7 @@ thralls++ M << "You feel hooks sink into your mind and pull." - if(!do_after(user, 30)) + if(!do_after(user, 30, target = user)) user << "Your concentration has been broken. The mental hooks you have sent out now retract into your mind." return diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 57819a2d177..013432611ff 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -704,7 +704,7 @@ user.visible_message("[user.name] removes the electronics from [src.name].",\ "You start prying out the circuit...") playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) if (buildstage == 1) user <<"You remove the air alarm electronics." new /obj/item/weapon/airalarm_electronics( src.loc ) @@ -720,7 +720,7 @@ return user.visible_message("[user.name] wires the air alarm.", \ "You start wiring the air alarm...") - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) if (cable.get_amount() >= 5 && buildstage == 1) cable.use(5) user << "You wire the air alarm." @@ -963,7 +963,7 @@ FIRE ALARM playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user.visible_message("[user.name] removes the electronics from [src.name].", \ "You start prying out the circuit...") - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(buildstage == 1) if(stat & BROKEN) user << "You remove the destroyed circuit." diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index d8ba823694b..302860eaef4 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -90,7 +90,7 @@ if (istype(W, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to unfasten \the [src]..." - if (do_after(user, 40)) + if (do_after(user, 40, target = src)) user.visible_message( \ "[user] unfastens \the [src].", \ "You unfasten \the [src].", \ diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index b4ecddd72c7..ce8732af786 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -626,7 +626,7 @@ Auto Patrol[]"}, user << "You need one length of cable to wire the ED-209!" return user << "You start to wire [src]..." - if (do_after(user, 40)) + if (do_after(user, 40, target = src)) if (coil.get_amount() >= 1 && build_step == 6) coil.use(1) build_step = 7 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index ae2204f9da3..27daccf52a4 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -337,7 +337,7 @@ user << "You start to weld [src]..." playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) busy = 1 - if(do_after(user, 100)) + if(do_after(user, 100, target = src)) busy = 0 if(!WT.isOn()) return 0 diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index e5544d1d410..e6f783326dc 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -159,7 +159,7 @@ user << "You start to weld \the [src]..." playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) busy = 1 - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) busy = 0 if(!WT.isOn()) return 0 diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 801e2f82332..5640baf74ab 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -16,7 +16,7 @@ if(istype(P, /obj/item/weapon/wrench)) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You start wrenching the frame into place..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You wrench the frame into place." anchored = 1 state = 1 @@ -27,7 +27,7 @@ return playsound(loc, 'sound/items/Welder.ogg', 50, 1) user << "You start to deconstruct the frame..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(!src || !WT.remove_fuel(0, user)) return user << "You deconstruct the frame." new /obj/item/stack/sheet/plasteel( loc, 4) @@ -36,7 +36,7 @@ if(istype(P, /obj/item/weapon/wrench)) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You start to unfasten the frame..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You unfasten the frame." anchored = 0 state = 0 @@ -70,7 +70,7 @@ if(C.get_amount() >= 5) playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You start to add cables to the frame..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if (C.get_amount() >= 5 && state == 2) C.use(5) user << "You add cables to the frame." @@ -96,7 +96,7 @@ if(G.get_amount() >= 2) playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You start to put in the glass panel..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if (G.get_amount() >= 2 && state == 3) G.use(2) user << "You put in the glass panel." @@ -204,11 +204,11 @@ "You start to [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor...") switch(anchored) if(0) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You fasten the core into place." anchored = 1 if(1) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You unfasten the core." anchored = 0 return diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index be509355564..5f81fcfd38b 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -307,7 +307,7 @@ if(istype(P, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You start wrenching the frame into place..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You wrench the frame into place." anchored = 1 state = 1 @@ -319,7 +319,7 @@ return playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) user << "You start deconstructing the frame..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(!src || !WT.isOn()) return user << "You deconstruct the frame." var/obj/item/stack/sheet/metal/M = new (loc, 5) @@ -329,7 +329,7 @@ if(istype(P, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You start to unfasten the frame..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You unfasten the frame." anchored = 0 state = 0 @@ -369,7 +369,7 @@ if(C.get_amount() >= 5) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You start adding cables to the frame..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(C.get_amount() >= 5 && state == 2) C.use(5) user << "You add cables to the frame." @@ -395,7 +395,7 @@ else playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You start to put in the glass panel..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(G.get_amount() >= 2 && state == 3) G.use(2) user << "You put in the glass panel." diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 18f8925050f..d15ceb4fd69 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -98,7 +98,7 @@ if(istype(I, /obj/item/weapon/screwdriver) && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << " You start to disconnect the monitor..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) A.circuit = circuit A.anchored = 1 diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 471818ca3c4..8a0cc63b0e4 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -68,7 +68,7 @@ for reference: if (istype(W, /obj/item/stack/sheet/mineral/wood)) if (src.health < src.maxhealth) visible_message("[user] begins to repair \the [src]!", "You begin to repair \the [src]...") - if(do_after(user,20)) + if(do_after(user,20, target = src)) src.health = src.maxhealth W:use(1) visible_message("[user] repairs \the [src]!", "You repair \the [src].") diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c7b8dc92fe8..c7fa9504a89 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -909,7 +909,7 @@ About the new airlock wires panel: "You begin [welded ? "unwelding":"welding"] the airlock...", \ "You hear welding.") playsound(loc, 'sound/items/Welder.ogg', 40, 1) - if(do_after(user,40,5,1)) + if(do_after(user,40,5,1, target = src)) if(density && !operating)//Door must be closed to weld. if( !istype(src, /obj/machinery/door/airlock) || !user || !W || !W.isOn() || !user.loc ) return @@ -942,7 +942,7 @@ About the new airlock wires panel: playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", \ "You start to remove electronics from the airlock assembly...") - if(do_after(user,40)) + if(do_after(user,40, target = src)) if(src.loc) if(src.doortype) var/obj/structure/door_assembly/A = new src.doortype(src.loc) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index c679e37cd4c..ffe8867c097 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -278,7 +278,7 @@ playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] removes the electronics from the [src.name].", \ "You start to remove electronics from the [src.name]...") - if(do_after(user,40)) + if(do_after(user,40, target = src)) if(src.p_open && !src.density && !src.operating && src.loc) var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(src.loc) switch(base_state) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index fdea6d8469f..9fcbf18c2cc 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -42,7 +42,7 @@ if (bulb) user.visible_message("[user] begins to disconnect [src]'s flashbulb.", "You begin to disconnect [src]'s flashbulb...") playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - if(do_after(user, 30) && bulb) + if(do_after(user, 30, target = src) && bulb) user.visible_message("[user] has disconnected [src]'s flashbulb!", "You disconnect [src]'s flashbulb.") bulb.loc = src.loc bulb = null diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 1498fa14fe8..2a8d670540f 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -367,7 +367,7 @@ Class Procs: if(istype(W)) user << "You begin [anchored ? "un" : ""]securing [name]..." playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, time)) + if(do_after(user, time, target = src)) user << "You [anchored ? "un" : ""]secure [name]." anchored = !anchored playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 5c3e80e238d..9d11488c079 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -742,7 +742,7 @@ var/list/obj/machinery/newscaster/allCasters = list() if(istype(I, /obj/item/weapon/wrench)) user << "You start [anchored ? "un" : ""]securing [name]..." playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 60)) + if(do_after(user, 60, target = src)) user << "You [anchored ? "un" : ""]secure [name]." new /obj/item/newscaster_frame(loc) playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 9d1be6f4519..2cfbc2a6862 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -79,7 +79,7 @@ if (!anchored && !isinspace()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to fasten \the [src] to the floor..." - if (do_after(user, 40)) + if (do_after(user, 40, target = src)) add_fingerprint(user) user.visible_message( \ "[user] fastens \the [src].", \ @@ -92,7 +92,7 @@ else if(anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to unfasten \the [src] from the floor..." - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) add_fingerprint(user) user.visible_message( \ "[user] unfastens \the [src].", \ diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 188190756d7..ebf7b9005aa 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -709,7 +709,7 @@ playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1) user << "You start to remove the turret's interior metal armor..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) if(!src || !WT.remove_fuel(5, user)) return build_step = 1 user << "You remove the turret's interior metal armor." @@ -785,7 +785,7 @@ playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1) user << "You begin to weld the turret's armor down..." - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) if(!src || !WT.remove_fuel(5, user)) return build_step = 8 diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 2e8aeeecb69..df54f3ab297 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -248,7 +248,7 @@ user << "You need one length of cable to repair [src]!" return user << "You begin to replace the wires..." - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) if(coil.get_amount() < 1) return coil.use(1) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index cc5c8e96fb8..3afcd1d6c31 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -449,7 +449,7 @@ var/breakout_time = 2 user << "You start kicking against the doors to escape... (This will take about [breakout_time] minutes.)" visible_message("You see [user] kicking against the doors of \the [src]!") - if(do_after(user,(breakout_time*60*10))) + if(do_after(user,(breakout_time*60*10), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src || isopen || !islocked) return else diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index b680e468d13..50ebfc1f37a 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -235,7 +235,7 @@ user.last_special = world.time + CLICK_CD_BREAKOUT user << "You struggle against the tight bonds... (This will take about [breakout_time] minutes.)" visible_message("You see something struggling and writhing in \the [src]!") - if(do_after(user,(breakout_time*60*10))) + if(do_after(user,(breakout_time*60*10), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src) return qdel(src) diff --git a/code/game/objects/items/devices/pizza_bomb.dm b/code/game/objects/items/devices/pizza_bomb.dm index cbf2bb7d193..60faa3a6ca1 100644 --- a/code/game/objects/items/devices/pizza_bomb.dm +++ b/code/game/objects/items/devices/pizza_bomb.dm @@ -84,7 +84,7 @@ user << "You can't see the box well enough to cut the wires out!" return user.visible_message("[user] starts removing the payload and wires from \the [src].", "You start removing the payload and wires from \the [src]...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1) user.unEquip(src) user.visible_message("[user] removes the insides of \the [src]!", "You remove the insides of \the [src].") diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index fd5cb821462..840dca7291b 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -283,7 +283,7 @@ /obj/item/device/tape/attackby(obj/item/I, mob/user, params) if(ruined && istype(I, /obj/item/weapon/screwdriver)) user << "You start winding the tape back in..." - if(do_after(user, 120)) + if(do_after(user, 120, target = src)) user << "You wound the tape back in." fix() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index f64f19ef4cf..3ca1e47b662 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -121,7 +121,7 @@ return if (R.time) usr.visible_message("[usr] starts building [R.title].", "You start building [R.title]...") - if (!do_after(usr, R.time)) + if (!do_after(usr, R.time, target = usr)) return if(!building_checks(R, multiplier)) return diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 00d1e1d32e7..1651408301c 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -464,7 +464,7 @@ user << "You start [instant ? "spraying" : "drawing"] a [temp] on the [target.name]..." if(instant) playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5) - if((instant>0) || do_after(user, 50)) + if((instant>0) || do_after(user, 50, target = target)) //Gang functions if(gangID) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 07ea6047cde..2fbbae3645c 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -173,7 +173,7 @@ RCD if(checkResource(3, user)) user << "You start building wall..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = A)) if(!useResource(3, user)) return 0 activate() F.ChangeTurf(/turf/simulated/wall) @@ -192,7 +192,7 @@ RCD if(door_check) user << "You start building airlock..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 50)) + if(do_after(user, 50, target = A)) if(!useResource(10, user)) return 0 activate() var/obj/machinery/door/airlock/T = new airlock_type( A ) @@ -216,7 +216,7 @@ RCD if(checkResource(5, user)) user << "You start deconstructing wall..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = A)) if(!useResource(5, user)) return 0 activate() W.ChangeTurf(/turf/simulated/floor/plating) @@ -231,7 +231,7 @@ RCD else if(checkResource(5, user)) user << "You start deconstructing floor..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 50)) + if(do_after(user, 50, target = A)) if(!useResource(5, user)) return 0 activate() F.ChangeTurf(F.baseturf) @@ -242,7 +242,7 @@ RCD if(checkResource(20, user)) user << "You start deconstructing airlock..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 50)) + if(do_after(user, 50, target = A)) if(!useResource(20, user)) return 0 activate() qdel(A) diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index 511e38c8f71..083c0af51e4 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -534,7 +534,7 @@ var/global/list/RPD_recipes=list( if(istype(A,/obj/item/pipe) || istype(A,/obj/item/pipe_meter) || istype(A,/obj/structure/disposalconstruct)) user << "You start destroying pipe..." playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 5)) + if(do_after(user, 5, target = A)) activate() qdel(A) return 1 @@ -549,7 +549,7 @@ var/global/list/RPD_recipes=list( return 0 user << "You start building pipes..." playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = A)) activate() var/obj/item/pipe/P = new (A, pipe_type=queued_p_type, dir=queued_p_dir) P.flipped = queued_p_flipped @@ -564,7 +564,7 @@ var/global/list/RPD_recipes=list( return 0 user << "You start building meter..." playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = A)) activate() new /obj/item/pipe_meter(A) return 1 @@ -576,7 +576,7 @@ var/global/list/RPD_recipes=list( return 0 user << "You start building pipes..." playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = A)) var/obj/structure/disposalconstruct/C = new (A, queued_p_type ,queued_p_dir) if(!C.can_place()) diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index f2681b01489..b25118371cf 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -49,7 +49,7 @@ user << "You need to take that [target.name] off before cleaning it!" else if(istype(target,/obj/effect/decal/cleanable)) user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "You begin to scrub \the [target.name] out with [src]...") - if(do_after(user, src.cleanspeed)) + if(do_after(user, src.cleanspeed, target = target)) user << "You scrub \the [target.name] out." qdel(target) else if(ishuman(target) && user.zone_sel && user.zone_sel.selecting == "mouth") @@ -57,7 +57,7 @@ return else user.visible_message("[user] begins to clean \the [target.name] with [src]...", "You begin to clean \the [target.name] with [src]...") - if(do_after(user, src.cleanspeed)) + if(do_after(user, src.cleanspeed, target = target)) user << "You clean \the [target.name]." var/obj/effect/decal/cleanable/C = locate() in target qdel(C) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index bd7c7c6f8bc..f9e39c9994e 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -65,7 +65,7 @@ else user.visible_message("[user] begins to do [H]'s lips with \the [src].", \ "You begin to apply \the [src] on [H]'s lips...") - if(do_after(user, 20) && do_after(H, 20, 5, 0)) //user needs to keep their active hand, H does not. + if(do_after(user, 20, target = H) && do_after(H, 20, 5, 0)) //user needs to keep their active hand, H does not. user.visible_message("[user] does [H]'s lips with \the [src].", \ "You apply \the [src] on [H]'s lips.") H.lip_style = "lipstick" @@ -89,7 +89,7 @@ else user.visible_message("[user] begins to wipe [H]'s lipstick off with \the [src].", \ "You begin to wipe off [H]'s lipstick...") - if(do_after(user, 10) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not. + if(do_after(user, 10, target = H) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not. user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \ "You wipe off [H]'s lipstick.") H.lip_style = null @@ -133,7 +133,7 @@ if(H == user) //shaving yourself user.visible_message("[user] starts to shave their facial hair with [src].", \ "You take a moment to shave your facial hair with [src]...") - if(do_after(user, 50)) + if(do_after(user, 50, target = H)) user.visible_message("[user] shaves his facial hair clean with [src].", \ "You finish shaving with [src]. Fast and clean!") shave(H, location) @@ -141,7 +141,7 @@ var/turf/H_loc = H.loc user.visible_message("[user] tries to shave [H]'s facial hair with [src].", \ "You start shaving [H]'s facial hair...") - if(do_after(user, 50)) + if(do_after(user, 50, target = H)) if(H_loc == H.loc) user.visible_message("[user] shaves off [H]'s facial hair with [src].", \ "You shave [H]'s facial hair clean off.") @@ -158,7 +158,7 @@ if(H == user) //shaving yourself user.visible_message("[user] starts to shave their head with [src].", \ "You start to shave your head with [src]...") - if(do_after(user, 50)) + if(do_after(user, 5, target = H)) user.visible_message("[user] shaves his head with [src].", \ "You finish shaving with [src].") shave(H, location) @@ -166,7 +166,7 @@ var/turf/H_loc = H.loc user.visible_message("[user] tries to shave [H]'s head with [src]!", \ "You start shaving [H]'s head...") - if(do_after(user, 50)) + if(do_after(user, 50, target = H)) if(H_loc == H.loc) user.visible_message("[user] shaves [H]'s head bald with [src]!", \ "You shave [H]'s head bald.") diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index f1d7d6c19c4..7a167a67b76 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -68,7 +68,7 @@ user << "You start planting the bomb..." - if(do_after(user, 50) && in_range(user, target)) + if(do_after(user, 50, target = target) && in_range(user, target)) user.drop_item() src.target = target loc = null diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index b3023ea69ef..291b287fc14 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -23,7 +23,7 @@ M.visible_message("[user] is attemping to implant [M].") var/turf/T = get_turf(M) - if(T && (M == user || do_after(user, 50))) + if(T && (M == user || do_after(user, 50, target = M))) if(user && M && (get_turf(M) == T) && src && imp) M.visible_message("[user] has implanted [M].", "[user] implants you with the implant.") add_logs(user, M, "implanted", object="[name]") diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 43a597ae7b8..ff0a719e4bb 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -49,7 +49,7 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A) if(istype(turf)) user.visible_message("[user] begins to clean \the [turf] with [src].", "You begin to clean \the [turf] with [src]...") - if(do_after(user, mopspeed)) + if(do_after(user, mopspeed, target = src)) clean(turf) user << "You finish mopping." diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index b8c214924f6..adf58f4a7ae 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -34,14 +34,14 @@ /obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(locked) if (istype(W, /obj/item/weapon/screwdriver)) - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) src.open =! src.open user.show_message(text("You [] the service panel.", (src.open ? "open" : "close"))) return if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking)) user.show_message(text("Now attempting to reset internal memory, please hold."), 1) src.l_hacking = 1 - if (do_after(usr, 100)) + if (do_after(usr, 100, target = src)) if (prob(40)) src.l_setshort = 1 src.l_set = 0 diff --git a/code/game/objects/structures/crates_lockers/bins.dm b/code/game/objects/structures/crates_lockers/bins.dm index edabca55fb7..734b7f3a608 100644 --- a/code/game/objects/structures/crates_lockers/bins.dm +++ b/code/game/objects/structures/crates_lockers/bins.dm @@ -50,7 +50,7 @@ user.visible_message("[user] tries to stuff [O] into [src].", \ "You try to stuff [O] into [src].", \ "You hear clanging.") - if (!do_after(user, 40)) + if (!do_after(user, 40, target = src)) return if(!..(O, user, 0, 0)) return diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 85f3f7582bb..47124bc5a34 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -206,7 +206,7 @@ if(WT.remove_fuel(0,user)) user << "You begin cutting \the [src] apart..." playsound(loc, 'sound/items/Welder.ogg', 40, 1) - if(do_after(user,40,5,1)) + if(do_after(user,40,5,1, target = src)) if( !opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc ) return playsound(loc, 'sound/items/Welder2.ogg', 50, 1) @@ -226,7 +226,7 @@ if(WT.remove_fuel(0,user)) user << "You begin [welded ? "unwelding":"welding"] \the [src]..." playsound(loc, 'sound/items/Welder2.ogg', 40, 1) - if(do_after(user,40,5,1)) + if(do_after(user,40,5,1, target = src)) if(opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc ) return playsound(loc, 'sound/items/welder.ogg', 50, 1) @@ -331,7 +331,7 @@ user << "You lean on the back of [src] and start pushing the door open. (this will take about [breakout_time] minutes.)" for(var/mob/O in viewers(src)) O << "[src] begins to shake violently!" - if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded && !istype(src.loc, /obj/mecha)) ) return //we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index 41786c4b092..9a48fdf781d 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -25,7 +25,7 @@ if(istype(O, /obj/item/device/multitool)) user << " Resetting circuitry..." playsound(user, 'sound/machines/lockreset.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) src.locked = 0 user << " You disable the locking modules." update_icon() @@ -86,7 +86,7 @@ else user << " Resetting circuitry..." playsound(user, 'sound/machines/lockenable.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) src.locked = 1 user << " You re-enable the locking modules." return diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index dcffa3e0891..a3d421384a4 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -445,7 +445,7 @@ "You start to disassemble the airlock assembly...") playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( !WT.isOn() ) return user << " You disassemble the airlock assembly." @@ -477,7 +477,7 @@ "You start to secure the airlock assembly to the floor...", \ "You hear wrenching.") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( src.anchored ) return user << " You secure the airlock assembly." @@ -491,7 +491,7 @@ user.visible_message("[user] unsecures the airlock assembly from the floor.", \ "You start to unsecure the airlock assembly from the floor...", \ "You hear wrenching.") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( !src.anchored ) return user << " You unsecure the airlock assembly." @@ -505,7 +505,7 @@ return user.visible_message("[user] wires the airlock assembly.", \ "You start to wire the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(C.get_amount() < 1 || state != 0) return C.use(1) src.state = 1 @@ -517,7 +517,7 @@ user.visible_message("[user] cuts the wires from the airlock assembly.", \ "You start to cut the wires from the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( src.state != 1 ) return user << " You cut the wires from the airlock assembly." @@ -529,7 +529,7 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user.visible_message("[user] installs the electronics into the airlock assembly.", \ "You start to install electronics into the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( src.state != 1 ) return @@ -546,7 +546,7 @@ user.visible_message("[user] removes the electronics from the airlock assembly.", \ "You start to remove electronics from the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( src.state != 2 ) return user << " You remove the airlock electronics." @@ -567,7 +567,7 @@ playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] adds [G.name] to the airlock assembly.", \ "You start to install [G.name] into the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(G.get_amount() < 1 || mineral) return if (G.type == /obj/item/stack/sheet/rglass) user << "You install reinforced glass windows into the airlock assembly." @@ -596,7 +596,7 @@ playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] adds [G.name] to the airlock assembly.", \ "You start to install [G.name] into the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(G.get_amount() < 2 || mineral) return user << "You install [M] plating into the airlock assembly." G.use(2) @@ -612,7 +612,7 @@ user.visible_message("[user] finishes the airlock.", \ "You start finishing the airlock...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(src.loc && state == 2) user << " You finish the airlock." var/obj/machinery/door/airlock/door diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index fd324892490..75d1290fa64 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -114,7 +114,7 @@ user << "You need two sheets of metal to finish a wall!" return user << "You start adding plating..." - if (do_after(user, 40)) + if (do_after(user, 40, target = src)) if(loc == null || S.get_amount() < 2) return S.use(2) @@ -145,7 +145,7 @@ if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code... if(S.amount < 1) return ..() user << "You start finalizing the reinforced wall..." - if(do_after(user, 50)) + if(do_after(user, 50, target = src)) if(!src.loc || !S || S.amount < 1) return S.use(1) @@ -159,7 +159,7 @@ else if(S.amount < 1) return ..() user << "You start reinforcing the girder..." - if (do_after(user, 60)) + if (do_after(user, 60, target = src)) if(!src.loc || !S || S.amount < 1) return S.use(1) @@ -184,7 +184,7 @@ else if(S.amount < 2) return ..() user << "You start adding plating..." - if (do_after(user, 40)) + if (do_after(user, 40, target = src)) if(!src.loc || !S || S.amount < 2) return S.use(2) @@ -291,7 +291,7 @@ playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) user.visible_message("[user] disassembles the girder.", \ "You start to disassemble the girder...", "You hear welding and clanking.") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( !WT.isOn() ) return user << "You disassemble the girder." @@ -301,7 +301,7 @@ else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) user << "You start slicing apart the girder..." - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) user << "You slice apart the girder." var/obj/effect/decal/remains/human/R = new (get_turf(src)) transfer_fingerprints_to(R) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 79fda3eda5c..8cfca1870ed 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -174,7 +174,7 @@ user << "There is already a window there!" return user << "You start placing the window..." - if(do_after(user,20)) + if(do_after(user,20, target = src)) if(!src.loc || !anchored) //Grille destroyed or unanchored while waiting return for(var/obj/structure/window/WINDOW in loc) //Another window already installed on grille diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index b5a265e2c76..61d7e4dc74d 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -79,7 +79,7 @@ mybag.attackby(I, user) else if(istype(I, /obj/item/weapon/crowbar)) user.visible_message("[user] begins to empty the contents of [src].", "You begin to empty the contents of [src]...") - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) usr << "You empty the contents of [src]'s bucket onto the floor." reagents.reaction(src.loc) src.reagents.clear_reagents() diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 49537016514..d858a744c8c 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -126,7 +126,7 @@ if(istype(W,/obj/item/weapon/pickaxe)) var/obj/item/weapon/pickaxe/digTool = W user << "You start digging the [name]..." - if(do_after(user,digTool.digspeed*hardness) && src) + if(do_after(user,digTool.digspeed*hardness, target = src) && src) user << "You finish digging." Dismantle() else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc? diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 9a2a5da2cee..af9da38216c 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -349,7 +349,7 @@ if (!anchored && !isinspace()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << " You begin to tighten \the [src] to the floor..." - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) user.visible_message( \ "[user] tightens \the [src]'s casters.", \ " You tighten \the [src]'s casters. Now it can be played again.", \ @@ -358,7 +358,7 @@ else if(anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << " You begin to loosen \the [src]'s casters..." - if (do_after(user, 40)) + if (do_after(user, 40, target = src)) user.visible_message( \ "[user] loosens \the [src]'s casters.", \ " You loosen \the [src]. Now it can be pulled somewhere else.", \ diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 60989279c54..e9310191866 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -24,7 +24,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user.visible_message("[user] is loosening the [name]'s bolts.", \ "You are loosening the [name]'s bolts...") - if(do_after(user,40)) + if(do_after(user,40, target = src)) if(!src.loc || !anchored) return user.visible_message("[user] loosened the [name]'s bolts!", \ @@ -37,7 +37,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user.visible_message("[user] is securing the [name]'s bolts...", \ "You are securing the [name]'s bolts...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src.loc || anchored) return user.visible_message("[user] has secured the [name]'s bolts.", \ @@ -47,7 +47,7 @@ else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) user.visible_message("[user] is slicing apart the [name]...", \ "You are slicing apart the [name]...") - if(do_after(user,30)) + if(do_after(user,30, target = src)) if(!src.loc) return user.visible_message("[user] slices apart the [name].", \ @@ -67,7 +67,7 @@ playsound(loc, 'sound/items/Welder.ogg', 40, 1) user.visible_message("[user] is slicing apart the [name].", \ "You are slicing apart the [name]...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src.loc) return playsound(loc, 'sound/items/Welder2.ogg', 50, 1) diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index 4673fcfeb40..b07df690e12 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -20,7 +20,7 @@ "[M.name] struggles to break free from the gelatinous resin!",\ "You struggle to break free from the gelatinous resin... (Stay still for two minutes.)",\ "You hear squelching...") - if(!do_after(M, 1200)) + if(!do_after(M, 1200, target = src)) if(M && M.buckled) M << "You fail to unbuckle yourself!" return diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 4e44968971b..0fed8ff3a77 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -24,7 +24,7 @@ if(istype(I, /obj/item/weapon/wrench)) user << "You start disassembling [src]..." playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) for(var/i = 1, i <= framestackamount, i++) new framestack(get_turf(src)) @@ -33,7 +33,7 @@ if(istype(I, /obj/item/stack/sheet/plasteel)) var/obj/item/stack/sheet/plasteel/P = I user << "You start adding [P] to [src]..." - if(do_after(user, 50)) + if(do_after(user, 50, target = src)) new /obj/structure/table/reinforced(src.loc) qdel(src) P.use(1) @@ -41,7 +41,7 @@ if(istype(I, /obj/item/stack/sheet/metal)) var/obj/item/stack/sheet/metal/M = I user << "You start adding [M] to [src]..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) new /obj/structure/table(src.loc) qdel(src) M.use(1) @@ -49,7 +49,7 @@ if(istype(I, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = I user << "You start adding [G] to [src]..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) new /obj/structure/table/glass(src.loc) qdel(src) G.use(1) @@ -72,7 +72,7 @@ if(istype(I, /obj/item/stack/sheet/mineral/wood)) var/obj/item/stack/sheet/mineral/wood/W = I user << "You start adding [W] to [src]..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) new /obj/structure/table/wood(src.loc) qdel(src) W.use(1) @@ -80,7 +80,7 @@ if(istype(I, /obj/item/stack/tile/carpet)) var/obj/item/stack/tile/carpet/C = I user << "You start adding [C] to [src]..." - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) new /obj/structure/table/wood/poker(src.loc) qdel(src) C.use(1) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index f776ab56d7e..21a66397ff6 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -347,7 +347,7 @@ if(destroy_type == TBL_DISASSEMBLE) user << "You start disassembling [src]..." playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) new frame(src.loc) for(var/i = 1, i <= buildstackamount, i++) new buildstack(get_turf(src)) @@ -357,7 +357,7 @@ if(destroy_type == TBL_DECONSTRUCT) user << "You start deconstructing [src]..." playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) for(var/i = 1, i <= framestackamount, i++) new framestack(get_turf(src)) for(var/i = 1, i <= buildstackamount, i++) @@ -456,14 +456,14 @@ if(src.status == 2) user << "You start weakening the reinforced table..." playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - if (do_after(user, 50)) + if (do_after(user, 50, target = src)) if(!src || !WT.isOn()) return user << "You weaken the table." src.status = 1 else user << "You start strengthening the reinforced table..." playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - if (do_after(user, 50)) + if (do_after(user, 50, target = src)) if(!src || !WT.isOn()) return user << "You strengthen the table." src.status = 2 @@ -624,7 +624,7 @@ /obj/item/weapon/rack_parts/attack_self(mob/user as mob) user << "You start constructing rack..." - if (do_after(user, 50)) + if (do_after(user, 50, target = src)) var/obj/structure/rack/R = new /obj/structure/rack( user.loc ) R.add_fingerprint(user) user.drop_item() diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index cbc1fbb529a..fe8951ce2a1 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -68,7 +68,7 @@ else if(icon_state == "open") if(pod.contents.len && user.loc != pod) user.visible_message("[user] starts emptying [pod]'s contents onto the floor.", "You start emptying [pod]'s contents onto the floor...") - if(do_after(user, 10)) //So it doesn't default to close_animation() on fail + if(do_after(user, 10, target = src)) //So it doesn't default to close_animation() on fail if(pod.loc == loc) for(var/atom/movable/AM in pod) AM.loc = get_turf(user) @@ -88,7 +88,7 @@ var/mob/GM = G.affecting for(var/obj/structure/transit_tube_pod/pod in loc) pod.visible_message("[user] starts putting [GM] into the [pod]!") - if(do_after(user, 15) && GM && G && G.affecting == GM) + if(do_after(user, 15, target = src) && GM && G && G.affecting == GM) GM.Weaken(5) src.Bumped(GM) qdel(G) diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm index 3db04c5088a..2088458802b 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube.dm @@ -46,7 +46,7 @@ obj/structure/transit_tube/ex_act(severity, target) return user.visible_message("[user] starts to deattach \the [src].", "You start to deattach the [name]...") playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 35)) + if(do_after(user, 35, target = src)) user << "You deattach the [name]." var/obj/structure/R = new tube_construction(src.loc) R.icon_state = src.icon_state diff --git a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm index cb47c7c4e15..5499c3ed9bd 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm @@ -81,7 +81,7 @@ if(istype(I, /obj/item/weapon/wrench)) user << "You start attaching the [name]..." src.add_fingerprint(user) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src) return user << "You attach the [name]." var/obj/structure/transit_tube/R = src.buildtube() diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index b686464321e..4e0e1a83ef7 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -47,7 +47,7 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user << "You start trying to escape from the pod..." - if(do_after(user, 600)) + if(do_after(user, 600, target = src)) user << "You manage to open the pod." src.empty() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 02d08966927..d62a69d769f 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -50,7 +50,7 @@ if(istype(I, /obj/item/weapon/crowbar)) user << "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]..." playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1) - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!", "You hear grinding porcelain.") cistern = !cistern update_icon() @@ -71,7 +71,7 @@ if(open) GM.visible_message("[user] starts to give [GM] a swirlie!", "[user] starts to give [GM] a swirlie...") swirlie = GM - if(do_after(user, 30, 5, 0)) + if(do_after(user, 30, 5, 0, target = src)) GM.visible_message("[user] gives [GM] a swirlie!", "[user] gives [GM] a swirlie!", "You hear a toilet flushing.") if(iscarbon(GM)) var/mob/living/carbon/C = GM @@ -172,7 +172,7 @@ user << "The water temperature seems to be [watertemp]." if(istype(I, /obj/item/weapon/wrench)) user << "You begin to adjust the temperature valve with \the [I]..." - if(do_after(user, 50)) + if(do_after(user, 50, target = src)) switch(watertemp) if("normal") watertemp = "freezing" diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index b3a52450234..4b304c10330 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -79,7 +79,7 @@ user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly...") playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || !WT.isOn()) return user << "You disassemble the windoor assembly." var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5) @@ -100,7 +100,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || src.anchored) return for(var/obj/machinery/door/window/WD in src.loc) @@ -119,7 +119,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || !src.anchored) return user << "You unsecure the windoor assembly." @@ -137,7 +137,7 @@ return user << "You start to reinforce the windoor with plasteel..." - if(do_after(user,40)) + if(do_after(user,40, target = src)) if(!src || secure) return @@ -153,7 +153,7 @@ else if(istype(W, /obj/item/stack/cable_coil) && anchored) user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || !src.anchored || src.state != "01") return var/obj/item/stack/cable_coil/CC = W @@ -174,7 +174,7 @@ playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || src.state != "02") return @@ -193,7 +193,7 @@ user.drop_item() W.loc = src - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || src.electronics) W.loc = src.loc return @@ -211,7 +211,7 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(!src || !electronics) return user << "You remove the airlock electronics." @@ -241,7 +241,7 @@ playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(src.loc && src.electronics) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index f773adc6714..4eb51d617e7 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -197,7 +197,7 @@ else if(!reinf) user << (anchored ? "You begin to unscrew the window from the floor..." : "You begin to screw the window to the floor...") - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(reinf && (state == 1 || state == 2)) //If state was unfastened, fasten it, else do the reverse state = (state == 1 ? 2 : 1) @@ -214,7 +214,7 @@ else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == 0 || state == 1)) user << (state == 0 ? "You begin to lever the window into the frame..." : "You begin to lever the window out of the frame...") playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) //If state was out of frame, put into frame, else do the reverse state = (state == 0 ? 1 : 0) user << (state == 1 ? "You pry the window into the frame." : "You pry the window out of the frame.") @@ -226,7 +226,7 @@ if(WT.remove_fuel(0,user)) user << "You begin repairing [src]..." playsound(loc, 'sound/items/Welder.ogg', 40, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) health = maxhealth playsound(loc, 'sound/items/Welder2.ogg', 50, 1) else @@ -236,7 +236,7 @@ else if(istype(I, /obj/item/weapon/wrench) && !anchored) playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) user << " You begin to disassemble [src]..." - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if(disassembled) return //Prevents multiple deconstruction attempts diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 6e565879c9f..b9462383f9b 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -38,7 +38,7 @@ return else user << "You begin reinforcing the floor..." - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) if (R.get_amount() >= 2) ChangeTurf(/turf/simulated/floor/engine) playsound(src, 'sound/items/Deconstruct.ogg', 80, 1) @@ -98,7 +98,7 @@ if(istype(C, /obj/item/weapon/wrench)) user << "You begin removing rods..." playsound(src, 'sound/items/Ratchet.ogg', 80, 1) - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) if(!istype(src, /turf/simulated/floor/engine)) return new /obj/item/stack/rods(src, 2) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index af5a84bdc3c..251c0d9cb46 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -191,7 +191,7 @@ if( WT.remove_fuel(0,user) ) user << "You begin slicing through the outer plating..." playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, slicing_duration)) + if(do_after(user, slicing_duration, target = src)) if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return 1 if( user.loc == T && user.get_active_hand() == WT ) @@ -201,7 +201,7 @@ else if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) ) user << "You begin slicing through the outer plating..." playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, slicing_duration*0.6)) // plasma cutter is faster than welding tool + if(do_after(user, slicing_duration*0.6, target = src)) // plasma cutter is faster than welding tool if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return 1 if( user.loc == T && user.get_active_hand() == W ) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index aec87adc748..b73fa532738 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -32,7 +32,7 @@ if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W user << "You begin to smash though the [name]..." - if(do_after(user, 50)) + if(do_after(user, 50, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 if( user.loc == T && user.get_active_hand() == W ) @@ -46,7 +46,7 @@ user << "You need one sheet of metal to repair the wall!" return 1 user << "You begin patching-up the wall with \a [MS]..." - if (do_after(user, max(20*d_state,100)))//time taken to repair is proportional to the damage! (max 10 seconds) + if (do_after(user, max(20*d_state,100), target = src))//time taken to repair is proportional to the damage! (max 10 seconds) if(loc == null || MS.get_amount() < 1) return 1 MS.use(1) @@ -73,7 +73,7 @@ user << "You begin removing the support lines..." playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 @@ -104,7 +104,7 @@ user << "You begin slicing through the metal cover..." playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, 60)) + if(do_after(user, 60, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return 0 @@ -119,7 +119,7 @@ user << "You begin slicing through the metal cover..." playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, 60)) + if(do_after(user, 60, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 @@ -135,7 +135,7 @@ user << "You struggle to pry off the cover..." playsound(src, 'sound/items/Crowbar.ogg', 100, 1) - if(do_after(user, 100)) + if(do_after(user, 100, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 @@ -151,7 +151,7 @@ user << "You start loosening the anchoring bolts which secure the support rods to their frame..." playsound(src, 'sound/items/Ratchet.ogg', 100, 1) - if(do_after(user, 40)) + if(do_after(user, 40, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 @@ -169,7 +169,7 @@ user << "You begin slicing through the support rods..." playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, 100)) + if(do_after(user, 100, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return 1 @@ -184,7 +184,7 @@ user << "You begin slicing through the support rods..." playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, 70)) + if(do_after(user, 70, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 @@ -200,7 +200,7 @@ user << "You struggle to pry off the outer sheath..." playsound(src, 'sound/items/Crowbar.ogg', 100, 1) - if(do_after(user, 100)) + if(do_after(user, 100, target = src)) if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return 1 diff --git a/code/modules/crafting/table.dm b/code/modules/crafting/table.dm index 7f6e111599a..15aaca5671c 100644 --- a/code/modules/crafting/table.dm +++ b/code/modules/crafting/table.dm @@ -80,7 +80,7 @@ check_table() var/send_feedback = 1 if(check_contents(R) && check_tools(user, R)) - if(do_after(user, R.time)) + if(do_after(user, R.time, target = src)) if(!check_contents(R) || !check_tools(user, R)) return 0 var/atom/movable/I = new R.result (loc) diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 022c1130ce7..73849b4b366 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -30,7 +30,7 @@ user.visible_message("[user] has smothered \the [A] with \the [src]!", "You smother \the [A] with \the [src]!", "You hear some struggling and muffled cries of surprise.") else if(istype(A) && src in user) user.visible_message("[user] starts to wipe down [A] with [src]!", "You start to wipe down [A] with [src]...") - if(do_after(user,30)) + if(do_after(user,30, target = A)) user.visible_message("[user] finishes wiping off the [A]!", "You finish wiping off the [A].") A.clean_blood() return diff --git a/code/modules/food&drinks/kitchen machinery/gibber.dm b/code/modules/food&drinks/kitchen machinery/gibber.dm index e5111bfb000..ca40eb15486 100644 --- a/code/modules/food&drinks/kitchen machinery/gibber.dm +++ b/code/modules/food&drinks/kitchen machinery/gibber.dm @@ -106,7 +106,7 @@ user.visible_message("[user] starts to put [G.affecting] into the gibber!") src.add_fingerprint(user) - if(do_after(user, gibtime) && G && G.affecting && !occupant) + if(do_after(user, gibtime, target = src) && G && G.affecting && !occupant) user.visible_message("[user] stuffs [G.affecting] into the gibber!") var/mob/M = G.affecting if(M.client) diff --git a/code/modules/food&drinks/kitchen machinery/microwave.dm b/code/modules/food&drinks/kitchen machinery/microwave.dm index b04ac183825..2bfe5e836ce 100644 --- a/code/modules/food&drinks/kitchen machinery/microwave.dm +++ b/code/modules/food&drinks/kitchen machinery/microwave.dm @@ -67,7 +67,7 @@ "[user] starts to fix part of the microwave.", \ "You start to fix part of the microwave..." \ ) - if (do_after(user,20)) + if (do_after(user,20, target = src)) user.visible_message( \ "[user] fixes part of the microwave.", \ "You fix part of the microwave." \ @@ -78,7 +78,7 @@ "[user] starts to fix part of the microwave.", \ "You start to fix part of the microwave..." \ ) - if (do_after(user,20)) + if (do_after(user,20, target = src)) user.visible_message( \ "[user] fixes the microwave.", \ "You fix the microwave." \ @@ -116,7 +116,7 @@ "[user] starts to clean the microwave.", \ "You start to clean the microwave..." \ ) - if (do_after(user, P.cleanspeed)) + if (do_after(user, P.cleanspeed, target = src)) user.visible_message( \ "[user] has cleaned the microwave.", \ "You clean the microwave." \ diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 608414b38c2..a52b6bf210d 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -730,7 +730,7 @@ user.visible_message("[user] begins to wrench [src] into place.", \ "You begin to wrench [src] in place...") playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) if(anchored) return anchored = 1 @@ -740,7 +740,7 @@ user.visible_message("[user] begins to unwrench [src].", \ "You begin to unwrench [src]...") playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if (do_after(user, 20)) + if (do_after(user, 20, target = src)) if(!anchored) return anchored = 0 diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index b22c6d40087..fbc3eddef8a 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -36,13 +36,13 @@ if(0) if(istype(I, /obj/item/weapon/wrench)) playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You wrench the frame into place." anchored = 1 state = 1 if(istype(I, /obj/item/weapon/crowbar)) playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) - if(do_after(user, 20)) + if(do_after(user, 20, target = src)) user << "You pry the frame apart." new /obj/item/stack/sheet/mineral/wood(loc, 4) qdel(src) @@ -252,7 +252,7 @@ else if(istype(I, /obj/item/weapon/kitchen/knife) || istype(I, /obj/item/weapon/wirecutters)) user << "You begin to carve out [title]..." - if(do_after(user, 30)) + if(do_after(user, 30, target = src)) user << "You carve out the pages from [title]! You didn't want to read it anyway." var/obj/item/weapon/storage/book/B = new B.name = src.name diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 17efc5c62e0..88e13ce578c 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -434,7 +434,7 @@ var/global/list/rockTurfEdgeCache user << "You start picking..." P.playDigSound() - if(do_after(user,P.digspeed)) + if(do_after(user,P.digspeed, target = src)) if(istype(src, /turf/simulated/mineral)) //sanity check against turf being deleted during digspeed delay user << "You finish cutting into the rock." P.update_icon() diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index bf394e7ac21..69df6809de9 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -326,7 +326,7 @@ flick("coin_[cmineral]_flip", src) icon_state = "coin_[cmineral]_[coinflip]" playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1) - if(do_after(user, 15)) + if(do_after(user, 15, target = src)) user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ "You flip [src]. It lands on [coinflip].", \ "You hear the clattering of loose change.") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index bae07c42c8d..ed6c7922367 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -407,7 +407,7 @@ var/const/GALOSHES_DONT_HELP = 8 last_special = world.time + CLICK_CD_BREAKOUT visible_message("[src] attempts to unbuckle themself!", \ "You attempt to unbuckle yourself... (This will take around one minute and you need to stay still.)") - if(do_after(src, 600, needhand = 0)) + if(do_after(src, 600, needhand = 0, target = src)) if(!buckled) return buckled.user_unbuckle_mob(src,src) @@ -450,7 +450,7 @@ var/const/GALOSHES_DONT_HELP = 8 if(!cuff_break) visible_message("[src] attempts to remove [I]!") src << "You attempt to remove [I]... (This will take around [displaytime] minutes and you need to stand still.)" - if(do_after(src, breakouttime, 10, 0)) + if(do_after(src, breakouttime, 10, 0, target = src)) if(I.loc != src || buckled) return visible_message("[src] manages to remove [I]!") @@ -475,7 +475,7 @@ var/const/GALOSHES_DONT_HELP = 8 breakouttime = 50 visible_message("[src] is trying to break [I]!") src << "You attempt to break [I]... (This will take around 5 seconds and you need to stand still.)" - if(do_after(src, breakouttime, needhand = 0)) + if(do_after(src, breakouttime, needhand = 0, target = src)) if(!I.loc || buckled) return visible_message("[src] manages to break [I]!") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 620d251ed54..62ebf2d8c48 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -284,7 +284,7 @@ return var/time_taken = I.embedded_unsafe_removal_time*I.w_class usr.visible_message("[usr] attempts to remove [I] from their [L.getDisplayName()].","You attempt to remove [I] from your [L.getDisplayName()]... (It will take [time_taken/10] seconds.)") - if(do_after(usr, time_taken, needhand = 1)) + if(do_after(usr, time_taken, needhand = 1, target = src)) L.embedded_objects -= I L.take_damage(I.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus. I.loc = get_turf(src) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 77e0040131f..e15a9a939d1 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -482,7 +482,7 @@ else playsound(src, 'sound/items/Ratchet.ogg', 50, 1) user << "You start to unfasten [src]'s securing bolts..." - if(do_after(user, 50) && !cell) + if(do_after(user, 50, target = src) && !cell) user.visible_message("[user] deconstructs [src]!", "You unfasten the securing bolts, and [src] falls to pieces!") deconstruct() diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index a04e155095f..bb0c135e820 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -81,7 +81,7 @@ user << "You can't shave this corgi, it's already been shaved!" return user.visible_message("[user] starts to shave [src] using \the [O].", "You start to shave [src] using \the [O]...") - if(do_after(user, 50)) + if(do_after(user, 50, target = src)) user.visible_message("[user] shaves [src]'s hair using \the [O].") playsound(loc, 'sound/items/Welder2.ogg', 20, 1) shaved = 1 diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm index 930dff33f2e..d4b664f4536 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm @@ -42,7 +42,7 @@ if(istype(loc, /mob/living)) var/mob/living/L = loc L.show_message("[drone] is trying to escape!") - if(!do_after(L, 50) || loc != L) + if(!do_after(L, 50, target = L) || loc != L) return L.unEquip(src) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm index 61ffbe0eecf..1bccd4f88a5 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm @@ -33,7 +33,7 @@ D << "You can't seem to find the [pick(faux_gadgets)]! Without it, [src] [pick(faux_problems)]." return D.visible_message("[D] begins to reactivate [src].", "You begin to reactivate [src]...") - if(do_after(user,30,needhand = 1)) + if(do_after(user,30,needhand = 1, target = src)) health = health_repair_max stat = CONSCIOUS icon_state = icon_living diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm index 9165e233d1b..5df785e016c 100644 --- a/code/modules/mob/living/ventcrawling.dm +++ b/code/modules/mob/living/ventcrawling.dm @@ -37,7 +37,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, if(vent_found.parent && (vent_found.parent.members.len || vent_found.parent.other_atmosmch)) visible_message("[src] begins climbing into the ventilation system..." ,"You begin climbing into the ventilation system...") - if(!do_after(src, 25)) + if(!do_after(src, 25, target = vent_found)) return if(!client) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 233fcd4f485..46aeaabf7a7 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -158,7 +158,7 @@ assailant.visible_message("[assailant] starts to tighten \his grip on [affecting]'s neck!") hud.icon_state = "disarm/kill1" state = GRAB_UPGRADING - if(do_after(assailant, UPGRADE_KILL_TIMER)) + if(do_after(assailant, UPGRADE_KILL_TIMER, target = affecting)) if(state == GRAB_KILL) return if(!affecting) @@ -207,9 +207,9 @@ var/mob/living/carbon/attacker = user user.visible_message("[user] is attempting to devour [affecting]!") if(istype(user, /mob/living/carbon/alien/humanoid/hunter)) - if(!do_mob(user, affecting)||!do_after(user, 30)) return + if(!do_mob(user, affecting)||!do_after(user, 30, target = affecting)) return else - if(!do_mob(user, affecting)||!do_after(user, 100)) return + if(!do_mob(user, affecting)||!do_after(user, 100, target = affecting)) return user.visible_message("[user] devours [affecting]!") affecting.loc = user attacker.stomach_contents.Add(affecting) diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm index 71f729da249..bea7284744c 100644 --- a/code/modules/ninja/suit/ninjaDrainAct.dm +++ b/code/modules/ninja/suit/ninjaDrainAct.dm @@ -41,7 +41,7 @@ They *could* go in their appropriate files, but this is supposed to be modular drain = S.cell.maxcharge - S.cell.charge maxcapacity = 1//Reached maximum battery capacity. - if (do_after(H,10)) + if (do_after(H,10, target = src)) spark_system.start() playsound(loc, "sparks", 50, 1) cell.charge -= drain @@ -84,7 +84,7 @@ They *could* go in their appropriate files, but this is supposed to be modular drain = S.cell.maxcharge - S.cell.charge maxcapacity = 1 - if (do_after(H,10)) + if (do_after(H,10, target = src)) spark_system.start() playsound(loc, "sparks", 50, 1) charge -= drain @@ -103,7 +103,7 @@ They *could* go in their appropriate files, but this is supposed to be modular . = 0 if(charge) - if(G.candrain && do_after(H,30)) + if(G.candrain && do_after(H,30, target = src)) . = charge if(S.cell.charge + charge > S.cell.maxcharge) S.cell.charge = S.cell.maxcharge @@ -130,7 +130,7 @@ They *could* go in their appropriate files, but this is supposed to be modular if(files && files.known_tech.len) for(var/datum/tech/current_data in S.stored_research) H << "Checking \the [current_data.name] database." - if(do_after(H, S.s_delay) && G.candrain && src) + if(do_after(H, S.s_delay, target = src) && G.candrain && src) for(var/datum/tech/analyzing_data in files.known_tech) if(current_data.id == analyzing_data.id) if(analyzing_data.level > current_data.level) @@ -161,7 +161,7 @@ They *could* go in their appropriate files, but this is supposed to be modular if(files && files.known_tech.len) for(var/datum/tech/current_data in S.stored_research) H << "Checking \the [current_data.name] database." - if(do_after(H, S.s_delay) && G.candrain && src) + if(do_after(H, S.s_delay, target = src) && G.candrain && src) for(var/datum/tech/analyzing_data in files.known_tech) if(current_data.id == analyzing_data.id) if(analyzing_data.level > current_data.level) @@ -189,7 +189,7 @@ They *could* go in their appropriate files, but this is supposed to be modular while(G.candrain && !maxcapacity && src) drain = (round((rand(G.mindrain, G.maxdrain))/2)) var/drained = 0 - if(PN && do_after(H,10)) + if(PN && do_after(H,10, target = src)) drained = min(drain, PN.avail) PN.load += drained if(drained < drain)//if no power on net, drain apcs @@ -229,7 +229,7 @@ They *could* go in their appropriate files, but this is supposed to be modular if(S.cell.charge + drain > S.cell.maxcharge) drain = S.cell.maxcharge - S.cell.charge maxcapacity = 1 - if (do_after(H,10)) + if (do_after(H,10, target = src)) spark_system.start() playsound(loc, "sparks", 50, 1) cell.use(drain) diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm index a2683d39d8c..775143b8feb 100644 --- a/code/modules/ninja/suit/suit_attackby.dm +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -23,7 +23,7 @@ var/obj/item/weapon/stock_parts/cell/CELL = I if(CELL.maxcharge > cell.maxcharge && n_gloves && n_gloves.candrain) U << "Higher maximum capacity detected.\nUpgrading..." - if (n_gloves && n_gloves.candrain && do_after(U,s_delay)) + if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = src)) U.drop_item() CELL.loc = src CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge) @@ -43,7 +43,7 @@ var/obj/item/weapon/disk/tech_disk/TD = I if(TD.stored)//If it has something on it. U << "Research information detected, processing..." - if(do_after(U,s_delay)) + if(do_after(U,s_delay, target = src)) for(var/datum/tech/current_data in stored_research) if(current_data.id==TD.stored.id) if(current_data.level