mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] Makes uses of do_after sane (#11582)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2c34c93e00
commit
1b8f394a14
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -267,7 +267,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)
|
||||
|
||||
@@ -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]."))
|
||||
|
||||
@@ -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]."), \
|
||||
|
||||
@@ -333,7 +333,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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -119,7 +119,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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -629,7 +629,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
|
||||
@@ -726,7 +726,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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -1216,7 +1216,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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -200,14 +200,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)
|
||||
@@ -226,7 +226,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)
|
||||
@@ -235,7 +235,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)
|
||||
@@ -282,7 +282,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]."),
|
||||
@@ -331,7 +331,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()
|
||||
|
||||
@@ -207,7 +207,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]."))
|
||||
@@ -230,7 +230,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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -104,7 +104,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
|
||||
|
||||
|
||||
@@ -105,7 +105,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
|
||||
@@ -116,7 +116,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
|
||||
@@ -133,7 +133,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
|
||||
@@ -144,7 +144,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
|
||||
@@ -155,7 +155,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
|
||||
|
||||
@@ -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."), \
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user