Fixes compressed matter implants + allows items to be retrieved from them. (#9829)

This commit is contained in:
Hockaa
2020-09-01 14:03:59 +02:00
committed by GitHub
parent 701a5b9a02
commit 737c201738
4 changed files with 33 additions and 1 deletions
@@ -594,6 +594,26 @@ the implant may become unstable and either pre-maturely inject the subject or si
var/activation_emote = "sigh"
var/obj/item/scanned = null
/obj/item/implant/compressed/attackby(var/obj/item/T, mob/user)
if(T.isscrewdriver())
if(!scanned)
to_chat(user, SPAN_NOTICE("There is nothing to remove from the implant."))
else
to_chat(user, SPAN_NOTICE("You remove \the [scanned] from the implant."))
user.put_in_hands(scanned)
scanned = null
if(istype(T, /obj/item/implanter))
var/obj/item/implanter/implanter = T
if(implanter.imp)
to_chat(user, SPAN_NOTICE("\The [implanter] already has an implant loaded."))
return
user.drop_from_inventory(src)
forceMove(implanter)
implanter.imp = src
implanter.update()
else
..()
/obj/item/implant/compressed/get_data()
. = {"
<b>Implant Specifications:</b><BR>
@@ -127,8 +127,11 @@
return
if(istype(A,/obj/item) && imp)
var/obj/item/implant/compressed/c = imp
if(istype(A,/obj/item/implant/compressed))
to_chat(user, SPAN_NOTICE("The implant is loaded into the implanter."))
return
if (c.scanned)
to_chat(user, "<span class='warning'>Something is already scanned inside the implant!</span>")
to_chat(user, SPAN_WARNING("Something is already scanned inside the implant!"))
return
c.scanned = A
if(istype(A.loc,/mob/living/carbon/human))