mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Shapeshifter color selection knows default/current
This commit is contained in:
@@ -367,6 +367,13 @@ proc/ReadRGB(rgb)
|
||||
. = list(r, g, b)
|
||||
if(usealpha) . += alpha
|
||||
|
||||
proc/RGBdec2hex(var/list/values)
|
||||
var/string = ""
|
||||
while(values.len)
|
||||
string = "[num2text(values[values.len], 2, 16)][string]"
|
||||
values.len--
|
||||
return "#[string]"
|
||||
|
||||
proc/ReadHSV(hsv)
|
||||
if(!hsv) return
|
||||
|
||||
|
||||
@@ -173,7 +173,8 @@ var/list/wrapped_species_by_ref = list()
|
||||
|
||||
last_special = world.time + 50
|
||||
|
||||
var/new_skin = input("Please select a new body color.", "Shapeshifter Colour") as color
|
||||
var/current = RGBdec2hex(list(r_skin, g_skin, b_skin))
|
||||
var/new_skin = input("Please select a new body color.", "Shapeshifter Colour", current) as null|color
|
||||
if(!new_skin)
|
||||
return
|
||||
shapeshifter_set_colour(new_skin)
|
||||
|
||||
Reference in New Issue
Block a user