From e7128303063f2b8dba86a0bf1172058d8291776b Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Thu, 16 Nov 2023 01:22:20 +0300 Subject: [PATCH] Update mob_grab.dm --- code/modules/mob/mob_grab.dm | 46 +++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 39cc5b25e519..54db6fa4f852 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -60,8 +60,8 @@ if(!ishuman(user)) //only humans can reinforce a grab. if (isxeno(user)) - var/mob/living/carbon/xenomorph/X = user - X.pull_power(grabbed_thing) + var/mob/living/carbon/xenomorph/xeno = user + xeno.pull_power(grabbed_thing) return @@ -102,21 +102,21 @@ if(M == grabbed_thing) attack_self(user) else if(M == user && user.pulling && isxeno(user)) - var/mob/living/carbon/xenomorph/X = user - var/mob/living/carbon/pulled = X.pulling + var/mob/living/carbon/xenomorph/xeno = user + var/mob/living/carbon/pulled = xeno.pulling if(!istype(pulled)) return if(isxeno(pulled) || issynth(pulled)) - to_chat(X, SPAN_WARNING("That wouldn't taste very good.")) + to_chat(xeno, SPAN_WARNING("That wouldn't taste very good.")) return 0 if(pulled.buckled) - to_chat(X, SPAN_WARNING("[pulled] is buckled to something.")) + to_chat(xeno, SPAN_WARNING("[pulled] is buckled to something.")) return 0 if(pulled.stat == DEAD && !pulled.chestburst) - to_chat(X, SPAN_WARNING("Ew, [pulled] is already starting to rot.")) + to_chat(xeno, SPAN_WARNING("Ew, [pulled] is already starting to rot.")) return 0 - if(X.stomach_contents.len) //Only one thing in the stomach at a time, please - to_chat(X, SPAN_WARNING("You already have something in your belly, there's no way that will fit.")) + if(xeno.stomach_contents.len) //Only one thing in the stomach at a time, please + to_chat(xeno, SPAN_WARNING("You already have something in your belly, there's no way that will fit.")) return 0 /* Saving this in case we want to allow devouring of dead bodies UNLESS their client is still online somewhere if(pulled.client) //The client is still inside the body @@ -126,19 +126,21 @@ to_chat(src, "You start to devour [pulled] but realize \he is already dead.") return */ if(user.action_busy) - to_chat(X, SPAN_WARNING("You are already busy with something.")) + to_chat(xeno, SPAN_WARNING("You are already busy with something.")) return - X.visible_message(SPAN_DANGER("[X] starts to devour [pulled]!"), \ + xeno.visible_message(SPAN_DANGER("[xeno] starts to devour [pulled]!"), \ + if(HAS_TRAIT(xeno, TRAIT_CLOAKED)) //cloaked don't show the visible message, so we gotta work around + to_chat(pulled, FONT_SIZE_HUGE(SPAN_DANGER("[xeno] is trying to devour you!"))) SPAN_DANGER("You start to devour [pulled]!"), null, 5) - if(do_after(X, 50, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) - if(isxeno(pulled.loc) && !X.stomach_contents.len) - to_chat(X, SPAN_WARNING("Someone already ate \the [pulled].")) + if(do_after(xeno, 50, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) + if(isxeno(pulled.loc) && !xeno.stomach_contents.len) + to_chat(xeno, SPAN_WARNING("Someone already ate \the [pulled].")) return 0 - if(X.pulling == pulled && !pulled.buckled && (pulled.stat != DEAD || pulled.chestburst) && !X.stomach_contents.len) //make sure you've still got them in your claws, and alive - if(SEND_SIGNAL(pulled, COMSIG_MOB_DEVOURED, X) & COMPONENT_CANCEL_DEVOUR) + if(xeno.pulling == pulled && !pulled.buckled && (pulled.stat != DEAD || pulled.chestburst) && !xeno.stomach_contents.len) //make sure you've still got them in your claws, and alive + if(SEND_SIGNAL(pulled, COMSIG_MOB_DEVOURED, xeno) & COMPONENT_CANCEL_DEVOUR) return FALSE - X.visible_message(SPAN_WARNING("[X] devours [pulled]!"), \ + xeno.visible_message(SPAN_WARNING("[xeno] devours [pulled]!"), \ SPAN_WARNING("You devour [pulled]!"), null, 5) if(ishuman(pulled)) @@ -146,10 +148,10 @@ pulled_human.disable_lights() //Then, we place the mob where it ought to be - X.stomach_contents.Add(pulled) - X.devour_timer = world.time + 500 + rand(0,200) // 50-70 seconds - pulled.forceMove(X) + xeno.stomach_contents.Add(pulled) + xeno.devour_timer = world.time + 500 + rand(0,200) // 50-70 seconds + pulled.forceMove(xeno) return TRUE - if(!(pulled in X.stomach_contents)) - to_chat(X, SPAN_WARNING("You stop devouring \the [pulled]. \He probably tasted gross anyways.")) + if(!(pulled in xeno.stomach_contents)) + to_chat(xeno, SPAN_WARNING("You stop devouring \the [pulled]. \He probably tasted gross anyways.")) return 0