From d8af99afc4c62fa23b6a14480a7a8fde532f2796 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Thu, 21 May 2020 11:59:40 -0400 Subject: [PATCH 1/2] VS: Protean single limb refactor color fix --- .../carbon/human/species/station/protean_vr/protean_powers.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm index e8f83e5f19f..138af95b25b 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm @@ -46,6 +46,7 @@ var/obj/item/organ/external/new_eo = new limbpath(src) organs_by_name[choice] = new_eo new_eo.robotize(synthetic ? synthetic.company : null) //Use the base we started with + new_eo.sync_colour_to_human(src) regenerate_icons() active_regen = FALSE nano_outofblob(blob) From 61ae4f886c6a3a0d2c554e0416ef28a4cfd07a2c Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Thu, 21 May 2020 11:59:54 -0400 Subject: [PATCH 2/2] Shapeshifter color selection knows default/current --- code/_helpers/icons.dm | 7 +++++++ .../mob/living/carbon/human/species/species_shapeshift.dm | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/_helpers/icons.dm b/code/_helpers/icons.dm index a199c886220..24fd396bb2f 100644 --- a/code/_helpers/icons.dm +++ b/code/_helpers/icons.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index 48e7cb8375e..6629a96a9f1 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -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)