mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-05 15:04:21 +00:00
162 lines
4.2 KiB
Plaintext
162 lines
4.2 KiB
Plaintext
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
|
|
|
/obj/item/weapon/implantcase
|
|
name = "glass case"
|
|
desc = "A case containing an implant."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "implantcase-0"
|
|
item_state = "implantcase"
|
|
throw_speed = 1
|
|
throw_range = 5
|
|
w_class = 1.0
|
|
var/obj/item/weapon/implant/imp = null
|
|
|
|
/obj/item/weapon/implantcase/proc/update()
|
|
if (src.imp)
|
|
src.icon_state = text("implantcase-[]", src.imp.item_color)
|
|
else
|
|
src.icon_state = "implantcase-0"
|
|
return
|
|
|
|
/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
|
..()
|
|
if (istype(I, /obj/item/weapon/pen))
|
|
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
|
if (user.get_active_hand() != I)
|
|
return
|
|
if((!in_range(src, usr) && src.loc != user))
|
|
return
|
|
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
|
if(t)
|
|
src.name = text("Glass Case - '[]'", t)
|
|
else
|
|
src.name = "Glass Case"
|
|
else if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
|
if(!src.imp) return
|
|
if(!src.imp.allow_reagents) return
|
|
if(src.imp.reagents.total_volume >= src.imp.reagents.maximum_volume)
|
|
user << "\red [src] is full."
|
|
else
|
|
spawn(5)
|
|
I.reagents.trans_to(src.imp, 5)
|
|
user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units."
|
|
else if (istype(I, /obj/item/weapon/implanter))
|
|
var/obj/item/weapon/implanter/M = I
|
|
if (M.imp)
|
|
if ((src.imp || M.imp.implanted))
|
|
return
|
|
M.imp.loc = src
|
|
src.imp = M.imp
|
|
M.imp = null
|
|
src.update()
|
|
M.update()
|
|
else
|
|
if (src.imp)
|
|
if (M.imp)
|
|
return
|
|
src.imp.loc = M
|
|
M.imp = src.imp
|
|
src.imp = null
|
|
update()
|
|
M.update()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/tracking
|
|
name = "glass case - 'tracking'"
|
|
desc = "A case containing a tracking implant."
|
|
icon_state = "implantcase-b"
|
|
|
|
/obj/item/weapon/implantcase/tracking/New()
|
|
src.imp = new /obj/item/weapon/implant/tracking( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/explosive
|
|
name = "glass case - 'explosive'"
|
|
desc = "A case containing an explosive implant."
|
|
icon_state = "implantcase-r"
|
|
|
|
/obj/item/weapon/implantcase/explosive/New()
|
|
src.imp = new /obj/item/weapon/implant/explosive( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/chem
|
|
name = "glass case - 'chem'"
|
|
desc = "A case containing a chemical implant."
|
|
icon_state = "implantcase-b"
|
|
|
|
/obj/item/weapon/implantcase/chem/New()
|
|
src.imp = new /obj/item/weapon/implant/chem( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/loyalty
|
|
name = "glass case - 'loyalty'"
|
|
desc = "A case containing a loyalty implant."
|
|
icon_state = "implantcase-r"
|
|
|
|
/obj/item/weapon/implantcase/loyalty/New()
|
|
src.imp = new /obj/item/weapon/implant/loyalty( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/death_alarm
|
|
name = "glass case - 'death alarm'"
|
|
desc = "A case containing a death alarm implant."
|
|
icon_state = "implantcase-b"
|
|
|
|
/obj/item/weapon/implantcase/death_alarm/New()
|
|
src.imp = new /obj/item/weapon/implant/death_alarm( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/freedom
|
|
name = "glass case - 'freedom'"
|
|
desc = "A case containing a freedom implant."
|
|
icon_state = "implantcase-r"
|
|
|
|
/obj/item/weapon/implantcase/freedom/New()
|
|
src.imp = new /obj/item/weapon/implant/freedom( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/adrenalin
|
|
name = "glass case - 'adrenalin'"
|
|
desc = "A case containing an adrenalin implant."
|
|
icon_state = "implantcase-b"
|
|
|
|
/obj/item/weapon/implantcase/adrenalin/New()
|
|
src.imp = new /obj/item/weapon/implant/adrenalin( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/dexplosive
|
|
name = "glass case - 'explosive'"
|
|
desc = "A case containing an explosive."
|
|
icon_state = "implantcase-r"
|
|
|
|
/obj/item/weapon/implantcase/dexplosive/New()
|
|
src.imp = new /obj/item/weapon/implant/dexplosive( src )
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implantcase/health
|
|
name = "glass case - 'health'"
|
|
desc = "A case containing a health tracking implant."
|
|
icon_state = "implantcase-b"
|
|
|
|
/obj/item/weapon/implantcase/health/New()
|
|
src.imp = new /obj/item/weapon/implant/health( src )
|
|
..()
|
|
return
|