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
@@ -287,7 +287,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -248,7 +248,7 @@ Thus, the two variables affect pump operation are set in New():
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -90,7 +90,7 @@
return 1
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
playsound(src, W.usesound, 50, 1)
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + "unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -160,7 +160,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -60,7 +60,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
+1 -1
View File
@@ -335,7 +335,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -83,7 +83,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -193,7 +193,7 @@
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -387,7 +387,7 @@
var/obj/item/weldingtool/WT = W.get_welder()
if (WT.remove_fuel(0,user))
to_chat(user, span_notice("Now welding the vent."))
if(do_after(user, 20 * WT.toolspeed))
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
playsound(src, WT.usesound, 50, 1)
if(!welded)
@@ -440,7 +440,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
@@ -284,7 +284,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
+1 -1
View File
@@ -299,7 +299,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
+1 -1
View File
@@ -154,7 +154,7 @@
playsound(src, W.usesound, 50, 1)
if (do_after(user, 10 * W.toolspeed))
if (do_after(user, 10 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
+4 -3
View File
@@ -300,12 +300,13 @@ Proc for attack log creation, because really why not
drifting = TRUE*/
var/holding = user.get_active_hand()
/* //Disabling for now. Meant to be used for modifier slowdowns.
if(!(timed_action_flags & IGNORE_SLOWDOWNS))
var/slowdown = user.calculate_item_encumbrance()
if(slowdown)
delay *= slowdown
//Let's not be TOO evil. You can be up to 4x faster, but never more than 3x slower.
delay *= CLAMP(slowdown, 0.25, 3)
*/
var/datum/progressbar/progbar
var/datum/cogbar/cog
@@ -78,7 +78,7 @@
// Display action
name = "[human_owner]'s [feedback]"
user.visible_message("\The [user] starts to connect the hose to \the [human_owner]'s [feedback]...")
if(!do_after(user,7 SECONDS,human_owner))
if(!do_after(user, 7 SECONDS, target = human_owner))
to_chat(user,span_warning("You couldn't connect the hose!"))
return FALSE
if(other.get_hose() || get_hose()) // SHouldn't be connected to anything yet!
@@ -33,7 +33,7 @@
to_chat(src, span_warning("There is too much light here for your trap to last!"))
return FALSE
if(do_after(src, 10))
if(do_after(src, 1 SECOND, target = src))
if(SK.in_phase)
new /obj/effect/abstract/dark_maw(loc, src, TRUE)
else
@@ -64,7 +64,7 @@
smoke.start()
src.visible_message(span_notice("[src] begins pulling dark energies around themselves."))
if(do_after(src, tunnel_time))
if(do_after(src, tunnel_time, target = src))
if(SK.created_dark_tunnel) //check again because the user may have queued this up multiple times.
to_chat(src, span_warning("You have already made a tunnel to the Dark!"))
return FALSE
+2 -2
View File
@@ -115,7 +115,7 @@
to_chat(owner, span_warning("You can't weave here!"))
return
if(do_after(owner, desired_result.time))
if(do_after(owner, desired_result.time, target = src))
if(desired_result.cost > silk_reserve)
to_chat(owner, span_warning("You don't have enough silk to weave that!"))
return
@@ -168,7 +168,7 @@
to_chat(owner, span_warning("You can't weave here!"))
return
if(do_after(owner, desired_result.time))
if(do_after(owner, desired_result.time, target = src))
if(desired_result.cost > silk_reserve)
to_chat(owner, span_warning("You don't have enough silk to weave that!"))
return
+1 -1
View File
@@ -76,7 +76,7 @@
user.visible_message(span_warning("[user] starts climbing onto \the [climbed_thing]!"))
LAZYADDASSOCLIST(current_climbers, climbed_thing, user)
if(do_after(user,(issmall(user) ? delay_time * 0.6 : delay_time)))
if(do_after(user,(issmall(user) ? delay_time * 0.6 : delay_time), target = user))
if(can_climb(climbed_thing, user, post_climb_check=1))
climb_to(climbed_thing, user)
if(get_turf(user) == get_turf(climbed_thing))
+2 -2
View File
@@ -528,7 +528,7 @@
T.add_overlay(target_image)
if(do_after(user, pre_shot_delay))
if(do_after(user, pre_shot_delay, target = src))
succeeded = TRUE
T.cut_overlay(target_image)
@@ -676,7 +676,7 @@
var/windup = cooldown
if(W.reinf_material)
windup = cooldown * 2
if(do_after(user, windup))
if(do_after(user, windup, target = src))
W.visible_message(span_danger("\The [user] [attack_message] \the [W], obliterating it!"))
W.dismantle_wall(1)
else
+1 -1
View File
@@ -404,7 +404,7 @@ GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa","
V.show_message(span_danger("\The [user] slices open a finger and begins to chant and paint symbols on the floor."), 3, span_danger("You hear chanting."), 2)
to_chat(user, span_danger("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, 5 SECONDS, target = src))
var/area/A = get_area(user)
log_and_message_admins("created \an [chosen_rune] rune at \the [A.name] - [user.loc.x]-[user.loc.y]-[user.loc.z].")
if(user.get_active_hand() != src)
+2 -2
View File
@@ -406,7 +406,7 @@
return
if(UNCONSCIOUS)
to_chat(usr, span_notice("You struggle through the haze to hit the eject button. This will take a couple of minutes..."))
if(do_after(usr, 2 MINUTES, src))
if(do_after(usr, 2 MINUTES, target = src))
go_out()
if(CONSCIOUS)
go_out()
@@ -472,7 +472,7 @@
else
visible_message("\The [user] starts putting [M] into \the [src].")
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(M.buckled)
return
if(occupant)
+1 -1
View File
@@ -74,7 +74,7 @@
return
user.visible_message("[user] starts to disassemble \the [src].", "You start to disassemble \the [src].")
playsound(src, WT.usesound, 50, 1)
if(do_after(user,15 * W.toolspeed))
if(do_after(user,15 * W.toolspeed, target = src))
if(!src || !user || !WT.remove_fuel(5, user)) return
to_chat(user, span_notice("You fully disassemble \the [src]. There were no salvageable parts."))
qdel(src)
+1 -1
View File
@@ -262,7 +262,7 @@ update_flag
to_chat(user, span_warning("\The [src]'s internal pressure is too high! Empty the canister before attempting to weld it apart."))
return
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You deconstruct the [src]."))
new /obj/item/stack/material/steel( src.loc, 10)
+2 -2
View File
@@ -118,7 +118,7 @@
if(open && over_object == usr && Adjacent(usr))
to_chat(usr, span_notice("You begin to remove \the [src]..."))
if (do_after(usr, 30, src))
if (do_after(usr, 3 SECONDS, target = src))
to_chat(usr, span_notice("You have removed \the [src]."))
var/obj/item/clamp/C = new/obj/item/clamp(src.loc)
C.forceMove(usr.loc)
@@ -143,7 +143,7 @@
if (istype(A, /obj/machinery/atmospherics/pipe/simple))
to_chat(user, span_notice("You begin to attach \the [src] to \the [A]..."))
var/C = locate(/obj/machinery/clamp) in get_turf(A)
if (do_after(user, 30, src) && !C)
if (do_after(user, 3 SECONDS, target = src) && !C)
if(!user.unEquip(src))
return
to_chat(user, span_notice("You have attached \the [src] to \the [A]."))
+1 -1
View File
@@ -109,7 +109,7 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
+1 -1
View File
@@ -306,7 +306,7 @@
if(container)
to_chat(user, span_warning("\The [src] already has a container loaded!"))
return
else if(do_after(user, 1 SECOND))
else if(do_after(user, 1 SECOND, target = src))
user.visible_message("[user] has loaded \the [G] into \the [src].", "You load \the [G] into \the [src].")
container = G
user.drop_item()
+1 -1
View File
@@ -390,7 +390,7 @@
playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 100 * WT.toolspeed))
if(do_after(user, 10 SECONDS * WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
@@ -165,7 +165,7 @@
playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 20 * WT.toolspeed))
if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
+1 -1
View File
@@ -109,7 +109,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
+1 -1
View File
@@ -233,7 +233,7 @@
else if(istype(W,/obj/item/reagent_containers/glass))
if(LAZYLEN(containers) >= container_limit)
to_chat(user, span_warning("\The [src] has too many containers loaded!"))
else if(do_after(user, 1 SECOND))
else if(do_after(user, 1 SECOND, target = src))
user.visible_message("[user] has loaded \the [W] into \the [src].", "You load \the [W] into \the [src].")
containers += W
user.drop_item()
+7 -7
View File
@@ -23,7 +23,7 @@
if(0)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You wrench the frame into place."))
anchored = TRUE
state = 1
@@ -33,7 +33,7 @@
to_chat(user, "The welder must be on for this task.")
return
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(0, user)) return
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/plasteel( loc, 4)
@@ -41,7 +41,7 @@
if(1)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
anchored = FALSE
state = 0
@@ -77,7 +77,7 @@
return
to_chat(user, span_notice("You start to add cables to the frame."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, 20) && state == 2)
if (do_after(user, 2 SECONDS, target = src) && state == 2)
if (C.use(5))
state = 3
icon_state = "3"
@@ -101,7 +101,7 @@
return
to_chat(user, span_notice("You start to put in the glass panel."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, 20) && state == 3)
if (do_after(user, 2 SECONDS, target = src) && state == 3)
if(RG.use(2))
to_chat(user, span_notice("You put in the glass panel."))
state = 4
@@ -242,7 +242,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
if(anchored)
user.visible_message(span_bold("\The [user]") + " starts to unbolt \the [src] from the plating...")
playsound(src, W.usesound, 50, 1)
if(!do_after(user,40 * W.toolspeed))
if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_bold("\The [user]") + " decides not to unbolt \the [src].")
return
user.visible_message(span_bold("\The [user]") + " finishes unfastening \the [src]!")
@@ -251,7 +251,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
else
user.visible_message(span_bold("\The [user]") + " starts to bolt \the [src] to the plating...")
playsound(src, W.usesound, 50, 1)
if(!do_after(user,40 * W.toolspeed))
if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_bold("\The [user]") + " decides not to bolt \the [src].")
return
user.visible_message(span_bold("\The [user]") + " finishes fastening down \the [src]!")
@@ -15,7 +15,7 @@
if(0)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You wrench the frame into place."))
src.anchored = TRUE
src.state = 1
@@ -25,7 +25,7 @@
to_chat(user, "The welding tool must be on to complete this task.")
return
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/steel( src.loc, 5 )
@@ -33,7 +33,7 @@
if(1)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
src.anchored = FALSE
src.state = 0
@@ -73,7 +73,7 @@
return
to_chat(user, span_notice("You start to add cables to the frame."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == 2)
if(do_after(user, 2 SECONDS, target = src) && state == 2)
if (C.use(5))
to_chat(user, span_notice("You add cables to the frame."))
state = 3
@@ -94,7 +94,7 @@
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to put in the glass panel."))
if(do_after(user, 20) && state == 3)
if(do_after(user, 2 SECONDS, target = src) && state == 3)
if (G.use(2))
to_chat(user, span_notice("You put in the glass panel."))
src.state = 4
+1 -1
View File
@@ -52,7 +52,7 @@
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(I.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(stat & BROKEN)
to_chat(user, span_notice("The broken glass falls out."))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
+1 -1
View File
@@ -35,7 +35,7 @@
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to add cables to the frame."))
if(do_after(user, 20) && state == 1)
if(do_after(user, 2 SECONDS, target = src) && state == 1)
if(C.use(5))
to_chat(user, span_notice("You add cables to the frame."))
state = 2
+2 -2
View File
@@ -620,7 +620,7 @@
visible_message("[usr] [on_enter_visible_message] [src].", 3)
if(do_after(usr, 20))
if(do_after(usr, 2 SECONDS, target = src))
if(!usr || !usr.client)
return
@@ -717,7 +717,7 @@
else
visible_message("\The [user] starts putting [M] into \the [src].", 3)
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(occupant)
to_chat(user, span_warning("\The [src] is already occupied."))
return
+1 -1
View File
@@ -74,7 +74,7 @@
var/choice = tgui_input_list(user, "What would you like to paint the cutout as?", "Cutout Painting", cutout_types)
if(!choice || !Adjacent(user) || I != user.get_active_hand())
return TRUE
if(do_after(user, 10 SECONDS, src))
if(do_after(user, 10 SECONDS, target = src))
var/picked_type = cutout_types[choice]
new picked_type(loc)
qdel(src) //Laaaazy. Technically heals it too. Must be held together with all that paint.
+1 -1
View File
@@ -139,7 +139,7 @@
else if(W.has_tool_quality(TOOL_WRENCH))
to_chat(user, span_notice("You start to unwrench \the [src]."))
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15) && !QDELETED(src))
if(do_after(user, 15, target = src) && !QDELETED(src))
to_chat(user, span_notice("You unwrench \the [src]."))
new /obj/item/frame/doorbell(src.loc)
qdel(src)
+4 -4
View File
@@ -68,7 +68,7 @@
if(src.locked || src.welded)
visible_message(span_danger("\The [user] begins breaking into \the [src] internals!"))
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
if(do_after(user,10 SECONDS,src))
if(do_after(user, 10 SECONDS, target = src))
src.locked = 0
src.welded = 0
update_icon()
@@ -94,7 +94,7 @@
if(src.locked || src.welded)
visible_message(span_alium("\The [user] begins tearing into \the [src] internals!"))
src.do_animate("deny")
if(do_after(user,15 SECONDS,src))
if(do_after(user, 15 SECONDS, target = src))
visible_message(span_danger("\The [user] tears \the [src] open, sparks flying from its electronics!"))
src.do_animate("spark")
playsound(src, 'sound/machines/door/airlock_tear_apart.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS)
@@ -105,7 +105,7 @@
src.set_broken() //These aren't emags, these be CLAWS
else if(src.density)
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
if(do_after(user, 5 SECONDS,src))
if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS)
visible_message(span_danger("\The [user] forces \the [src] open!"))
open(1)
@@ -1214,7 +1214,7 @@ About the new airlock wires panel:
if(can_remove_electronics())
playsound(src, C.usesound, 75, 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 * C.toolspeed))
if(do_after(user, 4 SECONDS * C.toolspeed, target = src))
to_chat(user, span_notice("You removed the airlock electronics!"))
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
+5 -5
View File
@@ -199,7 +199,7 @@
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
return
to_chat(user, span_notice("You begin repairing [src]..."))
if(do_after(user, 30))
if(do_after(user, 3 SECONDS, target = src))
if(P.use(amt))
to_chat(user, span_notice("You have repaired \The [src]"))
src.repair()
@@ -228,13 +228,13 @@
if(istype(X.species, /datum/species/xenos))
if(src.density)
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
if(do_after(user, 15 SECONDS,src))
if(do_after(user, 15 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
visible_message(span_danger("\The [user] forces \the [src] open!"))
force_open(1)
else
visible_message(span_alium("\The [user] begins forcing \the [src] closed!"))
if(do_after(user, 5 SECONDS,src))
if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
visible_message(span_danger("\The [user] forces \the [src] closed!"))
force_close(1)
@@ -252,12 +252,12 @@
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
if(src.density)
visible_message(span_danger("\The [user] starts forcing \the [src] open!"))
if(do_after(user, 5 SECONDS, src))
if(do_after(user, 5 SECONDS, target = src))
visible_message(span_danger("\The [user] forces \the [src] open!"))
force_open(1)
else
visible_message(span_danger("\The [user] starts forcing \the [src] closed!"))
if(do_after(user, 2 SECONDS, src))
if(do_after(user, 2 SECONDS, target = src))
visible_message(span_danger("\The [user] forces \the [src] closed!"))
force_close(1)
user.set_AI_busy(FALSE)
+1 -1
View File
@@ -237,7 +237,7 @@
to_chat(user, span_notice("You start to fix dents and repair \the [src]."))
playsound(src, welder.usesound, 50, 1)
var/repairtime = maxhealth - health //Since we're not using materials anymore... We'll just calculate how much damage there is to repair.
if(do_after(user, repairtime * welder.toolspeed) && welder && welder.isOn())
if(do_after(user, repairtime * welder.toolspeed, target = src) && welder && welder.isOn())
to_chat(user, span_notice("You finish repairing the damage to \the [src]."))
health = maxhealth
update_icon()
+1 -1
View File
@@ -87,7 +87,7 @@
if(welder.remove_fuel(0,user))
to_chat(user, span_notice("You start welding the plasteel into place."))
playsound(src, welder.usesound, 50, 1)
if(do_after(user, 10 * welder.toolspeed) && welder && welder.isOn())
if(do_after(user, 1 SECOND * welder.toolspeed, target = src) && welder && welder.isOn())
to_chat(user, span_notice("You finish reinforcing \the [src]."))
heat_proof = 1
update_icon()
+6 -6
View File
@@ -198,14 +198,14 @@
if(istype(X.species, /datum/species/xenos))
if(src.blocked)
visible_message(span_alium("\The [user] begins digging into \the [src] internals!"))
if(do_after(user,5 SECONDS,src))
if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
src.blocked = 0
update_icon()
open(1)
else if(src.density)
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
if(do_after(user, 2 SECONDS,src))
if(do_after(user, 2 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
visible_message(span_danger("\The [user] forces \the [src] open!"))
open(1)
@@ -224,7 +224,7 @@
if(src.density)
visible_message(span_danger("\The [user] starts forcing \the [src] open!"))
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
if(do_after(user, time_to_force, src))
if(do_after(user, time_to_force, target = src))
visible_message(span_danger("\The [user] forces \the [src] open!"))
src.blocked = 0
open(1)
@@ -233,7 +233,7 @@
time_to_force = (time_to_force / 2)
visible_message(span_danger("\The [user] starts forcing \the [src] closed!"))
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
if(do_after(user, time_to_force, src))
if(do_after(user, time_to_force, target = src))
visible_message(span_danger("\The [user] forces \the [src] closed!"))
close(1)
user.set_AI_busy(FALSE)
@@ -280,7 +280,7 @@
else
user.visible_message(span_danger("[user] is removing the electronics from \the [src]."),
"You start to remove the electronics from [src].")
if(do_after(user,30))
if(do_after(user, 3 SECONDS, target = src))
if(blocked && density && hatch_open)
playsound(src, C.usesound, 50, 1)
user.visible_message(span_danger("[user] has removed the electronics from \the [src]."),
@@ -329,7 +329,7 @@
prying = 1
update_icon()
playsound(src, C.usesound, 100, 1)
if(do_after(user,30 * C.toolspeed))
if(do_after(user,3 SECONDS * C.toolspeed, target = src))
if(C.has_tool_quality(TOOL_CROWBAR))
if(stat & (BROKEN|NOPOWER) || !density)
user.visible_message(span_danger("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!"),\
@@ -26,7 +26,7 @@
to_chat(user, span_warning("You need one length of coil to wire \the [src]."))
return
user.visible_message("[user] wires \the [src].", "You start to wire \the [src].")
if(do_after(user, 40) && !wired && anchored)
if(do_after(user, 4 SECONDS, target = src) && !wired && anchored)
if (cable.use(1))
wired = 1
to_chat(user, span_notice("You wire \the [src]."))
@@ -35,7 +35,7 @@
playsound(src, C.usesound, 100, 1)
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
if(do_after(user, 40))
if(do_after(user, 4 SECONDS, target = src))
if(!src) return
to_chat(user, span_notice("You cut the wires!"))
new/obj/item/stack/cable_coil(src.loc, 1)
@@ -67,7 +67,7 @@
if(glass)
user.visible_message(span_warning("[user] welds the glass panel out of \the [src]."),
span_notice("You start to weld the glass panel out of \the [src]."))
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src) && WT.isOn())
to_chat(user, span_notice("You welded the glass panel out!"))
new /obj/item/stack/material/glass/reinforced(drop_location())
glass = FALSE
@@ -75,7 +75,7 @@
return
if(!anchored)
user.visible_message(span_warning("[user] dissassembles \the [src]."), "You start to dissassemble \the [src].")
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src) && WT.isOn())
user.visible_message(span_warning("[user] has dissassembled \the [src]."),
"You have dissassembled \the [src].")
new /obj/item/stack/material/steel(drop_location(), 2)
@@ -89,7 +89,7 @@
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message(span_info("[user] adds [S.name] to \the [src]."),
span_notice("You start to install [S.name] into \the [src]."))
if(do_after(user, 40, src) && !glass && S.use(1))
if(do_after(user, 4 SECONDS, target = src) && !glass && S.use(1))
to_chat(user, span_notice("You installed reinforced glass windows into \the [src]."))
glass = TRUE
update_icon()
+2 -2
View File
@@ -200,7 +200,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
update_icon()
to_chat(user, span_notice("You repair [src]."))
@@ -223,7 +223,7 @@
if (!density && I.has_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 50, 1)
user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.")
if (do_after(user,40 * I.toolspeed))
if (do_after(user, 4 SECONDS * I.toolspeed, target = src))
to_chat(user,span_notice("You pried the windoor out of the frame!"))
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)
+1 -1
View File
@@ -46,7 +46,7 @@ var/list/floor_light_cache = list()
to_chat(user, span_warning("\The [src] must be on to complete this task."))
return
playsound(src, WT.usesound, 50, 1)
if(!do_after(user, 20 * WT.toolspeed))
if(!do_after(user, 2 SECONDS * WT.toolspeed, target = src))
return
if(!src || !WT.isOn())
return
+6 -6
View File
@@ -354,7 +354,7 @@ GLOBAL_LIST(construction_frame_floor)
if(state == FRAME_PLACED && !anchored)
to_chat(user, span_notice("You start to wrench the frame into place."))
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
anchored = TRUE
if(!need_circuit && circuit)
state = FRAME_FASTENED
@@ -366,7 +366,7 @@ GLOBAL_LIST(construction_frame_floor)
else if(state == FRAME_PLACED && anchored)
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
anchored = FALSE
@@ -375,7 +375,7 @@ GLOBAL_LIST(construction_frame_floor)
var/obj/item/weldingtool/WT = P.get_welder()
if(WT.remove_fuel(0, user))
playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
if(src && WT.isOn())
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/steel(src.loc, frame_type.frame_size)
@@ -551,7 +551,7 @@ GLOBAL_LIST(construction_frame_floor)
return
to_chat(user, span_notice("You start to add cables to the frame."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == FRAME_FASTENED)
if(do_after(user, 2 SECONDS, target = src) && state == FRAME_FASTENED)
if(C.use(5))
to_chat(user, span_notice("You add cables to the frame."))
state = FRAME_WIRED
@@ -611,7 +611,7 @@ GLOBAL_LIST(construction_frame_floor)
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to put in the glass panel."))
if(do_after(user, 20) && state == FRAME_WIRED)
if(do_after(user, 2 SECONDS, target = src) && state == FRAME_WIRED)
if(G.use(2))
to_chat(user, span_notice("You put in the glass panel."))
state = FRAME_PANELED
@@ -623,7 +623,7 @@ GLOBAL_LIST(construction_frame_floor)
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to put in the glass panel."))
if(do_after(user, 20) && state == FRAME_WIRED)
if(do_after(user, 2 SECONDS, target = src) && state == FRAME_WIRED)
if(G.use(2))
to_chat(user, span_notice("You put in the glass panel."))
state = FRAME_PANELED
+1 -1
View File
@@ -69,7 +69,7 @@
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You start to dismantle the IV drip."))
if(do_after(user, 15))
if(do_after(user, 15, target = src))
to_chat(user, span_notice("You dismantle the IV drip."))
new /obj/item/stack/rods(src.loc, 6)
if(beaker)
+1 -1
View File
@@ -401,7 +401,7 @@ Class Procs:
return 0
to_chat(user, span_notice("You start disconnecting the monitor."))
playsound(src, S.usesound, 50, 1)
if(do_after(user, 20 * S.toolspeed))
if(do_after(user, 2 SECONDS * S.toolspeed, target = src))
if(stat & BROKEN)
to_chat(user, span_notice("The broken glass falls out."))
new /obj/item/material/shard(src.loc)
+1 -1
View File
@@ -103,7 +103,7 @@
// Service begins, delay
visible_message(span_bold("\The [src]") + " scans [user] thoroughly!")
flick("kiosk_active", src)
if(!do_after(user, 5 SECONDS, src) || inoperable())
if(!do_after(user, 5 SECONDS, target = src) || inoperable())
suspend()
return
+5 -5
View File
@@ -104,7 +104,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...")
if(do_after(user,40 * WT.toolspeed))
if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !user || !WT.remove_fuel(5, user)) return
user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.")
removal_stage = 1
@@ -115,7 +115,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...")
playsound(src, O.usesound, 50, 1)
if(do_after(user,15 * O.toolspeed))
if(do_after(user,15 * O.toolspeed, target = src))
if(!src || !user) return
user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.")
removal_stage = 2
@@ -132,7 +132,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...")
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 || !user || !WT.remove_fuel(5, user)) return
user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.")
removal_stage = 3
@@ -143,7 +143,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...")
playsound(src, O.usesound, 50, 1)
if(do_after(user,50 * O.toolspeed))
if(do_after(user, 5 SECONDS * O.toolspeed, target = src))
if(!src || !user) return
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
removal_stage = 4
@@ -154,7 +154,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...")
playsound(src, O.usesound, 50, 1)
if(do_after(user,80 * O.toolspeed))
if(do_after(user, 8 SECONDS * O.toolspeed, target = src))
if(!src || !user) return
user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
anchored = FALSE
+2 -2
View File
@@ -120,7 +120,7 @@
if (unwrenched==0)
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src] from the floor..."))
if (do_after(user, 40 * W.toolspeed))
if (do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message( \
span_notice("[user] unfastens \the [src]."), \
span_notice("You have unfastened \the [src]. Now it can be pulled somewhere else."), \
@@ -133,7 +133,7 @@
else /*if (unwrenched==1)*/
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to fasten \the [src] to the floor..."))
if (do_after(user, 20 * W.toolspeed))
if (do_after(user, 2 SECONDS * W.toolspeed, target = src))
user.visible_message( \
span_notice("[user] fastens \the [src]."), \
span_notice("You have fastened \the [src]. Now it can dispense pipes."), \
+4 -4
View File
@@ -485,7 +485,7 @@
//If the turret is destroyed, you can remove it with a crowbar to
//try and salvage its components
to_chat(user, span_notice("You begin prying the metal coverings off."))
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(can_salvage && prob(70))
to_chat(user, span_notice("You remove the turret and salvage some components."))
if(installation)
@@ -517,7 +517,7 @@
)
wrenching = TRUE
if(do_after(user, 50 * I.toolspeed))
if(do_after(user, 5 SECONDS * I.toolspeed, target = src))
//This code handles moving the turret around. After all, it's a portable turret!
if(!anchored)
playsound(src, I.usesound, 100, 1)
@@ -976,7 +976,7 @@
return
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
if(do_after(user, 2 SECONDS * I.toolspeed, target = src))
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
to_chat(user, "You remove the turret's interior metal armor.")
@@ -1052,7 +1052,7 @@
to_chat(user, span_notice("You need more fuel to complete this task."))
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 30 * WT.toolspeed))
if(do_after(user, 3 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(5, user))
return
build_step = 8
@@ -162,7 +162,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
visible_message(span_notice("[user] starts putting [G.affecting.name] into the suit cycler."), 3)
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(!G || !G.affecting) return
var/mob/M = G.affecting
if(M.client)
@@ -365,7 +365,7 @@
to_chat(usr, span_warning("It's too cluttered inside for you to fit in!"))
return
visible_message(span_info("[usr] starts squeezing into the suit storage unit!"), 3)
if(do_after(usr, 10))
if(do_after(usr, 1 SECOND, target = src))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
@@ -405,7 +405,7 @@
to_chat(user, span_warning("The unit's storage area is too cluttered."))
return
visible_message(span_notice("[user] starts putting [G.affecting.name] into the Suit Storage Unit."), 3)
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting
if(M.client)
+1 -1
View File
@@ -13,7 +13,7 @@
/obj/item/supply_beacon/attack_self(var/mob/user)
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins setting up \the [src]."))
if(!do_after(user, deploy_time))
if(!do_after(user, deploy_time, target = src))
return
var/obj/S = new deploy_path(get_turf(user))
user.visible_message(span_infoplain(span_bold("\The [user]") + " deploys \the [S]."))
@@ -181,7 +181,7 @@
else
visible_message("\The [user] starts putting [M] into \the [src].")
if(do_after(user, 20))
if(do_after(user, 2 SECONDS, target = src))
if(occupant)
to_chat(user, span_warning("\The [src] is already occupied."))
return
+1 -1
View File
@@ -87,7 +87,7 @@
set category = "Object"
set src in usr.loc
if((state in list(1,3,6)) && do_after(usr, 20))
if((state in list(1,3,6)) && do_after(usr, 2 SECONDS, target = src))
usr.loc = src.loc
/obj/machinery/washing_machine/update_icon()
+2 -11
View File
@@ -46,17 +46,8 @@
playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1)
if(damage_type == BRUTE)
step_away(M,src,15)
/*
if(M.stat>1)
M.gib()
melee_can_hit = 0
if(do_after(melee_cooldown))
melee_can_hit = 1
return
*/
if(ishuman(T))
var/mob/living/carbon/human/H = T
// if (M.health <= 0) return
var/obj/item/organ/external/temp = H.get_organ(pick(BP_TORSO, BP_TORSO, BP_TORSO, BP_HEAD))
if(temp)
@@ -104,7 +95,7 @@
src.visible_message("[src] pushes [T] out of the way.")
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_action(melee_cooldown))
melee_can_hit = 1
return
@@ -124,7 +115,7 @@
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_action(melee_cooldown))
melee_can_hit = 1
return
+1 -1
View File
@@ -140,7 +140,7 @@
if(integrity < max_integrity)
to_chat(user, span_notice("You start to repair damage to \the [src]."))
while(integrity < max_integrity && NP)
if(do_after(user, 1 SECOND, src))
if(do_after(user, 1 SECOND, target = src))
NP.use(1)
adjust_integrity(NP.mech_repair)
+3 -3
View File
@@ -32,7 +32,7 @@
var/obj/machinery/door/firedoor/FD = O
if(FD.blocked)
FD.visible_message(span_danger("\The [chassis] begins prying on \the [FD]!"))
if(do_after(chassis.occupant,10 SECONDS,FD))
if(do_after(chassis.occupant, 10 SECONDS, target = FD))
playsound(FD, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
FD.blocked = 0
FD.update_icon()
@@ -40,7 +40,7 @@
FD.visible_message(span_warning("\The [chassis] tears \the [FD] open!"))
else if(FD.density)
FD.visible_message(span_warning("\The [chassis] begins forcing \the [FD] open!"))
if(do_after(chassis.occupant, 5 SECONDS,FD))
if(do_after(chassis.occupant, 5 SECONDS, target = FD))
playsound(FD, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
FD.visible_message(span_danger("\The [chassis] forces \the [FD] open!"))
FD.open(1)
@@ -54,7 +54,7 @@
else if(!AD.operating)
if(AD.welded)
AD.visible_message(span_warning("\The [chassis] begins prying on \the [AD]!"))
if(do_after(chassis.occupant, 15 SECONDS,AD) && chassis.Adjacent(AD))
if(do_after(chassis.occupant, 15 SECONDS, target = AD) && chassis.Adjacent(AD))
AD.welded = FALSE
AD.update_icon()
playsound(AD, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
+1 -1
View File
@@ -81,7 +81,7 @@
chassis.float_direction = direction
chassis.start_process(MECHA_PROC_MOVEMENT)
chassis.log_message(span_warning("Movement control lost. Inertial movement started."))
if(chassis.do_after(get_step_delay()))
if(chassis.do_after_action(get_step_delay()))
chassis.can_move = 1
return 1
return 0
@@ -30,7 +30,7 @@
var/datum/beam/ScanBeam = chassis.Beam(target, "g_beam", 'icons/effects/beam.dmi', 2 SECONDS, 10, /obj/effect/ebeam, 2)
if(do_after(chassis.occupant, 2 SECONDS))
if(do_after(chassis.occupant, 2 SECONDS, target))
my_scanner.ScanTurf(target, chassis.occupant, exact_scan)
QDEL_NULL(ScanBeam)
+1 -1
View File
@@ -26,7 +26,7 @@
if (chassis)
chassis.visible_message(span_notice("[user] starts to climb into [chassis]."))
if(do_after(user, 40))
if(do_after(user, 4 SECONDS, target = src))
if(!src.occupant)
user.forceMove(src)
occupant = user
+5 -5
View File
@@ -479,7 +479,7 @@
radio.icon_state = icon_state
radio.subspace_transmission = 1
/obj/mecha/proc/do_after(delay as num)
/obj/mecha/proc/do_after_action(delay as num) //This is literally just a sleep disguised as a proc. Fucking bullshit.
sleep(delay)
if(src)
return 1
@@ -871,7 +871,7 @@
float_direction = direction
start_process(MECHA_PROC_MOVEMENT)
src.log_message(span_warning("Movement control lost. Inertial movement started."))
if(do_after(get_step_delay()))
if(do_after_action(get_step_delay()))
can_move = 1
return 1
return 0
@@ -1582,7 +1582,7 @@
else if(C.integrity < C.max_integrity)
to_chat(user, span_notice("You start to repair damage to \the [C]."))
while(C.integrity < C.max_integrity && NP)
if(do_after(user, 1 SECOND, src))
if(do_after(user, 1 SECOND, target = src))
NP.use(1)
C.adjust_integrity(NP.mech_repair)
@@ -2613,7 +2613,7 @@
var/mob/occupant = P.occupant
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins opening the hatch on \the [P]..."), span_notice("You begin opening the hatch on \the [P]..."))
if (!do_after(user, 40))
if (!do_after(user, 4 SECONDS, target = src))
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " opens the hatch on \the [P] and removes [occupant]!"), span_notice("You open the hatch on \the [P] and remove [occupant]!"))
@@ -2653,7 +2653,7 @@
src.occupant_message("Recalibrating coordination system.")
src.log_message("Recalibration of coordination system started.")
var/T = src.loc
if(do_after(100))
if(do_after_action(100))
if(T == src.loc)
src.clearInternalDamage(MECHA_INT_CONTROL_LOST)
src.occupant_message(span_blue("Recalibration successful."))
+2 -2
View File
@@ -80,7 +80,7 @@
src.visible_message("[src] pushes [target] out of the way.")
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_action(melee_cooldown))
melee_can_hit = 1
return
@@ -95,7 +95,7 @@
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_action(melee_cooldown))
melee_can_hit = 1
break
return
@@ -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."))

Some files were not shown because too many files have changed in this diff Show More