Porting update_icon improvements. Part 1.

This commit is contained in:
Ghommie
2020-02-27 01:21:03 +01:00
parent 5bd62d129f
commit fc76cd9a9b
122 changed files with 733 additions and 723 deletions
@@ -10,18 +10,14 @@
throw_range = 5
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/glass=500)
var/obj/item/implant/imp = null
var/obj/item/implant/imp
var/imp_type
/obj/item/implantcase/update_icon()
/obj/item/implantcase/update_icon_state()
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))
@@ -46,6 +42,7 @@
imp = I.imp
I.imp = null
update_icon()
reagents = imp.reagents
I.update_icon()
else
if(imp)
@@ -54,6 +51,7 @@
imp.forceMove(I)
I.imp = imp
imp = null
reagents = null
update_icon()
I.update_icon()