Adds ability to lick ones own wounds with the new wound-lick ability

I won't lie, this is a possibly slightly hacky way around it, by changing the range check from the living_mob(1) in the var itself, to an if check later in.

What this means in the front side, is that all carbon/human mobs on screen will show up in the targetable list if its used instead of just right clicking someone, and the 'check' for range will happen just before licks happen. telling them to get closer to the intended person instead.

if theres a cleaner way of doing this, of which I'm fairly sure there is, we can change to that when we find it.
This commit is contained in:
Dwaggy
2019-04-15 21:14:25 +01:00
parent 5348df0322
commit 199afd0fa1
@@ -1,4 +1,4 @@
/mob/living/carbon/human/proc/lick_wounds(var/mob/living/carbon/M in living_mobs(1))
/mob/living/carbon/human/proc/lick_wounds(var/mob/living/carbon/M) //YWedit, origionally, living/carbon/M in living_mobs(1), However, living_mobs does not include src as possible target.
set name = "Lick Wounds"
set category = "Abilities"
set desc = "Disinfect and heal small wounds with your saliva."
@@ -6,6 +6,10 @@
if(nutrition < 50)
to_chat(src, "<span class='warning'>You need more energy to produce antiseptic enzymes. Eat something and try again.</span>")
return
//YW edit. Added the distance check to here. this allows the ability to lick ones own wounds. although this also means that all living/carbon/M appear on the list if used.
if (get_dist(src,M) >= 2)
src << "<span class='warning'>You need to be closer to do that.</span>"
return
if ( ! (istype(src, /mob/living/carbon/human) || \
istype(src, /mob/living/silicon)) )
@@ -68,7 +72,7 @@
return
else
visible_message("<span class='notice'>\The [src] [pick("slathers \a [W.desc] on [M]'s [affecting.name] with their spit.",
visible_message("<span class='notice'>\The [src] [pick("slathers \a [W.desc] on [M]'s [affecting.name] with their spit.",
"drags their tongue across \a [W.desc] on [M]'s [affecting.name].",
"drips saliva onto \a [W.desc] on [M]'s [affecting.name].",
"uses their tongue to disinfect \a [W.desc] on [M]'s [affecting.name].",