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:
@@ -228,7 +228,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
||||
//Attackby proc, for maintenance
|
||||
/obj/item/nif/attackby(obj/item/W, mob/user as mob)
|
||||
if(open == 0 && W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(do_after(user, 4 SECONDS, src) && open == 0)
|
||||
if(do_after(user, 4 SECONDS, target = src) && open == 0)
|
||||
user.visible_message("[user] unscrews and pries open \the [src].",span_notice("You unscrew and pry open \the [src]."))
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
open = 1
|
||||
@@ -243,18 +243,18 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
||||
open = 3
|
||||
update_icon()
|
||||
return
|
||||
if(do_after(user, 6 SECONDS, src) && open == 1 && C.use(3))
|
||||
if(do_after(user, 6 SECONDS, target = src) && open == 1 && C.use(3))
|
||||
user.visible_message("[user] replaces some wiring in \the [src].",span_notice("You replace any burned out wiring in \the [src]."))
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
open = 2
|
||||
update_icon()
|
||||
else if(open == 2 && istype(W,/obj/item/multitool))
|
||||
if(do_after(user, 8 SECONDS, src) && open == 2)
|
||||
if(do_after(user, 8 SECONDS, target = src) && open == 2)
|
||||
user.visible_message("[user] resets several circuits in \the [src].",span_notice("You find and repair any faulty circuits in \the [src]."))
|
||||
open = 3
|
||||
update_icon()
|
||||
else if(open == 3 && W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(do_after(user, 3 SECONDS, src) && open == 3)
|
||||
if(do_after(user, 3 SECONDS, target = src) && open == 3)
|
||||
user.visible_message("[user] closes up \the [src].",span_notice("You re-seal \the [src] for use once more."))
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
open = FALSE
|
||||
|
||||
@@ -221,14 +221,14 @@
|
||||
icon_state = "[initial(icon_state)]-animate" //makes it play the item animation upon using on a valid target
|
||||
update_icon()
|
||||
|
||||
if(A == user && do_after(Hu,1 SECONDS,Ht))
|
||||
if(A == user && do_after(Hu, 1 SECONDS, target = Ht))
|
||||
if(Ht.isSynthetic())
|
||||
new stored_synthetic(Ht.nif,extra)
|
||||
qdel(src)
|
||||
else
|
||||
new stored_organic(Ht.nif,extra)
|
||||
qdel(src)
|
||||
else if(A != user && do_after(Hu,10 SECONDS,Ht))
|
||||
else if(A != user && do_after(Hu, 10 SECONDS, target = Ht))
|
||||
if(Ht.isSynthetic())
|
||||
new stored_synthetic(Ht.nif,extra)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user