Makes uses of do_after sane (#18334)

* Prevents insta-actions

* Do_after sanity

NOTE: NUKE do_after_action

* Update bonfire.dm

* The  rest of them

Also fixes a tpyo

* no minitest :)

* .

* .

* Gets rid of the slowdown for now

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-09-07 20:25:08 -04:00
committed by GitHub
parent 736fe6ef28
commit d73f6b8dbd
330 changed files with 682 additions and 690 deletions
@@ -204,5 +204,5 @@
/obj/effect/decal/cleanable/confetti/attack_hand(mob/user)
to_chat(user, span_notice("You start to meticulously pick up the confetti."))
if(do_after(user, 60))
if(do_after(user, 6 SECONDS, target = src))
qdel(src)
@@ -78,7 +78,7 @@
var/obj/structure/sign/poster/P = new poster_type(user.loc, get_dir(user, W), src)
if(do_after(user, 17)) //Let's check if everything is still there
if(do_after(user, 17, target = src)) //Let's check if everything is still there
to_chat(user, span_notice("You place the poster!"))
qdel(src)
return TRUE
+2 -2
View File
@@ -332,7 +332,7 @@
add_fingerprint(user)
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
user.visible_message("[user] starts priming \the [src.name].", "You start priming \the [src.name]. Hold still!")
if(do_after(user, 10 SECONDS))
if(do_after(user, 10 SECONDS, target = src))
playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
prime(user)
else
@@ -343,7 +343,7 @@
/obj/item/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && trap)
to_chat(user, span_notice("You begin removing \the [trap]."))
if(do_after(user, 10 SECONDS))
if(do_after(user, 10 SECONDS, target = src))
to_chat(user, span_notice("You finish disconnecting the mine's trigger."))
trap.forceMove(get_turf(src))
trap = null
+1 -1
View File
@@ -69,7 +69,7 @@
/obj/effect/overlay/snow/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/shovel))
user.visible_message(span_notice("[user] begins to shovel away \the [src]."))
if(do_after(user, 40))
if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You have finished shoveling!"))
qdel(src)
return
+1 -1
View File
@@ -88,7 +88,7 @@
if(!istype(W))
return
if(W.has_tool_quality(TOOL_WRENCH) && isturf(loc))
if(do_after(5))
if(do_after(user, 5, target = src))
if(!src) return
to_chat(user, span_notice("You dissasemble the desk bell"))
new /obj/item/stack/material/steel(get_turf(src), 1)
+1 -1
View File
@@ -98,7 +98,7 @@
if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing an arrow on the [target.name].")
if(instant || do_after(user, 50))
if(instant || do_after(user, 5 SECONDS, target = src))
var/list/mouse_control = params2list(click_parameters)
var/p_x = 0
var/p_y = 0
+1 -1
View File
@@ -114,7 +114,7 @@
user.visible_message("\The [user] starts transferring \the [ai] into \the [src]...", "You start transferring \the [ai] into \the [src]...")
show_message(span_critical("\The [user] is transferring you into \the [src]!"))
if(do_after(user, 100))
if(do_after(user, 10 SECONDS, target = src))
if(carded_ai)
to_chat(user, span_danger("Transfer failed:") + " Existing AI found on remote device. Remove existing AI to install a new one.")
return 0
@@ -45,7 +45,7 @@
else
log_and_message_admins("attempted to body swap with [key_name(M)].")
user.visible_message(span_warning("[user] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!"))
if(do_after(user,35 SECONDS,M))
if(do_after(user,35 SECONDS, target = M))
if(user.mind && M.mind && M.stat != DEAD && user.stat != DEAD)
log_and_message_admins("[user.ckey] used a Bodysnatcher to swap bodies with [M.ckey]", user)
to_chat(user,span_notice("Your minds have been swapped! Have a nice day."))
+3 -3
View File
@@ -397,7 +397,7 @@
//beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message(span_warning("\The [user] begins to place [src] on [H]'s chest."), span_warning("You begin to place [src] on [H]'s chest..."))
if(!do_after(user, 30, H))
if(!do_after(user, 3 SECONDS, target = H))
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " places [src] on [H]'s chest."), span_warning("You place [src] on [H]'s chest."))
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
@@ -412,7 +412,7 @@
make_announcement("buzzes, \"Warning - Patient is in hypovolemic shock.\"", "warning") //also includes heart damage
//placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(!do_after(user, chargetime, H))
if(!do_after(user, chargetime, target = H))
return
//deduct charge here, in case the base unit was EMPed or something during the delay time
@@ -467,7 +467,7 @@
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
audible_message(span_warning("\The [src] lets out a steadily rising hum..."), runemessage = "whines")
if(!do_after(user, chargetime, H))
if(!do_after(user, chargetime, target = H))
return
//deduct charge here, in case the base unit was EMPed or something during the delay time
+1 -1
View File
@@ -36,7 +36,7 @@
var/answer = tgui_alert(user, "Would you like to activate this personal emergency beacon?","\The [src]", list("Yes", "No"))
if(answer != "Yes")
return
else if(do_after(user, (3 SECONDS))) //short delay, so they can still abort if they want to
else if(do_after(user, 3 SECONDS, target = src)) //short delay, so they can still abort if they want to
user.visible_message(span_warning("[user] activates \the [src]!"),span_warning("You activate \the [src], spiking it into the ground!"))
beacon_active = TRUE
icon_state = "e_beacon_active"
+1 -1
View File
@@ -47,7 +47,7 @@
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " starts trying to repair \the [src]'s bulb."))
repairing = TRUE
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed) && can_repair)
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed, target = src) && can_repair)
if(prob(30))
user.visible_message(span_notice("\The [user] successfully repairs \the [src]!"))
broken = FALSE
+2 -2
View File
@@ -80,7 +80,7 @@
var/obj/structure/closet/crate/secure/A = target
if(A.locked)
to_chat(user, span_notice("Overriding access. Stand by."))
if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed))))
if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed)), target = src))
to_chat(user, span_notice("Override successful!"))
A.locked = FALSE
A.update_icon()
@@ -92,7 +92,7 @@
var/obj/structure/closet/secure_closet/A = target
if(A.locked)
to_chat(user, span_notice("Overriding access. Stand by."))
if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed))))
if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed)), target = src))
to_chat(user, span_notice("Override successful!"))
A.locked = FALSE
A.update_icon()
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(paikeys)
user.visible_message(span_notice("\The [user] secured \the [src]'s maintenance panel."))
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
else if(pai)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
panel_open = TRUE
user.visible_message(span_warning("\The [user] opened \the [src]'s maintenance panel."))
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
@@ -154,7 +154,7 @@ GLOBAL_LIST_EMPTY(paikeys)
if(istype(I,/obj/item/paiparts/cell))
if(cell == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
cell = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -163,7 +163,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/processor))
if(processor == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
processor = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -172,7 +172,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/board))
if(board == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
board = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/capacitor))
if(capacitor == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
capacitor = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -190,7 +190,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/projector))
if(projector == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
projector = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/emitter))
if(emitter == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
emitter = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -208,7 +208,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/speech_synthesizer))
if(speech_synthesizer == PP_MISSING)
if(do_after(user, 3 SECONDS))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
speech_synthesizer = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -241,7 +241,7 @@ GLOBAL_LIST_EMPTY(paikeys)
playsound(src, 'sound/items/pickup/component.ogg', vary = TRUE)
else
return
if(!do_after(user, 3 SECONDS))
if(!do_after(user, 3 SECONDS, target = src))
return
switch(choice)
if("cell")
@@ -19,7 +19,7 @@
playsound(src, 'sound/misc/bloop.ogg', 50, 1)
flick("health2", src)
if(do_after(user,6 SECONDS,AM))
if(do_after(user, 6 SECONDS, target = AM))
scan_genes(AM,user)
/obj/item/gene_scanner/proc/scan_genes(atom/movable/AM,mob/user)
@@ -214,7 +214,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
persist_nif_data(H)
usr.visible_message("[usr] begins scanning [target]'s mind.",span_notice("You begin scanning [target]'s mind."))
if(do_after(usr,8 SECONDS,target))
if(do_after(usr, 8 SECONDS, target))
our_db.m_backup(target.mind,nif,one_time = TRUE)
to_chat(usr,span_notice("Mind backed up!"))
else
@@ -230,7 +230,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
var/mob/living/carbon/human/H = target
usr.visible_message("[usr] begins scanning [target]'s body.",span_notice("You begin scanning [target]'s body."))
if(do_after(usr,8 SECONDS,target))
if(do_after(usr, 8 SECONDS, target))
var/datum/transhuman/body_record/BR = new()
BR.init_from_mob(H, TRUE, TRUE, database_key = db_key)
to_chat(usr,span_notice("Body scanned!"))
@@ -252,7 +252,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(target))
usr.visible_message(span_warning("[usr] begins downloading [target]'s mind!"),span_notice("You begin downloading [target]'s mind!"))
if(do_after(usr,35 SECONDS,target)) //This is powerful, yo.
if(do_after(usr, 35 SECONDS, target)) //This is powerful, yo.
if(!stored_mind && target.mind)
get_mind(target)
to_chat(usr,span_notice("Mind downloaded!"))
@@ -303,7 +303,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
return
usr.visible_message(span_warning("[usr] begins uploading someone's mind into [target]!"),span_notice("You begin uploading a mind into [target]!"))
if(do_after(usr,35 SECONDS,target))
if(do_after(usr, 35 SECONDS, target))
if(!stored_mind)
to_chat(usr,span_warning("\The [src] no longer has a stored mind."))
return
@@ -417,7 +417,7 @@
if(ruined && I.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, span_notice("You start winding the tape back in..."))
playsound(src, I.usesound, 50, 1)
if(do_after(user, 120 * I.toolspeed, target = src))
if(do_after(user, 12 SECONDS * I.toolspeed, target = src))
to_chat(user, span_notice("You wound the tape back in."))
fix()
return
@@ -262,7 +262,7 @@ This device records all warnings given and teleport events for admin review in c
if(L.a_intent != I_HELP || L.has_AI())
to_chat(user, span_notice("[L] is resisting your attempt to teleport them with \the [src]."))
to_chat(L, span_danger(" [user] is trying to teleport you with \the [src]!"))
if(!do_after(user, 30, L))
if(!do_after(user, 3 SECONDS, target = L))
return
//Bzzt.
@@ -412,7 +412,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat
var/obj/belly/bellychoice = tgui_input_list(user, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
user.visible_message(span_warning("[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice.name]!"),span_notice("You begin putting \the [src] into your [bellychoice.name]!"))
if(do_after(user,5 SECONDS,src))
if(do_after(user, 5 SECONDS, target = src))
user.unEquip(src)
forceMove(bellychoice)
user.visible_message(span_warning("[user] eats a telebeacon!"),"You eat the the beacon!")
@@ -478,7 +478,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat
user.visible_message(span_notice("[user] opens \the [src] and starts pumping the handle."), \
span_notice("You open \the [src] and start pumping the handle."))
while(recharging)
if(!do_after(user, 10, src))
if(!do_after(user, 1 SECOND, target = src))
break
playsound(src,'sound/items/change_drill.ogg',25,1)
if(power_source.give(phase_power) < phase_power)
+2 -2
View File
@@ -28,7 +28,7 @@
else //finally, we can assume that they do match
to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]..."))
playsound(src, D.keysound,100, 1)
if(do_after(user, pick_time * D.lock_difficulty))
if(do_after(user, pick_time * D.lock_difficulty, target = src))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
if(istype(A, /obj/structure/fence/door))
@@ -45,7 +45,7 @@
else //finally, we can assume that they do match
to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]..."))
playsound(src, D.keysound,100, 1)
if(do_after(user, pick_time * D.lock_difficulty))
if(do_after(user, pick_time * D.lock_difficulty, target = src))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
else if(ishuman(A)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
+1 -1
View File
@@ -240,7 +240,7 @@
message += "Looks like there's a printer without any paper in it."
if(do_after(user, delay = 5 SECONDS))
if(do_after(user, delay = 5 SECONDS, target = src))
to_chat(user, message)
+1 -1
View File
@@ -40,7 +40,7 @@
if(ishuman(target) && user.zone_sel.selecting == O_MOUTH)
if(target == user)
to_chat(user, span_warning("You raise the soap to your mouth and prepare to take a bite..."))
if(do_after(user, 5)) //Mercy against accidental chomps
if(do_after(user, 5, target = target)) //Mercy against accidental chomps
user.visible_message(span_notice("[user] takes a bite out of [src]!"), span_notice("You gnaw on [src]! This can't be good for you..."))
var/mob/living/carbon/C = user
playsound(get_turf(C), 'sound/items/eatfood.ogg', 25, 0)
+1 -1
View File
@@ -413,7 +413,7 @@
balloon_alert(user, "you can't apply a splint to the arm you're using!")
return
user.balloon_alert_visible("[user] starts to apply \the [src] to their [limb].", "applying \the [src] to your [limb].", "You hear something being wrapped.")
if(do_after(user, 50, M))
if(do_after(user, 5 SECONDS, target = M))
if(affecting.splinted)
balloon_alert(user, "[M]'s [limb] is already splinted!")
return
+3 -3
View File
@@ -17,7 +17,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss())
if(do_after(user, 7 * toolspeed, R))
if(do_after(user, 7 * toolspeed, target = R))
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
@@ -51,9 +51,9 @@
else if(can_use(1))
user.setClickCooldown(user.get_attack_speed(src))
if(S.open >= 2)
if(do_after(user, 5 * toolspeed, S))
if(do_after(user, 5 * toolspeed, target = S))
S.heal_damage(restoration_internal, restoration_internal, robo_repair = 1)
else if(do_after(user, 5 * toolspeed, S))
else if(do_after(user, 5 * toolspeed, target = S))
S.heal_damage(restoration_external,restoration_external, robo_repair =1)
H.updatehealth()
use(1)
+2 -2
View File
@@ -69,7 +69,7 @@
if (recipe.time)
to_chat(user, span_notice("Building [recipe.title] ..."))
if (!do_after(user, recipe.time))
if (!do_after(user, recipe.time, target = src))
return
if (use(required))
@@ -139,7 +139,7 @@
color = M.icon_colour
/obj/item/stack/emptysandbag/attack_self(var/mob/user)
while(do_after(user, 1 SECOND) && can_use(1) && istype(get_turf(src), /turf/simulated/floor/outdoors))
while(do_after(user, 1 SECOND, target = src) && can_use(1) && istype(get_turf(src), /turf/simulated/floor/outdoors))
use(1)
var/obj/item/stack/sandbags/SB = new (get_turf(src), 1, bag_material)
SB.color = color
+1 -1
View File
@@ -186,7 +186,7 @@
if (recipe.time)
to_chat(user, span_notice("Building [recipe.title] ..."))
is_building = TRUE
if (!do_after(user, recipe.time))
if (!do_after(user, recipe.time, target = src))
is_building = FALSE
return
+2 -2
View File
@@ -716,7 +716,7 @@
if(stored_item && opened && !searching)
searching = TRUE
if(do_after(user, 10))
if(do_after(user, 1 SECOND, target = src))
to_chat(user, "You find [icon2html(stored_item, user.client)] [stored_item] in [src]!")
stored_item.forceMove(get_turf(src))
stored_item = null
@@ -824,7 +824,7 @@
/obj/item/toy/plushie/attack_self(mob/user as mob)
if(stored_item && opened && !searching)
searching = TRUE
if(do_after(user, 10))
if(do_after(user, 1 SECOND, target = src))
to_chat(user, "You find [icon2html(stored_item, user.client)] [stored_item] in [src]!")
stored_item.forceMove(get_turf(src))
stored_item = null
+1 -1
View File
@@ -645,7 +645,7 @@
/obj/item/toy/minigibber/attackby(obj/O, mob/user, params)
if(istype(O,/obj/item/toy/figure) || istype(O,/obj/item/toy/character) && O.loc == user)
to_chat(user, span_notice("You start feeding \the [O] [icon2html(O, user.client)] into \the [src]'s mini-input."))
if(do_after(user, 10, target = src))
if(do_after(user, 1 SECOND, target = src))
if(O.loc != user)
to_chat(user, span_warning("\The [O] is too far away to feed into \the [src]!"))
else
+3 -3
View File
@@ -99,7 +99,7 @@
if("(Dis)Assemble")
if(can_transition_to(state == UAV_PACKED ? UAV_OFF : UAV_PACKED, user))
user.visible_message(span_infoplain(span_bold("[user]") + " starts [state == UAV_PACKED ? "unpacking" : "packing"] [src]."), span_info("You start [state == UAV_PACKED ? "unpacking" : "packing"] [src]."))
if(do_after(user, 10 SECONDS, src))
if(do_after(user, 10 SECONDS, target = src))
return toggle_packed(user)
// Can toggle power from on and off
if("Toggle Power")
@@ -119,7 +119,7 @@
toggle_pairing()
else if(I.has_tool_quality(TOOL_SCREWDRIVER) && cell)
if(do_after(user, 3 SECONDS, src))
if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You remove [cell] into [nickname]."))
playsound(src, I.usesound, 50, 1)
power_down()
@@ -127,7 +127,7 @@
cell = null
else if(istype(I, /obj/item/cell) && !cell)
if(do_after(user, 3 SECONDS, src))
if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You insert [I] into [nickname]."))
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
power_down()
@@ -105,7 +105,7 @@ AI MODULES
R.visible_message(span_danger("\The [user] slides a law module into \the [R]."))
to_chat(R, span_danger("Local law upload in progress."))
to_chat(user, span_notice("Uploading laws from board. This will take a moment..."))
if(do_after(user, 10 SECONDS))
if(do_after(user, 10 SECONDS, target = src))
transmitInstructions(R, user)
to_chat(R, "These are your laws now:")
R.show_laws()
+1 -1
View File
@@ -96,7 +96,7 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell,
to_chat(user, span_notice("The battery has no charge."))
else
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2,target = C))
if(do_after(user, 2, target = C))
stored_charge += C.charge
if(C.charge > charge_needed) //We only drain what we need!
C.use(charge_needed)
+1 -1
View File
@@ -57,7 +57,7 @@
else
user.visible_message(span_warning("[user] begins to do [H]'s lips with \the [src]."), \
span_notice("You begin to apply \the [src]."))
if(do_after(user, 20, H)) //user needs to keep their active hand, H does not.
if(do_after(user, 2 SECONDS, target = H)) //user needs to keep their active hand, H does not.
user.visible_message(span_notice("[user] does [H]'s lips with \the [src]."), \
span_notice("You apply \the [src]."))
H.lip_style = colour
@@ -129,7 +129,7 @@
//addtimer(VARSET_CALLBACK(src, in_use , FALSE), 5 SECONDS, TIMER_DELETE_ME) //Leaving this for reference of how to do the timer here if do_after wasn't present.
if(!do_after(user,50))
if(!do_after(user, 5 SECONDS, target = src))
in_use = FALSE
return
@@ -53,7 +53,7 @@
to_chat(user, "Planting explosives...")
user.do_attack_animation(target)
if(do_after(user, 50) && in_range(user, target))
if(do_after(user, 5 SECONDS, target = target) && in_range(user, target))
user.drop_item()
src.target = target
loc = null
+2 -2
View File
@@ -79,7 +79,7 @@
user.visible_message(span_danger("\The [user] is attempting to put [cuff_type] on \the [H]!"))
if(!do_after(user,use_time))
if(!do_after(user, use_time, target = src))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
@@ -256,7 +256,7 @@ var/last_chew = 0
user.visible_message(span_danger("\The [user] is attempting to put [cuff_type] on \the [H]!"))
if(!do_after(user,use_time))
if(!do_after(user, use_time, target = src))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
@@ -54,7 +54,7 @@
user.do_attack_animation(M)
var/turf/T1 = get_turf(M)
if (T1 && ((M == user) || do_after(user, 50)))
if (T1 && ((M == user) || do_after(user, 5 SECONDS, target = M)))
if(user && M && (get_turf(M) == T1) && src && src.imp)
M.visible_message(span_warning("[M] has been implanted by [user]."))
@@ -30,12 +30,12 @@
visible_message("You start pulling the string on \the [src].", "[user] starts pulling the string on the [src].")
if(max_fuel <= 0)
if(do_after(user, 15))
if(do_after(user, 15, target = src))
to_chat(user, "\The [src] won't start!")
else
to_chat(user, "You fumble with the string.")
else
if(do_after(user, 15))
if(do_after(user, 15, target = src))
visible_message("You start \the [src] up with a loud grinding!", "[user] starts \the [src] up with a loud grinding!")
attack_verb = list("shredded", "ripped", "torn")
playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1)
@@ -89,7 +89,7 @@
Hyd.die()
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
to_chat(user, span_notice("You begin filling the tank on the chainsaw."))
if(do_after(user, 15))
if(do_after(user, 15, target = src))
A.reagents.trans_to_obj(src, max_fuel)
playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
to_chat(user, span_notice("Chainsaw succesfully refueled."))
@@ -16,20 +16,20 @@
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.toolspeed, target = src))
material.place_dismantled_product(get_turf(src))
user.visible_message("[user] dismantles down \the [src.name].", "You dismantle \the [src.name].")
qdel(src)
@@ -66,7 +66,7 @@
return 0
else
to_chat(user, span_notice("You begin to place \the [src.name]."))
if(!do_after(user, 10))
if(!do_after(user, 1 SECOND, target = src))
return 0
var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material())
to_chat(user, span_notice("You place \the [src.name]."))
@@ -126,7 +126,7 @@
if(!fragile)
if(health < initial(health))
user.visible_message("[user] begins repairing \the [src].", "You begin repairing \the [src].")
if(do_after(user, repair_time))
if(do_after(user, repair_time, target = src))
user.visible_message("[user] has finished repairing \the [src]", "You finish repairing \the [src].")
health = min(health + repair_amount, initial(health))
dulled = 0
@@ -144,7 +144,7 @@
to_chat(M, "You should repair [src] first. Try using [kit] on it.")
return FALSE
M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].")
if(do_after(M, sharpen_time))
if(do_after(M, sharpen_time, target = src))
M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].")
src.set_material(material)
return TRUE
@@ -93,7 +93,7 @@
user.put_in_hands(S)
else
to_chat(user, span_notice("You start compacting the snowball."))
if(do_after(user, 2 SECONDS))
if(do_after(user, 2 SECONDS, target = src))
var/atom/S = new /obj/item/material/snow/snowball/reinforced(user.loc)
qdel(src)
user.put_in_hands(S)
@@ -15,7 +15,7 @@
var/obj/item/stack/material/M = I
if(M.get_amount() >= 5)
to_chat(user, "You begin to refine the [src] with [M]...")
if(do_after(user, 70))
if(do_after(user, 7 SECONDS, target = src))
M.use(5)
var/obj/item/SK
SK = new /obj/item/material/sharpeningkit(get_turf(user), M.material.name)
@@ -198,7 +198,7 @@
if(!user.IsAdvancedToolUser())
return
if(!status && bcell && bcell.charge >= hitcost)
if(do_after(user, charge_time))
if(do_after(user, charge_time, target = src))
status = 1
user.visible_message(span_warning("[user] charges \the [src]!"),span_warning("You charge \the [src]. <b>It's hammer time!</b>"))
playsound(src, "sparks", 75, 1, -1)
+2 -2
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
if(do_after(user, 40))
if(do_after(user, 4 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.wash(CLEAN_SCRUB)
@@ -73,7 +73,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.wash(CLEAN_SCRUB)
@@ -38,7 +38,7 @@
if(istype(A, /turf) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
if(do_after(user, 40))
if(do_after(user, 4 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.clean_deploy(src)
@@ -528,7 +528,7 @@
H.visible_message(span_infoplain(span_bold("\The [H]") + " starts to pack \the [src]!"), \
span_notice("You start to pack \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
if(do_after(H, 50))
if(do_after(H, 5 SECONDS, target = src))
H.visible_message(span_infoplain(span_bold("\The [H]") + " finishes packing \the [src]!"), \
span_notice("You finish packing \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
@@ -541,7 +541,7 @@
H.visible_message(span_infoplain(span_bold("\The [src]") + " starts to unpack \the [src]!"), \
span_notice("You start to unpack \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
if(do_after(H, 25))
if(do_after(H, 25, target = src))
H.visible_message(span_infoplain(span_bold("\The [src]") + " finishes unpacking \the [src]!"), \
span_notice("You finish unpacking \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
@@ -29,7 +29,7 @@
/obj/item/storage/vore_egg/proc/hatch(mob/living/user as mob)
visible_message(span_danger("\The [src] begins to shake as something pushes out from within!"))
animate_shake()
if(do_after(user, 50))
if(do_after(user, 5 SECONDS, target = src))
if(use_sound)
playsound(src, src.use_sound, 50, 0, -5)
animate_shake()
@@ -23,7 +23,7 @@
if(user.get_active_hand() == src || user.get_inactive_hand() == src)
return TRUE // Skip delay
if(insert_delay && !do_after(user, insert_delay, src))
if(insert_delay && !do_after(user, insert_delay, target = src))
return FALSE // Moved while there is a delay
return TRUE //Now we're allowed to put the item in the pouch
@@ -33,7 +33,7 @@
if(user.get_active_hand() == src || user.get_inactive_hand() == src)
return TRUE // Skip delay
if(remove_delay && !do_after(user, remove_delay, src))
if(remove_delay && !do_after(user, remove_delay, target = src))
return FALSE // Moved while there is a delay
if(W in src)
@@ -44,7 +44,7 @@
return
if (W.has_tool_quality(TOOL_SCREWDRIVER))
if (do_after(user, 20 * W.toolspeed))
if (do_after(user, 2 SECONDS * W.toolspeed, target = src))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
user.show_message(span_notice("You [src.open ? "open" : "close"] the service panel."))
@@ -52,7 +52,7 @@
if (istype(W, /obj/item/multitool) && (src.open == 1)&& (!src.l_hacking))
user.show_message(span_notice("Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(user, 100))
if (do_after(user, 10 SECONDS, target = src))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
@@ -134,7 +134,7 @@ var/list/global/tank_gauge_cache = list()
if(wired && src.proxyassembly.assembly)
to_chat(user, span_notice("You carefully begin clipping the wires that attach to the tank."))
if(do_after(user, 100,src))
if(do_after(user, 10 SECONDS, target = src))
wired = 0
cut_overlay("bomb_assembly")
to_chat(user, span_notice("You cut the wire and remove the device."))
@@ -161,7 +161,7 @@ var/list/global/tank_gauge_cache = list()
src.proxyassembly.receive_signal()
else if(wired)
if(do_after(user, 10, src))
if(do_after(user, 1 SECOND, target = src))
to_chat(user, span_notice("You quickly clip the wire from the tank."))
wired = 0
cut_overlay("bomb_assembly")
@@ -174,7 +174,7 @@ var/list/global/tank_gauge_cache = list()
if(istype(W, /obj/item/assembly_holder))
if(wired)
to_chat(user, span_notice("You begin attaching the assembly to \the [src]."))
if(do_after(user, 50, src))
if(do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("You finish attaching the assembly to \the [src]."))
GLOB.bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]"
message_admins("[key_name_admin(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]")
@@ -190,7 +190,7 @@ var/list/global/tank_gauge_cache = list()
if(WT.remove_fuel(1,user))
if(!valve_welded)
to_chat(user, span_notice("You begin welding the \the [src] emergency pressure relief valve."))
if(do_after(user, 40,src))
if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You carefully weld \the [src] emergency pressure relief valve shut.") + " " + span_warning("\The [src] may now rupture under pressure!"))
src.valve_welded = 1
src.leaking = 0
+2 -2
View File
@@ -43,7 +43,7 @@
return
user.visible_message(span_danger("\The [user] begins taping over \the [H]'s eyes!"))
if(!do_after(user, 30))
if(!do_after(user, 3 SECONDS, target = src))
return
if(!can_place(H, user))
@@ -72,7 +72,7 @@
return
user.visible_message(span_danger("\The [user] begins taping up \the [H]'s mouth!"))
if(!do_after(user, 30))
if(!do_after(user, 3 SECONDS, target = src))
return
if(!can_place(H, user))
+5 -5
View File
@@ -35,7 +35,7 @@
"You hear the slow creaking of a spring."
)
if (do_after(user, 60))
if (do_after(user, 6 SECONDS, target = src))
user.visible_message(
span_danger("[user] has deployed \the [src]."),
span_danger("You have deployed \the [src]!"),
@@ -55,7 +55,7 @@
span_notice("[user] begins freeing [victim] from \the [src]."),
span_notice("You carefully begin to free [victim] from \the [src]."),
)
if(do_after(user, 60))
if(do_after(user, 6 SECONDS, target = src))
user.visible_message(span_notice("[victim] has been freed from \the [src] by [user]."))
for(var/A in buckled_mobs)
unbuckle_mob(A)
@@ -68,7 +68,7 @@
)
playsound(src, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 60))
if(do_after(user, 6 SECONDS, target = src))
user.visible_message(
span_danger("[user] has disarmed \the [src]."),
span_notice("You have disarmed \the [src]!")
@@ -202,7 +202,7 @@
)
playsound(src, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, health))
if(do_after(user, health, target = src))
user.visible_message(
span_danger("[user] has collected \the [src]."),
span_notice("You have collected \the [src]!")
@@ -221,7 +221,7 @@
"You hear the rustling of [material.name]."
)
if (do_after(user, 60))
if (do_after(user, 6 SECONDS, target = src))
user.visible_message(
span_danger("[user] has deployed \the [src]."),
span_danger("You have deployed \the [src]!"),
+1 -1
View File
@@ -121,7 +121,7 @@
/obj/effect/energy_net/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
user.setClickCooldown(user.get_attack_speed())
visible_message(span_danger("[user] begins to tear at \the [src]!"))
if(do_after(user, escape_time, src, timed_action_flags = IGNORE_INCAPACITATED))
if(do_after(user, escape_time, target = src, timed_action_flags = IGNORE_INCAPACITATED))
if(!has_buckled_mobs())
return
visible_message(span_danger("[user] manages to tear \the [src] apart!"))
+7 -7
View File
@@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!choice)
return
to_chat(user,span_notice("You begin moving..."))
if(!do_after(user, 10 SECONDS))
if(!do_after(user, 10 SECONDS, target = src))
return
user.forceMove(choice)
user.cancel_camera()
@@ -179,7 +179,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!can_enter(user))
user.visible_message(span_warning("\The [user] reaches into \the [src]. . ."),span_warning("You reach into \the [src]. . ."))
if(!do_after(user, 3 SECONDS))
if(!do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] pulls their hand out of \the [src]."),span_warning("You pull your hand out of \the [src]"))
return
if(!src.contents.len)
@@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
return
user.visible_message(span_notice("\The [user] begins climbing into \the [src]!"))
if(!do_after(user, 10 SECONDS))
if(!do_after(user, 10 SECONDS, target = src))
to_chat(user, span_warning("You didn't go into \the [src]!"))
return
@@ -245,7 +245,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
var/mob/living/k = M
k.visible_message(span_notice("\The [k] begins climbing into \the [src]!"))
if(!do_after(k, 3 SECONDS))
if(!do_after(k, 3 SECONDS, target = src))
to_chat(k, span_warning("You didn't go into \the [src]!"))
return
@@ -337,7 +337,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!choice)
return
to_chat(usr,span_notice("You begin moving..."))
if(!do_after(usr, 10 SECONDS))
if(!do_after(usr, 10 SECONDS, target = src))
return
if(QDELETED(src))
return
@@ -375,7 +375,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!(usr.mob_size <= MOB_TINY || usr.get_effective_size(TRUE) <= micro_accepted_scale))
usr.visible_message(span_warning("\The [usr] reaches into \the [src]. . ."),span_warning("You reach into \the [src]. . ."))
if(!do_after(usr, 3 SECONDS))
if(!do_after(usr, 3 SECONDS, target = src))
usr.visible_message(span_notice("\The [usr] pulls their hand out of \the [src]."),span_warning("You pull your hand out of \the [src]"))
return
@@ -416,7 +416,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
return
usr.visible_message(span_notice("\The [usr] begins climbing into \the [src]!"))
if(!do_after(usr, 10 SECONDS))
if(!do_after(usr, 10 SECONDS, target = src))
to_chat(usr, span_warning("You didn't go into \the [src]!"))
return
+1 -1
View File
@@ -82,7 +82,7 @@
healthcheck()
return
if(locate(/obj/item/organ/internal/xenos/resinspinner/replicant) in M.internal_organs)
if(!do_after(M, 3 SECONDS))
if(!do_after(M, 3 SECONDS, target = src))
return
visible_message (span_warning("[usr] strokes the [name] and it melts away!"), 1)
health = 0
+1 -1
View File
@@ -37,7 +37,7 @@
to_chat(user, span_warning("You need one sheet of [material.display_name] to repair \the [src]."))
return
visible_message(span_notice("[user] begins to repair \the [src]."))
if(do_after(user,20) && health < maxhealth)
if(do_after(user, 2 SECONDS, target = src) && health < maxhealth)
if(D.use(1))
health = maxhealth
visible_message(span_notice("[user] repairs \the [src]."))
+1 -1
View File
@@ -31,7 +31,7 @@ LINEN BINS
/obj/item/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins cutting up [src] with [I]."), span_notice("You begin cutting up [src] with [I]."))
if(do_after(user, 50))
if(do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("You cut [src] into pieces!"))
for(var/i in 1 to rand(2,5))
new /obj/item/reagent_containers/glass/rag(drop_location())
+1 -1
View File
@@ -77,7 +77,7 @@
/obj/structure/bonfire/proc/dismantle(mob/user)
if(!burning)
user.visible_message("[user] starts dismantling \the [src].", "You start dismantling \the [src].")
if(do_after(user, 5 SECONDS))
if(do_after(user, 5 SECONDS, target = src))
for(var/i = 1 to 5)
material.place_dismantled_product(get_turf(src))
user.visible_message("[user] dismantles down \the [src].", "You dismantle \the [src].")
+1 -1
View File
@@ -113,7 +113,7 @@
if(istype(C, /obj/item/stack/tile/floor) && !plated_tile)
var/obj/item/stack/tile/floor/ST = C
to_chat(user, span_notice("Placing tile..."))
if (!do_after(user, 10))
if (!do_after(user, 1 SECOND, target = src))
return
if(!ST.use(1))
return
@@ -278,7 +278,7 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * W.toolspeed))
if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
@@ -336,7 +336,7 @@
else
to_chat(user, span_notice("You need more welding fuel to complete this task."))
return
if(do_after(user, 20 * S.toolspeed))
if(do_after(user, 2 SECONDS * S.toolspeed, target = src))
playsound(src, S.usesound, 50)
sealed = !sealed
update_icon()
@@ -447,7 +447,7 @@
breakout = 1 //can't think of a better way to do this right now.
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
if(!do_after(escapee, 50)) //5 seconds
if(!do_after(escapee, 5 SECONDS, target = src)) //5 seconds
breakout = 0
return
if(!escapee || escapee.incapacitated() || escapee.loc != src)
@@ -27,7 +27,7 @@
if(opened)
visible_message(span_notice("[user] starts to climb into \the [src.name]."), \
span_notice("You start to lower yourself into \the [src.name]."))
if(do_after(user, 50))
if(do_after(user, 5 SECONDS, target = src))
user.forceMove(src.loc)
visible_message(span_notice("[user] climbs into \the [src.name]."), \
span_notice("You climb into \the [src.name]."))
@@ -72,7 +72,7 @@
user.visible_message(span_notice("[user] piles dirt into \the [src.name]."), \
span_notice("You start to pile dirt into \the [src.name]."), \
span_notice("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("[user] pats down the dirt on top of \the [src.name]."), \
span_notice("You finish filling in \the [src.name]."))
close()
@@ -109,7 +109,7 @@
user.visible_message(span_notice("[user] begins to smoothe out the dirt of \the [src.name]."), \
span_notice("You start to smoothe out the dirt of \the [src.name]."), \
span_notice("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("[user] finishes smoothing out \the [src.name]."), \
span_notice("You finish smoothing out \the [src.name]."))
if(LAZYLEN(contents))
@@ -125,7 +125,7 @@
user.visible_message(span_notice("[user] begins to unearth \the [src.name]."), \
span_notice("You start to unearth \the [src.name]."), \
span_notice("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("[user] reaches the bottom of \the [src.name]."), \
span_notice("You finish digging out \the [src.name]."))
break_open()
@@ -60,7 +60,7 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * W.toolspeed))
if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
@@ -31,11 +31,11 @@
var/turf/T = get_turf(src)
if(!T)
to_chat(user, span_notice("You can't open this here!"))
if(W.has_tool_quality(TOOL_WRENCH) && do_after(user, 60 * W.toolspeed, src))
if(W.has_tool_quality(TOOL_WRENCH) && do_after(user, 6 SECONDS * W.toolspeed, target = src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message(span_notice("[user] begins loosening \the [src]'s bolts."))
if(W.has_tool_quality(TOOL_WIRECUTTER) && do_after(user, 70 * W.toolspeed, src))
if(W.has_tool_quality(TOOL_WIRECUTTER) && do_after(user, 7 SECONDS * W.toolspeed, target = src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message(span_notice("[user] begins cutting \the [src]'s bolts."))
+1 -1
View File
@@ -49,7 +49,7 @@
if(P.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, span_notice("You start to cut the shower curtains."))
if(do_after(user, 10))
if(do_after(user, 1 SECOND, target = src))
to_chat(user, span_notice("You cut the shower curtains."))
new /obj/item/stack/material/plastic(src.loc, 3)
qdel(src)
+1 -1
View File
@@ -30,7 +30,7 @@
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 50, 1)
to_chat(user, span_notice("Now disassembling \the [src]..."))
if(do_after(user, 30 * O.toolspeed))
if(do_after(user, 3 SECONDS * O.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled \the [src]!"))
new /obj/item/stack/material/steel(src.loc, 1)
+11 -11
View File
@@ -177,7 +177,7 @@
playsound(src, WT.usesound, 50, 1)
if(istext(glass))
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 4 SECONDS * WT.toolspeed, src))
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You welded the [glass] plating off!"))
var/M = text2path("/obj/item/stack/material/[glass]")
@@ -185,14 +185,14 @@
glass = 0
else if(glass == 1)
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 4 SECONDS * WT.toolspeed, src))
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You welded the glass panel out!"))
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 4 SECONDS * WT.toolspeed, src))
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You dissasembled the airlock assembly!"))
new /obj/item/stack/material/steel(src.loc, 4)
@@ -208,7 +208,7 @@
else
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
if(do_after(user, 4 SECONDS * W.toolspeed, src))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured the airlock assembly!"))
anchored = !anchored
@@ -219,7 +219,7 @@
to_chat(user, span_warning("You need one length of coil to wire the airlock assembly."))
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 4 SECONDS, src) && state == 0 && anchored)
if(do_after(user, 4 SECONDS, target = src) && state == 0 && anchored)
if (C.use(1))
src.state = 1
to_chat(user, span_notice("You wire the airlock."))
@@ -228,7 +228,7 @@
playsound(src, W.usesound, 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, 4 SECONDS * W.toolspeed, src))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You cut the airlock wires.!"))
new/obj/item/stack/cable_coil(src.loc, 1)
@@ -238,7 +238,7 @@
playsound(src, W.usesound, 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, 4 SECONDS, src))
if(do_after(user, 4 SECONDS, target = src))
if(!src) return
user.drop_item()
W.loc = src
@@ -256,7 +256,7 @@
playsound(src, W.usesound, 100, 1)
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
if(do_after(user, 4 SECONDS * W.toolspeed, src))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You removed the airlock electronics!"))
src.state = 1
@@ -271,7 +271,7 @@
if(material_name == MAT_RGLASS)
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 4 SECONDS, src) && !glass)
if(do_after(user, 4 SECONDS, target = src) && !glass)
if (S.use(1))
to_chat(user, span_notice("You installed reinforced glass windows into the airlock assembly."))
glass = 1
@@ -283,7 +283,7 @@
if(S.get_amount() >= 2)
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 4 SECONDS, src) && !glass)
if(do_after(user, 4 SECONDS, target = src) && !glass)
if (S.use(2))
to_chat(user, span_notice("You installed [material_display_name(material_name)] plating into the airlock assembly."))
glass = material_name
@@ -292,7 +292,7 @@
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now finishing the airlock."))
if(do_after(user, 4 SECONDS * W.toolspeed, src))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You finish the airlock!"))
var/path
+1 -1
View File
@@ -120,7 +120,7 @@
if(O.has_tool_quality(TOOL_WRENCH))
if(finished)
to_chat(user, span_notice("You start breaking down \the [src]."))
if(do_after(user, 10 SECONDS, src))
if(do_after(user, 10 SECONDS, target = src))
new /obj/item/stack/material/plasteel(loc, 10)
playsound(user, O.usesound, 50, 1)
qdel(src)
+1 -1
View File
@@ -35,7 +35,7 @@
if(!has_extinguisher)
to_chat(user, span_notice("You start to unwrench the extinguisher cabinet."))
playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
if(do_after(user, 15 * O.toolspeed, target = src))
to_chat(user, span_notice("You unwrench the extinguisher cabinet."))
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
+1 -1
View File
@@ -195,7 +195,7 @@
else
to_chat(user, span_notice("You start to [L.pick_verb] the lock on \the [src]..."))
playsound(src, keysound,100, 1)
if(do_after(user, L.pick_time * lock_difficulty))
if(do_after(user, L.pick_time * lock_difficulty, target = src))
to_chat(user, span_notice("Success!"))
locked = FALSE
return
+2 -2
View File
@@ -36,7 +36,7 @@
if(istype(O, /obj/item/multitool))
to_chat(user, span_warning("Resetting circuitry..."))
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20 * O.toolspeed))
if(do_after(user, 2 SECONDS * O.toolspeed, target = src))
locked = 0
to_chat(user, span_warning("You disable the locking modules."))
update_icon()
@@ -87,7 +87,7 @@
else
to_chat(user, span_warning("Resetting circuitry..."))
playsound(src, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20 * O.toolspeed))
if(do_after(user, 2 SECONDS * O.toolspeed, target = src))
locked = 1
to_chat(user, span_warning("You re-enable the locking modules."))
return
+1 -1
View File
@@ -58,7 +58,7 @@
playsound(src, 'sound/effects/weightlifter.ogg', 50, 1)
user.set_dir(SOUTH)
flick("[icon_state]_[weight]", src)
if(do_after(user, 20 + (weight * 10)))
if(do_after(user, 2 SECONDS + (weight * 1 SECOND), target = src))
playsound(src, 'sound/effects/weightdrop.ogg', 25, 1)
user.adjust_nutrition(weight * -10)
var/weightloss_enhanced = weightloss_power * (weight * 0.5)
+3 -3
View File
@@ -65,7 +65,7 @@
if(removal_tool && istype(W, removal_tool))
to_chat(user, span_warning("You start uprooting \the [src]..."))
if(do_after(user, 30))
if(do_after(user, 3 SECONDS, target = src))
visible_message(span_notice("\The [user] uproots and discards \the [src]!"))
qdel(src)
return
@@ -286,7 +286,7 @@
to_chat(user, span_notice("[I] is too big to fit inside [src]."))
return
if(do_after(user, 10))
if(do_after(user, 1 SECOND, target = src))
user.drop_from_inventory(I, src)
I.forceMove(src)
stored_item = I
@@ -300,7 +300,7 @@
if(!stored_item)
to_chat(user, span_filter_notice(span_bold("You see nothing of interest in [src]...")))
else
if(do_after(user, 10))
if(do_after(user, 1 SECOND, target = src))
to_chat(user, span_filter_notice("You find [icon2html(stored_item, user.client)] [stored_item] in [src]!"))
stored_item.forceMove(get_turf(src))
stored_item = null
+1 -1
View File
@@ -46,7 +46,7 @@
if(is_stump)
if(istype(W,/obj/item/shovel))
if(do_after(user, 5 SECONDS))
if(do_after(user, 5 SECONDS, target = src))
visible_message(span_infoplain(span_bold("\The [user]") + " digs up \the [src] stump with \the [W]."))
qdel(src)
return
+10 -10
View File
@@ -152,20 +152,20 @@
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now securing the girder..."))
if(do_after(user, 40 * W.toolspeed, src))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("You secured the girder!"))
reset_girder()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(do_after(user, 3 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
@@ -178,7 +178,7 @@
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now unsecuring support struts..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You unsecured the support struts!"))
state = 1
@@ -190,7 +190,7 @@
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now removing support struts..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You removed the support struts!"))
reinf_material.place_dismantled_product(get_turf(src))
@@ -200,7 +200,7 @@
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now dislodging the girder..."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You dislodged the girder!"))
displace()
@@ -251,7 +251,7 @@
to_chat(user, span_notice("You begin adding the plating..."))
if(!do_after(user,time_to_reinforce) || !S.use(amount_to_use))
if(!do_after(user, time_to_reinforce, target = src) || !S.use(amount_to_use))
return TRUE //once we've gotten this far don't call parent attackby()
if(anchored)
@@ -285,7 +285,7 @@
return 0
to_chat(user, span_notice("Now reinforcing..."))
if (!do_after(user,40) || !S.use(1))
if (!do_after(user, 4 SECONDS, target = src) || !S.use(1))
return 1 //don't call parent attackby() past this point
to_chat(user, span_notice("You added reinforcement!"))
@@ -351,13 +351,13 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(do_after(user, 3 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
+3 -3
View File
@@ -55,21 +55,21 @@
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
return
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].")
dismantle()
..()
+1 -1
View File
@@ -136,7 +136,7 @@
to_chat(user, span_notice("There is already a window facing this way there."))
return
to_chat(user, span_notice("You start placing the window."))
if(do_after(user,20))
if(do_after(user, 2 SECONDS, target = src))
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
to_chat(user, span_notice("There is already a window facing this way there."))
+1 -1
View File
@@ -181,7 +181,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
else if (!has_items)
if (I.has_tool_quality(TOOL_WRENCH))
if (do_after(user, 5 SECONDS, src))
if (do_after(user, 5 SECONDS, target = src))
dismantle(user)
return
..()
+1 -1
View File
@@ -45,7 +45,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
//Do the searching
busy = TRUE
if(do_after(user,rand(4 SECONDS,6 SECONDS),src))
if(do_after(user, rand(4 SECONDS,6 SECONDS), target = src))
SEND_SIGNAL(src,COMSIG_LOOT_REWARD,L,searchedby)
busy = FALSE
else
+3 -3
View File
@@ -96,7 +96,7 @@
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
to_chat(user, span_notice("Now disassembling the low wall..."))
if(do_after(user, 40, src))
if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You dissasembled the low wall!"))
dismantle()
return
@@ -172,7 +172,7 @@
to_chat(user, span_warning("You need at least two rods to do this."))
return
to_chat(user, span_notice("Assembling grille..."))
if(!do_after(user, 1 SECONDS, R))
if(!do_after(user, 1 SECONDS, target = R))
return
if(!R.use(2))
return
@@ -192,7 +192,7 @@
to_chat(user, span_warning("You need at least four sheets of glass to do this."))
return
to_chat(user, span_notice("Assembling window..."))
if(!do_after(user, 4 SECONDS, G))
if(!do_after(user, 4 SECONDS, target = G))
return
if(!G.use(4))
return
+2 -2
View File
@@ -59,7 +59,7 @@
if(I.has_tool_quality(TOOL_WRENCH))
if(!glass)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
if(do_after(user, 2 SECONDS * I.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
new /obj/item/frame/mirror( src.loc )
qdel(src)
@@ -86,7 +86,7 @@
to_chat(user, span_warning("You need two sheets of glass to add them to the frame."))
return
to_chat(user, span_notice("You start to add the glass to the frame."))
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if (G.use(2))
shattered = 0
glass = 1
+2 -2
View File
@@ -64,7 +64,7 @@
/obj/structure/bed/pillowpile/attack_hand(mob/user)
to_chat(user, span_notice("Now disassembling the large pillow pile..."))
if(do_after(user, 30))
if(do_after(user, 3 SECONDS, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled the large pillow pile!"))
new sourcepillow(src.loc)
@@ -72,7 +72,7 @@
/obj/structure/bed/pillowpilefront/attack_hand(mob/user)
to_chat(user, span_notice("Now disassembling the front of the pillow pile..."))
if(do_after(user, 30))
if(do_after(user, 3 SECONDS, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled the the front of the pillow pile!"))
new sourcepillow(src.loc)
+1 -1
View File
@@ -20,7 +20,7 @@
if(P.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, span_notice("You start to cut the plastic flaps."))
if(do_after(user, 10 * P.toolspeed))
if(do_after(user, 1 SECOND * P.toolspeed, target = src))
to_chat(user, span_notice("You cut the plastic flaps."))
new /obj/item/stack/material/plastic(src.loc, 4)
qdel(src)
+3 -3
View File
@@ -199,7 +199,7 @@
// Dismantle
if(W.has_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
if(do_after(user, 2 SECONDS, target = src))
user.visible_message(span_infoplain(span_bold("\The [user]") + " dismantles \the [src]."), span_notice("You dismantle \the [src]."))
new /obj/item/stack/material/steel(get_turf(user), 2)
qdel(src)
@@ -210,7 +210,7 @@
var/obj/item/weldingtool/F = W.get_welder()
if(F.welding)
playsound(src, F.usesound, 50, 1)
if(do_after(user, 20, src))
if(do_after(user, 2 SECONDS, target = src))
user.visible_message(span_infoplain(span_bold("\The [user]") + " repairs some damage to \the [src]."), span_notice("You repair some damage to \the [src]."))
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
return
@@ -219,7 +219,7 @@
if(W.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message(span_info((anchored ? (span_bold("\The [user]") + " begins unscrewing \the [src].") : (span_bold("\The [user]") + "begins fasten \the [src]."))))
playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
if(do_after(user, 1 SECOND, target = src))
to_chat(user, (anchored ? span_notice("You have unfastened \the [src] from the floor.") : span_notice("You have fastened \the [src] to the floor.")))
anchored = !anchored
update_icon()
+1 -1
View File
@@ -1652,7 +1652,7 @@
..()
if(istype(W, /obj/item/flame/lighter) || istype(W, /obj/item/weldingtool))
visible_message(span_warning("\The [user] starts to burn \the [src] down!"))
if(!do_after(user, 2 SECONDS))
if(!do_after(user, 2 SECONDS, target = src))
return FALSE
visible_message(span_warning("\The [user] burns \the [src] down!"))
playsound(src.loc, 'sound/items/cigs_lighters/cig_light.ogg', 100, 1)
+1 -1
View File
@@ -171,7 +171,7 @@
if(istype(W,/obj/item/pickaxe) && breakable)
var/obj/item/pickaxe/digTool = W
visible_message(span_danger("[user] starts digging [src]!"))
if(do_after(user,digTool.digspeed*hardness) && src)
if(do_after(user,digTool.digspeed*hardness, target = src) && src)
visible_message(span_danger("[user] finished digging [src]!"))
Dismantle()
else if(istype(W,/obj/item) && breakable) //not sure, can't not just weapons get passed to this proc?
+1 -1
View File
@@ -61,7 +61,7 @@
usr.visible_message("[usr] begins stuffing \the [src] into \the [over_object].", "You begin stuffing \the [src] into \the [over_object].")
Bumped(usr)
if(do_after(usr, 20, over_object))
if(do_after(usr, 2 SECONDS, target = over_object))
usr.visible_message("[usr] has stuffed \the [src] into \the [over_object].", "You have stuffed \the [src] into \the [over_object].")
over_object.contain(src)
else
@@ -143,7 +143,7 @@
to_chat(user, span_notice("\The [src] already has someone buckled to it."))
return
user.visible_message(span_notice("[user] attempts to buckle [affecting] into \the [src]!"))
if(do_after(user, 20, G.affecting))
if(do_after(user, 2 SECONDS, G.affecting, target = src))
affecting.loc = loc
spawn(0)
if(buckle_mob(affecting))
@@ -405,7 +405,7 @@
else
user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * W.toolspeed))
if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
@@ -120,7 +120,7 @@
//Do the searching
busy = TRUE
if(do_after(user,rand(4 SECONDS,6 SECONDS),src))
if(do_after(user, rand(4 SECONDS,6 SECONDS), target = src))
if(hider && prob(50))
//If there was a hider, chance to reveal them
to_chat(hider,span_danger("You've been discovered!"))
+6 -6
View File
@@ -49,7 +49,7 @@
if(I.has_tool_quality(TOOL_CROWBAR))
to_chat(user, span_notice("You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]."))
playsound(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30))
if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!"), span_notice("You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!"), "You hear grinding porcelain.")
cistern = !cistern
update_icon()
@@ -69,7 +69,7 @@
if(open && !swirlie)
user.visible_message(span_danger("[user] starts to give [GM.name] a swirlie!"), span_notice("You start to give [GM.name] a swirlie!"))
swirlie = GM
if(do_after(user, 30, GM))
if(do_after(user, 3 SECONDS, target = GM))
user.visible_message(span_danger("[user] gives [GM.name] a swirlie!"), span_notice("You give [GM.name] a swirlie!"), "You hear a toilet flushing.")
if(!GM.internal)
GM.adjustOxyLoss(5)
@@ -115,7 +115,7 @@
if(open && !swirlie)
user.visible_message(span_danger("[user] starts to give [GM.name] a swirlie!"), span_notice("You start to give [GM.name] a swirlie!"))
swirlie = GM
if(do_after(user, 30, GM))
if(do_after(user, 3 SECONDS, target = GM))
user.visible_message(span_danger("[user] gives [GM.name] a swirlie!"), span_notice("You give [GM.name] a swirlie!"), "You hear a toilet flushing.")
if(!GM.internal)
GM.adjustOxyLoss(5)
@@ -206,7 +206,7 @@
var/newtemp = tgui_input_list(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve", temperature_settings)
to_chat(user, span_notice("You begin to adjust the temperature valve with \the [I]."))
playsound(src, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
if(do_after(user, 5 SECONDS * I.toolspeed, target = src))
watertemp = newtemp
user.visible_message(span_notice("[user] adjusts the shower with \the [I]."), span_notice("You adjust the shower with \the [I]."))
add_fingerprint(user)
@@ -613,7 +613,7 @@
playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
busy = 1
if(!do_after(user, 40, src))
if(!do_after(user, 4 SECONDS, target = src))
busy = 0
to_chat(user, span_notice("You stop washing your hands."))
return
@@ -691,7 +691,7 @@
to_chat(user, span_notice("You start washing \the [I]."))
busy = 1
if(!do_after(user, 40, src))
if(!do_after(user, 4 SECONDS, target = src))
busy = 0
to_chat(user, span_notice("You stop washing \the [I]."))
return
@@ -93,7 +93,7 @@
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed))
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user,span_notice("You disassembled the windoor assembly!"))
if(secure)
@@ -110,7 +110,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user,span_notice("You've secured the windoor assembly!"))
src.anchored = TRUE
@@ -121,7 +121,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user,span_notice("You've unsecured the windoor assembly!"))
src.anchored = FALSE
@@ -132,7 +132,7 @@
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
var/obj/item/stack/cable_coil/CC = W
if(do_after(user, 40))
if(do_after(user, 4 SECONDS, target = src))
if (CC.use(1))
to_chat(user,span_notice("You wire the windoor!"))
src.state = "02"
@@ -147,7 +147,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user,span_notice("You cut the windoor wires.!"))
@@ -160,7 +160,7 @@
playsound(src, '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, 4 SECONDS, target = src))
if(!src) return
user.drop_item()
@@ -176,7 +176,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src || !src.electronics) return
to_chat(user,span_notice("You've removed the airlock electronics!"))
step = 1
@@ -196,7 +196,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
+2 -2
View File
@@ -229,7 +229,7 @@
if(WT.remove_fuel(1 ,user))
to_chat(user, span_notice("You begin repairing [src]..."))
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed, target = src))
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
health = maxhealth
// playsound(src, 'sound/items/Welder.ogg', 50, 1)
update_icon()
@@ -307,7 +307,7 @@
span_infoplain(span_bold("\The [user]") + " begins to wire \the [src] for electrochromic tinting."), \
span_notice("You begin to wire \the [src] for electrochromic tinting."), \
"You hear sparks.")
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
if(do_after(user, 2 SECONDS * C.toolspeed, src) && state == 0)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
if(is_fulltile())
+2 -2
View File
@@ -62,7 +62,7 @@
var/confirm = tgui_alert(user, "The PDA you're holding contains a vulnerable ID card. Will you risk it?", "Confirmation", list("Definitely", "Cancel"))
if(confirm != "Definitely")
return FALSE
if(!do_after(user, 100, src))
if(!do_after(user, 10 SECONDS, target = src))
return FALSE
user.visible_message(span_warning("[user] successfully makes [src] disappear!"))
return TRUE
@@ -85,7 +85,7 @@
return FALSE
else
user.visible_message(span_warning("[user] is threatening to make [src] disappear!"))
if(!do_after(user, 100, src))
if(!do_after(user, 10 SECONDS, target = src))
return FALSE
user.visible_message(span_warning("[user] successfully makes [src] disappear!"))
return TRUE