[MIRROR] Axes do_mob and replaces with do_after (#11938)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-11-08 02:26:50 -07:00
committed by GitHub
parent 9645b165d5
commit e61bebfbb3
29 changed files with 157 additions and 135 deletions

View File

@@ -76,7 +76,7 @@
C.visible_message(span_danger("\The [user] is attempting to put the leash on \the [C]!"), span_danger("\The [user] tries to put a leash on you"))
add_attack_logs(user,C,"Leashed (attempt)")
if(!do_mob(user, C, leashtime)) //do_mob adds a progress bar, but then we also check to see if they have a collar
if(!do_after(user, leashtime, C)) //do_mob adds a progress bar, but then we also check to see if they have a collar
return
if(tgui_alert(C, "Would you like to be leased by [user]? You can OOC escape to escape", "Become Leashed",list("No","Yes")) != "Yes")
return
@@ -190,7 +190,7 @@
leash_pet.visible_message(span_danger("\The [leash_pet] is attempting to unhook [leash_pet.p_their()] leash!"), span_danger("You attempt to unhook your leash"))
add_attack_logs(leash_master,leash_pet,"Self-unleash (attempt)")
if(!do_mob(leash_pet, leash_pet, 35))
if(!do_after(leash_pet, 3.5 SECONDS, leash_pet))
return
to_chat(leash_pet, span_userdanger("You have been released!"))
@@ -200,7 +200,7 @@
leash_pet.visible_message(span_danger("\The [leash_master] is attempting to remove the leash on \the [leash_pet]!"), span_danger("\The [leash_master] tries to remove leash from you"))
add_attack_logs(leash_master,leash_pet,"Unleashed (attempt)")
if(!do_mob(leash_master, leash_pet, 5))
if(!do_after(leash_master, 0.5 SECONDS, leash_pet))
return
to_chat(leash_pet, span_userdanger("You have been released!"))

View File

@@ -117,7 +117,7 @@
continue
if(used == amount)
break
if(!do_mob(user, M, W.damage/3, exclusive = TRUE))
if(!do_after(user, W.damage/3, affecting))
balloon_alert(user, "stand still to bandage wounds.")
break
@@ -186,7 +186,7 @@
continue
if(used == amount)
break
if(!do_mob(user, M, W.damage/5, exclusive = TRUE))
if(!do_after(user, W.damage/5, affecting))
balloon_alert(user, "stand still to bandage wounds.")
break
@@ -251,7 +251,7 @@
else
user.balloon_alert_visible("\the [user] starts salving wounds on [M]'s [affecting.name].", \
"salving the wounds on [M]'s [affecting.name]." )
if(!do_mob(user, M, 10, exclusive = TRUE))
if(!do_after(user, 1 SECOND, affecting))
balloon_alert(user, "stand still to salve wounds.")
return 1
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
@@ -305,7 +305,7 @@
continue
//if(used == amount)
// break
if(!do_mob(user, M, W.damage/5, exclusive = TRUE))
if(!do_after(user, W.damage/5, affecting))
balloon_alert(user, "stand still to bandage wounds.")
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.
@@ -365,7 +365,7 @@
else
user.balloon_alert_visible("\the [user] starts salving wounds on [M]'s [affecting.name].", \
"salving the wounds on [M]'s [affecting.name]." )
if(!do_mob(user, M, 10, exclusive = TRUE))
if(!do_after(user, 1 SECOND, affecting))
balloon_alert(user, "stand still to salve wounds.")
return 1
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
@@ -413,7 +413,7 @@
balloon_alert(user, "you can't apply a splint to the arm you're using!")
return
user.balloon_alert_visible("[user] starts to apply \the [src] to their [limb].", "applying \the [src] to your [limb].", "You hear something being wrapped.")
if(do_after(user, 5 SECONDS, target = M))
if(do_after(user, 5 SECONDS, affecting))
if(affecting.splinted)
balloon_alert(user, "[M]'s [limb] is already splinted!")
return

View File

@@ -111,7 +111,7 @@
M.visible_message(span_bold("\The [user]") + " eats some of [loaded] with \the [src].")
else
user.visible_message(span_warning("\The [user] begins to feed \the [M]!"))
if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS)))
if(!(M.can_force_feed(user, loaded) && do_after(user, 5 SECONDS, M)))
return
M.visible_message(span_bold("\The [user]") + " feeds some of [loaded] to \the [M] with \the [src].")
playsound(src,'sound/items/eatfood.ogg', rand(10,40), 1)