Lick/smell verbs can now be used on held mobs. (#6751)

This commit is contained in:
Verkister
2023-08-10 15:28:42 +03:00
committed by GitHub
parent d99fc55c42
commit c60c2c564f
2 changed files with 19 additions and 9 deletions

View File

@@ -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)

View File

@@ -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("<span class='warning'>[src] licks [tasted]!</span>","<span class='notice'>You lick [tasted]. They taste rather like [tasted.get_taste_message()].</span>","<b>Slurp!</b>")
if(tasted == src) //CHOMPEdit Start
visible_message("<span class='warning'>[src] licks themself!</span>","<span class='notice'>You lick yourself. You taste rather like [tasted.get_taste_message()].</span>","<b>Slurp!</b>")
else
visible_message("<span class='warning'>[src] licks [tasted]!</span>","<span class='notice'>You lick [tasted]. They taste rather like [tasted.get_taste_message()].</span>","<b>Slurp!</b>") //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("<span class='warning'>[src] smells [smelled]!</span>","<span class='notice'>You smell [smelled]. They smell like [smelled.get_smell_message()].</span>","<b>Sniff!</b>")
if(smelled == src) //CHOMPEdit Start
visible_message("<span class='warning'>[src] smells themself!</span>","<span class='notice'>You smell yourself. You smell like [smelled.get_smell_message()].</span>","<b>Sniff!</b>")
else
visible_message("<span class='warning'>[src] smells [smelled]!</span>","<span class='notice'>You smell [smelled]. They smell like [smelled.get_smell_message()].</span>","<b>Sniff!</b>") //CHOMPEdit End
/mob/living/proc/get_smell_message(allow_generic = 1)
if(!vore_smell && !allow_generic)