mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +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:
@@ -45,7 +45,7 @@
|
||||
/obj/effect/decal/writing/attackby(var/obj/item/thing, var/mob/user)
|
||||
if(thing.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weldingtool/welder = thing.get_welder()
|
||||
if(welder.isOn() && welder.remove_fuel(0,user) && do_after(user, 5, src) && !QDELETED(src))
|
||||
if(welder.isOn() && welder.remove_fuel(0,user) && do_after(user, 5, target = src) && !QDELETED(src))
|
||||
playsound(src.loc, welder.usesound, 50, 1)
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " clears away some graffiti."))
|
||||
qdel(src)
|
||||
@@ -58,7 +58,7 @@
|
||||
var/_message = tgui_input_text(user, "Enter an additional message to engrave.", "Graffiti", "", MAX_MESSAGE_LEN)
|
||||
if(_message && loc && user && !user.incapacitated() && user.Adjacent(loc) && thing.loc == user)
|
||||
user.visible_message(span_warning("\The [user] begins carving something into \the [loc]."))
|
||||
if(do_after(user, max(20, length(_message)), src) && loc)
|
||||
if(do_after(user, max(2 SECONDS, length(_message)), target = src) && loc)
|
||||
user.visible_message(span_danger("\The [user] carves some graffiti into \the [loc]."))
|
||||
message = "[message] [_message]"
|
||||
author = user.ckey
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
else if(I.has_tool_quality(TOOL_WRENCH))
|
||||
visible_message(span_warning("[user] begins dismantling [src]."))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 50, src))
|
||||
if(do_after(user, 5 SECONDS, target = src))
|
||||
visible_message(span_danger("[user] has dismantled [src]!"))
|
||||
dismantle()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user