Fixes plants attempting to sting ghosts

Fixes #3427
This commit is contained in:
FalseIncarnate
2016-01-28 21:38:54 -05:00
parent 657ec31e6a
commit 70804d49fc
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -145,6 +145,8 @@
/datum/seed/proc/do_sting(var/mob/living/carbon/human/target, var/obj/item/fruit, var/target_limb)
if(!get_trait(TRAIT_STINGS))
return
if(!istype(target))
return
if(!target_limb) //if we weren't given a target_limb, pick a random one to try stinging
target_limb = pick("l_foot","r_foot","l_leg","r_leg","l_hand","r_hand","l_arm", "r_arm","head","chest","groin")
if(chems && chems.len)
@@ -20,6 +20,8 @@
/obj/effect/plant/Crossed(var/mob/living/victim)
if(!is_mature())
return
if(!istype(victim))
return
var/target_limb = pick("r_foot","l_foot","r_leg","l_leg")
if(ishuman(victim))
var/mob/living/carbon/human/H = victim