mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 22:42:26 +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:
+26
-20
@@ -22,6 +22,8 @@ If d1 = dir1 and d2 = dir2, it's a full X-X cable, getting from dir1 to dir2
|
||||
By design, d1 is the smallest direction and d2 is the highest
|
||||
*/
|
||||
|
||||
var/list/possible_cable_coil_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red")
|
||||
|
||||
/obj/structure/cable
|
||||
level = 1
|
||||
anchored =1
|
||||
@@ -550,6 +552,28 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
icon_state = "coil"
|
||||
name = "cable coil"
|
||||
|
||||
/obj/item/stack/cable_coil/proc/set_cable_color(var/selected_color, var/user)
|
||||
if(!selected_color)
|
||||
return
|
||||
|
||||
switch(selected_color)
|
||||
if("Yellow")
|
||||
color = COLOR_YELLOW
|
||||
if("Green")
|
||||
color = COLOR_LIME
|
||||
if("Pink")
|
||||
color = COLOR_PINK
|
||||
if("Blue")
|
||||
color = COLOR_BLUE
|
||||
if("Orange")
|
||||
color = COLOR_ORANGE
|
||||
if("Cyan")
|
||||
color = COLOR_CYAN
|
||||
else
|
||||
color = COLOR_RED
|
||||
selected_color = "red"
|
||||
user << "<span class='notice'>You change \the [src]'s color to [lowertext(selected_color)].</span>"
|
||||
|
||||
/obj/item/stack/cable_coil/proc/update_wclass()
|
||||
if(amount == 1)
|
||||
w_class = 1.0
|
||||
@@ -590,26 +614,8 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
set name = "Change Colour"
|
||||
set category = "Object"
|
||||
|
||||
var/list/possible_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red")
|
||||
var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_colours
|
||||
|
||||
if(selected_type)
|
||||
switch(selected_type)
|
||||
if("Yellow")
|
||||
color = COLOR_YELLOW
|
||||
if("Green")
|
||||
color = COLOR_LIME
|
||||
if("Pink")
|
||||
color = COLOR_PINK
|
||||
if("Blue")
|
||||
color = COLOR_BLUE
|
||||
if("Orange")
|
||||
color = COLOR_ORANGE
|
||||
if("Cyan")
|
||||
color = COLOR_CYAN
|
||||
else
|
||||
color = COLOR_RED
|
||||
usr << "You change your cable coil's colour to [selected_type]"
|
||||
var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_cable_coil_colours
|
||||
set_cable_color(selected_type, usr)
|
||||
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
|
||||
Reference in New Issue
Block a user