mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Axes do_mob and replaces with do_after (#11938)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9645b165d5
commit
e61bebfbb3
@@ -150,7 +150,7 @@
|
||||
GLOB.global_announcer.autosay("[src] is treating <b>[H]</b> in <b>[location]</b>", "[src]", "Medical")
|
||||
busy = 1
|
||||
update_icons()
|
||||
if(do_mob(src, H, 30))
|
||||
if(do_after(src, 3 SECONDS, H))
|
||||
if(t == 1)
|
||||
reagent_glass.reagents.trans_to_mob(H, injection_amount, CHEM_BLOOD)
|
||||
else
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
playsound(src, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
visible_message(span_warning("\The [src] is trying to put handcuffs on \the [H]!"))
|
||||
busy = TRUE
|
||||
if(do_mob(src, H, 60))
|
||||
if(do_after(src, 6 SECONDS, H))
|
||||
if(!H.handcuffed)
|
||||
if(istype(H.back, /obj/item/rig) && istype(H.gloves,/obj/item/clothing/gloves/gauntlets/rig))
|
||||
H.handcuffed = new /obj/item/handcuffs/cable(H) // Better to be cable cuffed than stun-locked
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
else
|
||||
M.visible_message(span_warning("[M] tries to pat out [src]'s flames!"),
|
||||
span_warning("You try to pat out [src]'s flames! Hot!"))
|
||||
if(do_mob(M, src, 15))
|
||||
if(do_after(M, 1.5 SECONDS, src))
|
||||
src.adjust_fire_stacks(-0.5)
|
||||
if (prob(10) && (M.fire_stacks <= 0))
|
||||
M.adjust_fire_stacks(1)
|
||||
|
||||
@@ -1220,7 +1220,7 @@
|
||||
return
|
||||
|
||||
to_chat(usr, span_filter_notice("You must[self ? "" : " both"] remain still until counting is finished."))
|
||||
if(do_mob(usr, src, 60))
|
||||
if(do_after(usr, 6 SECONDS, src))
|
||||
var/message = span_notice("[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].")
|
||||
to_chat(usr,message)
|
||||
else
|
||||
|
||||
@@ -508,7 +508,10 @@
|
||||
organ.applied_pressure = user
|
||||
|
||||
//apply pressure as long as they stay still and keep grabbing
|
||||
do_mob(user, src, INFINITY, target_zone, progress = 0)
|
||||
//This USED to have a 'target_zone' check that never actually worked so whatever.
|
||||
//Let it be said that it's a feature you can apply pressure to all sites on you all at once.
|
||||
//You're already locking yourself down when you do so.
|
||||
do_after(user, INFINITY, organ, hidden = TRUE)
|
||||
|
||||
organ.applied_pressure = null
|
||||
|
||||
|
||||
@@ -199,15 +199,15 @@
|
||||
T.nutrition = 0 //Completely drained of everything.
|
||||
var/damage_to_be_applied = T.species.total_health //Get their max health.
|
||||
T.apply_damage(damage_to_be_applied, HALLOSS) //Knock em out.
|
||||
C.absorbing_prey = 0
|
||||
C.absorbing_prey = FALSE
|
||||
to_chat(C, span_notice("You have completely drained [T], causing them to pass out."))
|
||||
to_chat(T, span_danger("You feel weak, as if you have no control over your body whatsoever as [C] finishes draining you.!"))
|
||||
add_attack_logs(C,T,"Succubus drained")
|
||||
return
|
||||
|
||||
if(!do_mob(src, T, 50) || G.state != GRAB_NECK) //One drain tick every 5 seconds.
|
||||
if(!do_after(src, 5 SECONDS, T) || G.state != GRAB_NECK) //One drain tick every 5 seconds.
|
||||
to_chat(src, span_warning("Your draining of [T] has been interrupted!"))
|
||||
C.absorbing_prey = 0
|
||||
C.absorbing_prey = FALSE
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/succubus_drain_lethal()
|
||||
@@ -294,16 +294,16 @@
|
||||
if(soulgem?.flag_check(SOULGEM_ACTIVE | SOULGEM_CATCHING_DRAIN, TRUE))
|
||||
soulgem.catch_mob(T)
|
||||
T.apply_damage(500, OXY) //Kill them.
|
||||
absorbing_prey = 0
|
||||
absorbing_prey = FALSE
|
||||
to_chat(src, span_notice("You have completely drained [T], killing them in the process."))
|
||||
to_chat(T, span_danger(span_massive("You... Feel... So... Weak...")))
|
||||
visible_message(span_danger("[src] seems to finish whatever they were doing to [T]."))
|
||||
add_attack_logs(src,T,"Succubus drained (lethal)")
|
||||
return
|
||||
|
||||
if(!do_mob(src, T, 50) || G.state != GRAB_NECK) //One drain tick every 5 seconds.
|
||||
if(!do_after(src, 5 SECONDS, T) || G.state != GRAB_NECK) //One drain tick every 5 seconds.
|
||||
to_chat(src, span_warning("Your draining of [T] has been interrupted!"))
|
||||
absorbing_prey = 0
|
||||
absorbing_prey = FALSE
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/slime_feed()
|
||||
@@ -355,16 +355,16 @@
|
||||
if(100)
|
||||
T.nutrition = (T.nutrition + C.nutrition)
|
||||
C.nutrition = 0 //Completely drained of everything.
|
||||
C.absorbing_prey = 0
|
||||
C.absorbing_prey = FALSE
|
||||
to_chat(C, span_danger("You have completely fed [T] every part of your body!"))
|
||||
to_chat(T, span_notice("You feel quite strong and well fed, as [C] finishes feeding \himself to you!"))
|
||||
add_attack_logs(C,T,"Slime fed")
|
||||
C.feed_grabbed_to_self_falling_nom(T,C) //Reused this proc instead of making a new one to cut down on code usage.
|
||||
return
|
||||
|
||||
if(!do_mob(src, T, 50) || !G.state) //One drain tick every 5 seconds.
|
||||
if(!do_after(src, 5 SECONDS, T) || !G.state) //One drain tick every 5 seconds.
|
||||
to_chat(src, span_warning("Your feeding of [T] has been interrupted!"))
|
||||
C.absorbing_prey = 0
|
||||
C.absorbing_prey = FALSE
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/succubus_drain_finalize()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(W.bandaged && W.salved && W.disinfected)
|
||||
continue
|
||||
|
||||
if(!do_mob(src, M, W.damage/5))
|
||||
if(!do_after(src, W.damage/5, W))
|
||||
to_chat(src, span_notice("You must stand still to clean wounds."))
|
||||
break
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
// Get our AI to stay still.
|
||||
set_AI_busy(TRUE)
|
||||
|
||||
if(!do_mob(src, AM, 5 SECONDS))
|
||||
if(!do_after(src,5 SECONDS, AM))
|
||||
set_AI_busy(FALSE)
|
||||
to_chat(src, span_warning("You need to stay still to spin a web around \the [AM]."))
|
||||
return FALSE
|
||||
@@ -174,7 +174,7 @@
|
||||
// Get our AI to stay still.
|
||||
set_AI_busy(TRUE)
|
||||
|
||||
if(!do_mob(src, T, 5 SECONDS))
|
||||
if(!do_after(src, 5 SECONDS, T))
|
||||
set_AI_busy(FALSE)
|
||||
to_chat(src, span_warning("You need to stay still to spin a web on \the [T]."))
|
||||
return FALSE
|
||||
@@ -208,7 +208,7 @@
|
||||
// Stop players from spamming eggs.
|
||||
laying_eggs = TRUE
|
||||
|
||||
if(!do_mob(src, T, 5 SECONDS))
|
||||
if(!do_after(src, 5 SECONDS, T))
|
||||
set_AI_busy(FALSE)
|
||||
to_chat(src, span_warning("You need to stay still to lay eggs on \the [T]."))
|
||||
return FALSE
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
|
||||
user.visible_message(span_notice("[user] starts inspecting [affecting]'s [E.name] carefully."))
|
||||
if(!do_mob(user,H, 10))
|
||||
if(!do_after(user, 1 SECOND, H))
|
||||
to_chat(user, span_notice("You must stand still to inspect [E] for wounds."))
|
||||
else if(E.wounds.len)
|
||||
to_chat(user, span_warning("You find [E.get_wounds_desc()]"))
|
||||
@@ -15,7 +15,7 @@
|
||||
to_chat(user, span_notice("You find no visible wounds."))
|
||||
|
||||
to_chat(user, span_notice("Checking bones now..."))
|
||||
if(!do_mob(user, H, 20))
|
||||
if(!do_after(user, 2 SECONDS, H))
|
||||
to_chat(user, span_notice("You must stand still to feel [E] for fractures."))
|
||||
else if(E.status & ORGAN_BROKEN)
|
||||
to_chat(user, span_warning("The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!"))
|
||||
@@ -24,7 +24,7 @@
|
||||
to_chat(user, span_notice("The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine."))
|
||||
|
||||
to_chat(user, span_notice("Checking skin now..."))
|
||||
if(!do_mob(user, H, 10))
|
||||
if(!do_after(user, 1 SECOND, H))
|
||||
to_chat(user, span_notice("You must stand still to check [H]'s skin for abnormalities."))
|
||||
else
|
||||
var/bad = 0
|
||||
|
||||
Reference in New Issue
Block a user