mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 15:15:32 +01:00
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:
@@ -14,7 +14,7 @@
|
||||
to_chat(user, span_notice("You begin sweeping \the [src] about, scanning for metal deposits."))
|
||||
playsound(src, 'sound/items/goggles_charge.ogg', 50, 1, -6)
|
||||
|
||||
if(!do_after(user, scan_time))
|
||||
if(!do_after(user, scan_time, target = src))
|
||||
return
|
||||
|
||||
ScanTurf(get_turf(user), user)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
if(A.anchored)
|
||||
return
|
||||
to_chat(user, span_notice("You start attaching the pack to [A]..."))
|
||||
if(do_after(user,50,target=A))
|
||||
if(do_after(user, 5 SECONDS, target = A))
|
||||
to_chat(user, span_notice("You attach the pack to [A] and activate it."))
|
||||
/* No components, sorry. No convienence for you!
|
||||
if(loc == user && istype(user.back, /obj/item/storage/backpack))
|
||||
@@ -144,7 +144,7 @@
|
||||
/obj/item/fulton_core/attack_self(mob/user)
|
||||
var/turf/T = get_turf(user)
|
||||
var/outdoors = T.is_outdoors()
|
||||
if(do_after(user,15,target = user) && !QDELETED(src) && outdoors)
|
||||
if(do_after(user, 15, target = user) && !QDELETED(src) && outdoors)
|
||||
new /obj/structure/extraction_point(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
/obj/structure/outcrop/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/pickaxe))
|
||||
to_chat(user, span_notice("[user] begins to hack away at \the [src]."))
|
||||
if(do_after(user,40))
|
||||
if(do_after(user, 4 SECONDS, target = src))
|
||||
to_chat(user, span_notice("You have finished digging!"))
|
||||
for(var/i=0;i<(rand(mindrop,upperdrop));i++)
|
||||
new outcropdrop(get_turf(src))
|
||||
|
||||
@@ -394,7 +394,7 @@ var/list/mining_overlay_cache = list()
|
||||
to_chat(user, span_notice("You start digging."))
|
||||
playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
|
||||
|
||||
if(!do_after(user,digspeed)) return
|
||||
if(!do_after(user, digspeed, target = src)) return
|
||||
|
||||
to_chat(user, span_notice("You dug a hole."))
|
||||
GetDrilled()
|
||||
@@ -439,7 +439,7 @@ var/list/mining_overlay_cache = list()
|
||||
if (istype(W, /obj/item/measuring_tape))
|
||||
var/obj/item/measuring_tape/P = W
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " extends \a [P] towards \the [src]."),span_notice("You extend \the [P] towards \the [src]."))
|
||||
if(do_after(user, 15))
|
||||
if(do_after(user, 15, target = src))
|
||||
to_chat(user, span_notice("\The [src] has been excavated to a depth of [excavation_level]cm."))
|
||||
return
|
||||
|
||||
@@ -449,7 +449,7 @@ var/list/mining_overlay_cache = list()
|
||||
C.depth_scanner.scan_atom(user, src)
|
||||
else
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!"), span_notice("You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!"))
|
||||
if(do_after(user, 15))
|
||||
if(do_after(user, 15, target = src))
|
||||
to_chat(user, span_notice("\The [src] has been excavated to a depth of [excavation_level]cm."))
|
||||
return
|
||||
|
||||
@@ -519,7 +519,7 @@ var/list/mining_overlay_cache = list()
|
||||
wreckfinds(P.destroy_artefacts)
|
||||
to_chat(user, span_notice("You start [P.drill_verb][fail_message]."))
|
||||
|
||||
if(do_after(user,P.digspeed))
|
||||
if(do_after(user, P.digspeed, target = src))
|
||||
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
|
||||
@@ -291,7 +291,7 @@ GLOBAL_LIST_EMPTY(unique_deployable)
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
user.visible_message(span_warning("[user] disassembles [src]."),
|
||||
span_notice("You start to disassemble [src]..."), "You hear clanking and banging noises.")
|
||||
if(do_after(user,4 SECONDS,src))
|
||||
if(do_after(user, 4 SECONDS, target = src))
|
||||
new /obj/item/gps(loc)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
@@ -357,7 +357,7 @@ GLOBAL_LIST_EMPTY(unique_deployable)
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
user.visible_message(span_warning("[user] disassembles [src]."),
|
||||
span_notice("You start to disassemble [src]..."), "You hear clanking and banging noises.")
|
||||
if(do_after(user,4 SECONDS,src))
|
||||
if(do_after(user, 4 SECONDS, target = src))
|
||||
deconstruct()
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user