Merge pull request #7655 from VOREStation/aro-doingafter

Make some progress bar activities exclusive
This commit is contained in:
Aronai Sieyes
2020-05-05 19:47:08 -04:00
committed by GitHub
9 changed files with 86 additions and 37 deletions

View File

@@ -111,7 +111,7 @@
continue
if(used == amount)
break
if(!do_mob(user, M, W.damage/3))
if(!do_mob(user, M, W.damage/3, exclusive = TRUE))
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
break
@@ -174,7 +174,7 @@
continue
if(used == amount)
break
if(!do_mob(user, M, W.damage/5))
if(!do_mob(user, M, W.damage/5, exclusive = TRUE))
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
break
@@ -234,7 +234,7 @@
else
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
if(!do_mob(user, M, 10))
if(!do_mob(user, M, 10, exclusive = TRUE))
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
return 1
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
@@ -281,7 +281,7 @@
continue
//if(used == amount) //VOREStation Edit
// break //VOREStation Edit
if(!do_mob(user, M, W.damage/5))
if(!do_mob(user, M, W.damage/5, exclusive = TRUE))
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
break
if(affecting.is_bandaged() && affecting.is_disinfected()) // We do a second check after the delay, in case it was bandaged after the first check.
@@ -336,7 +336,7 @@
else
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
if(!do_mob(user, M, 10))
if(!do_mob(user, M, 10, exclusive = TRUE))
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
return 1
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
@@ -383,7 +383,7 @@
to_chat(user, "<span class='danger'>You can't apply a splint to the arm you're using!</span>")
return
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
if(do_after(user, 50, M))
if(do_after(user, 50, M, exclusive = TRUE))
if(affecting.splinted)
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
return

View File

@@ -16,7 +16,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss())
if(do_after(user,7 * toolspeed))
if(do_after(user, 7 * toolspeed, exclusive = TRUE))
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
@@ -51,9 +51,9 @@
else if(can_use(1))
user.setClickCooldown(user.get_attack_speed(src))
if(S.open >= 2)
if(do_after(user,5 * toolspeed))
if(do_after(user, 5 * toolspeed, exclusive = TRUE))
S.heal_damage(restoration_internal, restoration_internal, robo_repair = 1)
else if(do_after(user,5 * toolspeed))
else if(do_after(user, 5 * toolspeed, exclusive = TRUE))
S.heal_damage(restoration_external,restoration_external, robo_repair =1)
H.updatehealth()
use(1)

View File

@@ -145,7 +145,7 @@
if (recipe.time)
to_chat(user, "<span class='notice'>Building [recipe.title] ...</span>")
if (!do_after(user, recipe.time))
if (!do_after(user, recipe.time, exclusive = TRUE))
return
if (use(required))