mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
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:
@@ -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 ..()
|
||||
Reference in New Issue
Block a user