mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +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:
@@ -30,12 +30,12 @@
|
||||
visible_message("You start pulling the string on \the [src].", "[user] starts pulling the string on the [src].")
|
||||
|
||||
if(max_fuel <= 0)
|
||||
if(do_after(user, 15))
|
||||
if(do_after(user, 15, target = src))
|
||||
to_chat(user, "\The [src] won't start!")
|
||||
else
|
||||
to_chat(user, "You fumble with the string.")
|
||||
else
|
||||
if(do_after(user, 15))
|
||||
if(do_after(user, 15, target = src))
|
||||
visible_message("You start \the [src] up with a loud grinding!", "[user] starts \the [src] up with a loud grinding!")
|
||||
attack_verb = list("shredded", "ripped", "torn")
|
||||
playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1)
|
||||
@@ -89,7 +89,7 @@
|
||||
Hyd.die()
|
||||
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
|
||||
to_chat(user, span_notice("You begin filling the tank on the chainsaw."))
|
||||
if(do_after(user, 15))
|
||||
if(do_after(user, 15, target = src))
|
||||
A.reagents.trans_to_obj(src, max_fuel)
|
||||
playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
to_chat(user, span_notice("Chainsaw succesfully refueled."))
|
||||
|
||||
@@ -16,20 +16,20 @@
|
||||
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(carving_1)
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
if(do_after(user, material.hardness * W.toolspeed, target = src))
|
||||
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
|
||||
grave_name += carving_1
|
||||
update_icon()
|
||||
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(carving_2)
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
if(do_after(user, material.hardness * W.toolspeed, target = src))
|
||||
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
|
||||
epitaph += carving_2
|
||||
update_icon()
|
||||
if(W.has_tool_quality(TOOL_WRENCH))
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
if(do_after(user, material.hardness * W.toolspeed, target = src))
|
||||
material.place_dismantled_product(get_turf(src))
|
||||
user.visible_message("[user] dismantles down \the [src.name].", "You dismantle \the [src.name].")
|
||||
qdel(src)
|
||||
@@ -66,7 +66,7 @@
|
||||
return 0
|
||||
else
|
||||
to_chat(user, span_notice("You begin to place \the [src.name]."))
|
||||
if(!do_after(user, 10))
|
||||
if(!do_after(user, 1 SECOND, target = src))
|
||||
return 0
|
||||
var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material())
|
||||
to_chat(user, span_notice("You place \the [src.name]."))
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
if(!fragile)
|
||||
if(health < initial(health))
|
||||
user.visible_message("[user] begins repairing \the [src].", "You begin repairing \the [src].")
|
||||
if(do_after(user, repair_time))
|
||||
if(do_after(user, repair_time, target = src))
|
||||
user.visible_message("[user] has finished repairing \the [src]", "You finish repairing \the [src].")
|
||||
health = min(health + repair_amount, initial(health))
|
||||
dulled = 0
|
||||
@@ -144,7 +144,7 @@
|
||||
to_chat(M, "You should repair [src] first. Try using [kit] on it.")
|
||||
return FALSE
|
||||
M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].")
|
||||
if(do_after(M, sharpen_time))
|
||||
if(do_after(M, sharpen_time, target = src))
|
||||
M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].")
|
||||
src.set_material(material)
|
||||
return TRUE
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
user.put_in_hands(S)
|
||||
else
|
||||
to_chat(user, span_notice("You start compacting the snowball."))
|
||||
if(do_after(user, 2 SECONDS))
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
var/atom/S = new /obj/item/material/snow/snowball/reinforced(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/obj/item/stack/material/M = I
|
||||
if(M.get_amount() >= 5)
|
||||
to_chat(user, "You begin to refine the [src] with [M]...")
|
||||
if(do_after(user, 70))
|
||||
if(do_after(user, 7 SECONDS, target = src))
|
||||
M.use(5)
|
||||
var/obj/item/SK
|
||||
SK = new /obj/item/material/sharpeningkit(get_turf(user), M.material.name)
|
||||
|
||||
Reference in New Issue
Block a user