From c60c2c564f0140587845d0a9b897e0ee498fd6b3 Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 10 Aug 2023 15:28:42 +0300 Subject: [PATCH] Lick/smell verbs can now be used on held mobs. (#6751) --- code/_helpers/mobs.dm | 13 +++++++++---- code/modules/vore/eating/living_vr.dm | 15 ++++++++++----- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 222e22d590..6ff85c94e6 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -232,7 +232,7 @@ Proc for attack log creation, because really why not if(target?.flags & IS_BUSY) to_chat(user, "Someone is already doing something with \the [target].") return FALSE - + var/atom/target_loc = null if(target) target_loc = target.loc @@ -256,7 +256,7 @@ Proc for attack log creation, because really why not if(exclusive & TASK_USER_EXCLUSIVE) user.status_flags |= DOING_TASK - + if(target && (exclusive & TASK_TARGET_EXCLUSIVE)) target.flags |= IS_BUSY @@ -304,12 +304,17 @@ Proc for attack log creation, because really why not if(progbar) qdel(progbar) -/atom/proc/living_mobs(var/range = world.view) +/atom/proc/living_mobs(var/range = world.view, var/count_held = FALSE) //CHOMPEdit Start var/list/viewers = oviewers(src,range) + if(count_held) + viewers = viewers(src,range) var/list/living = list() for(var/mob/living/L in viewers) living += L - + if(count_held) + for(var/obj/item/weapon/holder/H in L.contents) + if(istype(H.held_mob, /mob/living)) + living += H.held_mob //CHOMPEdit End return living /atom/proc/human_mobs(var/range = world.view) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 6c85bea646..31e16ec204 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -417,7 +417,7 @@ // // Clearly super important. Obviously. // -/mob/living/proc/lick(mob/living/tasted in living_mobs(1)) +/mob/living/proc/lick(mob/living/tasted in living_mobs(1, TRUE)) //CHOMPEdit set name = "Lick" set category = "IC" set desc = "Lick someone nearby!" @@ -430,8 +430,10 @@ return setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - - visible_message("[src] licks [tasted]!","You lick [tasted]. They taste rather like [tasted.get_taste_message()].","Slurp!") + if(tasted == src) //CHOMPEdit Start + visible_message("[src] licks themself!","You lick yourself. You taste rather like [tasted.get_taste_message()].","Slurp!") + else + visible_message("[src] licks [tasted]!","You lick [tasted]. They taste rather like [tasted.get_taste_message()].","Slurp!") //CHOMPEdit End /mob/living/proc/get_taste_message(allow_generic = 1) @@ -458,7 +460,7 @@ //This is just the above proc but switched about. -/mob/living/proc/smell(mob/living/smelled in living_mobs(1)) +/mob/living/proc/smell(mob/living/smelled in living_mobs(1, TRUE)) //CHOMPEdit set name = "Smell" set category = "IC" set desc = "Smell someone nearby!" @@ -470,7 +472,10 @@ return setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - visible_message("[src] smells [smelled]!","You smell [smelled]. They smell like [smelled.get_smell_message()].","Sniff!") + if(smelled == src) //CHOMPEdit Start + visible_message("[src] smells themself!","You smell yourself. You smell like [smelled.get_smell_message()].","Sniff!") + else + visible_message("[src] smells [smelled]!","You smell [smelled]. They smell like [smelled.get_smell_message()].","Sniff!") //CHOMPEdit End /mob/living/proc/get_smell_message(allow_generic = 1) if(!vore_smell && !allow_generic)