mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Update implantcase.dm to absolute paths
This commit is contained in:
@@ -9,60 +9,55 @@
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
proc
|
||||
update()
|
||||
|
||||
/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
|
||||
|
||||
update()
|
||||
if (src.imp)
|
||||
src.icon_state = text("implantcase-[]", src.imp.item_color)
|
||||
/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 = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
|
||||
if(t)
|
||||
src.name = text("Glass Case- '[]'", t)
|
||||
else
|
||||
src.icon_state = "implantcase-0"
|
||||
return
|
||||
|
||||
|
||||
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)
|
||||
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))
|
||||
if (I:imp)
|
||||
if ((src.imp || I:imp.implanted))
|
||||
return
|
||||
if((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = copytext(sanitize(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))
|
||||
if (I:imp)
|
||||
if ((src.imp || I:imp.implanted))
|
||||
I:imp.loc = src
|
||||
src.imp = I:imp
|
||||
I:imp = null
|
||||
src.update()
|
||||
I:update()
|
||||
else
|
||||
if (src.imp)
|
||||
if (I:imp)
|
||||
return
|
||||
I:imp.loc = src
|
||||
src.imp = I:imp
|
||||
I:imp = null
|
||||
src.update()
|
||||
I:update()
|
||||
else
|
||||
if (src.imp)
|
||||
if (I:imp)
|
||||
return
|
||||
src.imp.loc = I
|
||||
I:imp = src.imp
|
||||
src.imp = null
|
||||
update()
|
||||
I:update()
|
||||
return
|
||||
|
||||
src.imp.loc = I
|
||||
I:imp = src.imp
|
||||
src.imp = null
|
||||
update()
|
||||
I:update()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/tracking
|
||||
@@ -71,12 +66,10 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/tracking( src )
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantcase/tracking/New()
|
||||
src.imp = new /obj/item/weapon/implant/tracking( src )
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/explosive
|
||||
@@ -85,12 +78,10 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-r"
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/explosive( src )
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantcase/explosive/New()
|
||||
src.imp = new /obj/item/weapon/implant/explosive( src )
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/chem
|
||||
@@ -98,8 +89,8 @@
|
||||
desc = "A case containing a chemical implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
/obj/item/weapon/implantcase/chem/New()
|
||||
|
||||
/obj/item/weapon/implantcase/chem/New()
|
||||
src.imp = new /obj/item/weapon/implant/chem( src )
|
||||
..()
|
||||
return
|
||||
@@ -111,11 +102,10 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-r"
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/loyalty( src )
|
||||
..()
|
||||
return
|
||||
/obj/item/weapon/implantcase/loyalty/New()
|
||||
src.imp = new /obj/item/weapon/implant/loyalty( src )
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/death_alarm
|
||||
@@ -124,10 +114,11 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/death_alarm( src )
|
||||
..()
|
||||
return
|
||||
/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'"
|
||||
@@ -135,7 +126,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/freedom( src )
|
||||
..()
|
||||
return
|
||||
/obj/item/weapon/implantcase/freedom/New()
|
||||
src.imp = new /obj/item/weapon/implant/freedom( src )
|
||||
..()
|
||||
return
|
||||
Reference in New Issue
Block a user