From cee17c3f65042b66bf86de731723635668cad7af Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 16 Nov 2020 13:24:38 -0700 Subject: [PATCH] Update living.dm --- code/modules/mob/living/living.dm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d3b0c0f666..a6aca39a5f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -258,6 +258,13 @@ AM.setDir(current_dir) now_pushing = FALSE +// i wish to have a "friendly chat" with whoever made three tail variables instead of one +/mob/living/proc/has_tail() + if(!dna || !dna.species || !dna.species.mutant_bodyparts) + return FALSE + var/list/L = dna.species.mutant_bodyparts // caches list because i refuse to type it out and because performance + return (L["mam_tail"] && (L["mam_tail"] != "None")) || (L["tail_human"] && (L["tail_human"] != "None")) || (L["tail_lizard"] && (L["tail_lizard"] != "None")) + /mob/living/start_pulling(atom/movable/AM, state, force = pull_force, supress_message = FALSE) if(!AM || !src) return FALSE @@ -296,9 +303,7 @@ log_combat(src, M, "grabbed", addition="passive grab") if(!supress_message && !(iscarbon(AM) && HAS_TRAIT(src, TRAIT_STRONG_GRABBER))) - var/self_tailcheck = dna?.species?.mutant_bodyparts["mam_tail"] && (dna.species.mutant_bodyparts["mam_tail"] != "None") - var/other_tailcheck = M.dna?.species?.mutant_bodyparts["mam_tail"] && (M.dna.species.mutant_bodyparts["mam_tail"] != "None") - if((zone_selected == BODY_ZONE_PRECISE_GROIN) && self_tailcheck && other_tailcheck) + if((zone_selected == BODY_ZONE_PRECISE_GROIN) && has_tail() && M.has_tail()) visible_message("[src] coils [p_their()] tail with [AM], pulling [M.p_them()] along!", "[src] has entwined [p_their()] tail with yours, pulling you along!") else visible_message("[src] has grabbed [M][(zone_selected == "l_arm" || zone_selected == "r_arm")? " by [M.p_their()] hands":" passively"]!",