Moved same code into single organ helper to handle embedding.

This commit is contained in:
Chinsky
2014-06-24 04:09:35 +04:00
parent b2b9907605
commit ece48ae0c4
4 changed files with 23 additions and 25 deletions
+13
View File
@@ -703,6 +703,19 @@ This function completely restores a damaged organ to perfect condition.
/datum/organ/external/proc/is_usable()
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/datum/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0)
if(!silent)
owner.visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
implants += W
owner.embedded_flag = 1
owner.verbs += /mob/proc/yank_out_object
W.add_blood(owner)
if(ismob(W.loc))
var/mob/living/H = W.loc
H.drop_item()
W.loc = owner
/****************************************************
ORGAN DEFINES
****************************************************/