mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* items-and-weapons.dmi is no more All my homies hate items-and-weapons.dmi * ack * ack x2 * Update bloodsucker_crypt.dm
84 lines
2.1 KiB
Plaintext
84 lines
2.1 KiB
Plaintext
/obj/item/implantcase
|
|
name = "implant case"
|
|
desc = "A glass case containing an implant."
|
|
icon = 'icons/obj/implants.dmi'
|
|
icon_state = "implantcase-0"
|
|
item_state = "implantcase"
|
|
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
|
throw_speed = 2
|
|
throw_range = 5
|
|
w_class = WEIGHT_CLASS_TINY
|
|
materials = list(/datum/material/glass=500)
|
|
var/obj/item/implant/imp = null
|
|
var/imp_type
|
|
|
|
|
|
/obj/item/implantcase/update_icon()
|
|
if(imp)
|
|
icon_state = "implantcase-[imp.item_color]"
|
|
reagents = imp.reagents
|
|
else
|
|
icon_state = "implantcase-0"
|
|
reagents = null
|
|
|
|
|
|
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/pen))
|
|
if(!user.is_literate())
|
|
to_chat(user, span_notice("You scribble illegibly on the side of [src]!"))
|
|
return
|
|
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
|
if(user.get_active_held_item() != W)
|
|
return
|
|
if(!user.canUseTopic(src, BE_CLOSE))
|
|
return
|
|
if(t)
|
|
name = "implant case - '[t]'"
|
|
else
|
|
name = "implant case"
|
|
else if(istype(W, /obj/item/implanter))
|
|
var/obj/item/implanter/I = W
|
|
if(I.imp)
|
|
if(imp || I.imp.imp_in)
|
|
return
|
|
I.imp.forceMove(src)
|
|
imp = I.imp
|
|
I.imp = null
|
|
update_icon()
|
|
I.update_icon()
|
|
else
|
|
if(imp)
|
|
if(I.imp)
|
|
return
|
|
imp.forceMove(I)
|
|
I.imp = imp
|
|
imp = null
|
|
update_icon()
|
|
I.update_icon()
|
|
|
|
else
|
|
return ..()
|
|
|
|
/obj/item/implantcase/Initialize(mapload)
|
|
. = ..()
|
|
if(imp_type)
|
|
imp = new imp_type(src)
|
|
update_icon()
|
|
|
|
|
|
/obj/item/implantcase/tracking
|
|
name = "implant case - 'Tracking'"
|
|
desc = "A glass case containing a tracking implant."
|
|
imp_type = /obj/item/implant/tracking
|
|
|
|
/obj/item/implantcase/weapons_auth
|
|
name = "implant case - 'Firearms Authentication'"
|
|
desc = "A glass case containing a firearms authentication implant."
|
|
imp_type = /obj/item/implant/weapons_auth
|
|
|
|
/obj/item/implantcase/adrenaline
|
|
name = "implant case - 'Adrenaline'"
|
|
desc = "A glass case containing an adrenaline implant."
|
|
imp_type = /obj/item/implant/adrenalin
|