mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +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:
@@ -196,7 +196,7 @@
|
||||
user.visible_message("[user.name] starts to weld [src] to the floor.", \
|
||||
"You start to weld [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
to_chat(user, "You weld [src] to the floor.")
|
||||
@@ -209,7 +209,7 @@
|
||||
user.visible_message("[user.name] starts to cut [src] free from the floor.", \
|
||||
"You start to cut [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
to_chat(user, "You cut [src] free from the floor.")
|
||||
@@ -229,7 +229,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 \the [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]."))
|
||||
integrity = initial(integrity)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
to_chat(user, "You weld the field generator to the floor.")
|
||||
@@ -159,7 +159,7 @@
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
to_chat(user, "You cut the [src] free from the floor.")
|
||||
|
||||
@@ -40,16 +40,16 @@
|
||||
panel_open = !panel_open
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
visible_message(span_infoplain(span_bold("\The [user]") + " adjusts \the [src]'s mechanisms."))
|
||||
if(panel_open && do_after(user, 30))
|
||||
if(panel_open && do_after(user, 3 SECONDS, target = src))
|
||||
to_chat(user, span_notice("\The [src] looks like it could be modified."))
|
||||
if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
if(panel_open && do_after(user, 8 SECONDS * W.toolspeed, target = src)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, span_cult("\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow.."))
|
||||
else
|
||||
to_chat(user, span_notice("\The [src]'s mechanisms look secure."))
|
||||
if(istype(W, /obj/item/smes_coil/super_io) && panel_open)
|
||||
visible_message(span_infoplain(span_bold("\The [user]") + " begins to modify \the [src] with \the [W]."))
|
||||
if(do_after(user, 300))
|
||||
if(do_after(user, 30 SECONDS, target = src))
|
||||
user.drop_from_inventory(W)
|
||||
visible_message(span_infoplain(span_bold("\The [user]") + " installs \the [W] onto \the [src]."))
|
||||
qdel(W)
|
||||
|
||||
Reference in New Issue
Block a user