Medipen and regen cores can now be used in hand (#45161)

* Medipen and regen cores can now be activated in hand.

* Autodoc

* Old regen core description.

* Cyborg proc begone

* cleanup, no tk shenanigans.

* Removed unusable pen.

* better return.
This commit is contained in:
skoglol
2019-07-17 11:51:48 -04:00
committed by moo
parent dc03a88a9c
commit cc9913434a
2 changed files with 31 additions and 33 deletions
@@ -20,7 +20,7 @@
/************************Hivelord core*******************/
/obj/item/organ/regenerative_core
name = "regenerative core"
desc = "All that remains of a hivelord. It can be used to heal completely, but it will rapidly decay into uselessness."
desc = "All that remains of a hivelord. It can be used to help keep your body going, but it will rapidly decay into uselessness."
icon_state = "roro core 2"
item_flags = NOBLUDGEON
slot = "hivecore"
@@ -66,16 +66,16 @@
if(owner.health <= owner.crit_threshold)
ui_action_click()
/obj/item/organ/regenerative_core/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag && ishuman(target))
///Handles applying the core, logging and status/mood events.
/obj/item/organ/regenerative_core/proc/applyto(atom/target, mob/user)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(inert)
to_chat(user, "<span class='notice'>[src] has decayed and can no longer be used to heal.</span>")
return
else
if(H.stat == DEAD)
to_chat(user, "<span class='notice'>[src] are useless on the dead.</span>")
to_chat(user, "<span class='notice'>[src] is useless on the dead.</span>")
return
if(H != user)
H.visible_message("[user] forces [H] to apply [src]... Black tendrils entangle and reinforce [H.p_them()]!")
@@ -87,6 +87,15 @@
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "core", /datum/mood_event/healsbadman) //Now THIS is a miner buff (fixed - nerf)
qdel(src)
/obj/item/organ/regenerative_core/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag)
applyto(target, user)
/obj/item/organ/regenerative_core/attack_self(mob/user)
if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
applyto(user, user)
/obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
. = ..()
if(!preserved && !inert)