Fixes runtimes (#18260)

* Fixes cshift clown runtime

* Fixes girder runtime

Makes the do_after exclusive. Spam-clicking would result in runtimes

* Fixes MMI defibbing

* fixes wrong type runtime

* Disposal qdel check

Also upports the /hitby act.

* Fixes energy source runtime & upports helpers

* interaction info runtime

* this is better
This commit is contained in:
Cameron Lennox
2025-08-15 11:09:41 +02:00
committed by GitHub
parent add1d6ad0f
commit 0050cb8509
9 changed files with 81 additions and 39 deletions
+10 -10
View File
@@ -152,20 +152,20 @@
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now securing the girder..."))
if(do_after(user, 40 * W.toolspeed, src))
if(do_after(user, 40 * W.toolspeed, src, exclusive = TASK_USER_EXCLUSIVE))
to_chat(user, span_notice("You secured the girder!"))
reset_girder()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(do_after(user,30 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
@@ -178,7 +178,7 @@
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now unsecuring support struts..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user,40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You unsecured the support struts!"))
state = 1
@@ -190,7 +190,7 @@
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now removing support struts..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user,40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You removed the support struts!"))
reinf_material.place_dismantled_product(get_turf(src))
@@ -200,7 +200,7 @@
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now dislodging the girder..."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You dislodged the girder!"))
displace()
@@ -251,7 +251,7 @@
to_chat(user, span_notice("You begin adding the plating..."))
if(!do_after(user,time_to_reinforce) || !S.use(amount_to_use))
if(!do_after(user,time_to_reinforce, exclusive = TASK_USER_EXCLUSIVE) || !S.use(amount_to_use))
return TRUE //once we've gotten this far don't call parent attackby()
if(anchored)
@@ -285,7 +285,7 @@
return 0
to_chat(user, span_notice("Now reinforcing..."))
if (!do_after(user,40) || !S.use(1))
if (!do_after(user,40, exclusive = TASK_USER_EXCLUSIVE) || !S.use(1))
return 1 //don't call parent attackby() past this point
to_chat(user, span_notice("You added reinforcement!"))
@@ -351,13 +351,13 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user,40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(do_after(user,30 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()