Now possible to change cable coil color using a multitool.

Obviously using the same methods that borgs use to change the cable coil color internally.
This commit is contained in:
PsiOmegaDelta
2015-12-09 20:20:28 +01:00
parent 60e785da97
commit abcd965dde
8 changed files with 55 additions and 24 deletions
@@ -0,0 +1,18 @@
/obj/item/stack/cable_coil/New()
set_expansion(/datum/expansion/multitool, new/datum/expansion/multitool/items/cable(src))
..()
/datum/expansion/multitool/items/cable/get_interact_window(var/obj/item/device/multitool/M, var/mob/user)
. += "<b>Available Colors</b><br>"
. += "<table>"
for(var/cable_color in possible_cable_coil_colours)
. += "<tr><td>[cable_color]</td></td><td><a href='?src=\ref[src];select_color=[cable_color]'>Select</a></td></tr>"
. += "</table>"
/datum/expansion/multitool/items/cable/on_topic(href, href_list, user)
var/obj/item/stack/cable_coil/cable_coil = holder
if(href_list["select_color"] && href_list["select_color"] in possible_cable_coil_colours)
cable_coil.set_cable_color(href_list["select_color"], user)
return MT_REFRESH
return ..()
@@ -0,0 +1,5 @@
/datum/expansion/multitool/items/CanUseTopic(var/mob/user)
if(isAI(user)) // No remote AI access
return STATUS_CLOSE
return ..()