Fixes splitting cable coils off inactive hand not having correct color

This commit is contained in:
Tastyfish
2016-06-02 17:08:47 -04:00
parent aad02ad697
commit 6d99fdedf3
2 changed files with 18 additions and 30 deletions
+5 -21
View File
@@ -520,6 +520,11 @@ obj/structure/cable/proc/cableColor(var/colorC)
else
return ..()
/obj/item/stack/cable_coil/split()
var/obj/item/stack/cable_coil/C = ..()
C.color = color
return C
/obj/item/stack/cable_coil/update_icon()
if (!color)
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
@@ -600,27 +605,6 @@ obj/structure/cable/proc/cableColor(var/colorC)
src.use(amt)
return
//remove cables from the stack
/* This is probably reduntant
/obj/item/stack/cable_coil/use(var/used)
if(src.amount < used)
return 0
else if (src.amount == used)
if(ismob(loc)) //handle mob icon update
var/mob/M = loc
M.unEquip(src)
qdel(src)
return 1
else
amount -= used
update_icon()
return 1
*/
/obj/item/stack/cable_coil/use(var/used)
. = ..()
update_icon()
return
//add cables to the stack
/obj/item/stack/cable_coil/proc/give(var/extra)
if(amount + extra > MAXCOIL)