From 2c770bf48efb4ef7e7e50129ddb30dae96043726 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 4 Jan 2021 17:09:19 +0100 Subject: [PATCH] Readds hashes var to sanitize_hexcolor() return values. (#2491) Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: Azarak --- code/__HELPERS/sanitize_values.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm index 5f619e78985..32300cf7ff5 100644 --- a/code/__HELPERS/sanitize_values.dm +++ b/code/__HELPERS/sanitize_values.dm @@ -87,9 +87,9 @@ return crunch + . switch(format_input_ratio) //add or remove alpha channel depending on desired format. if("3:8", "3:4", "6:4") - return copytext(., 1, desired_format+1) + return crunch + copytext(., 1, desired_format+1) if("4:6", "4:3", "8:3") - return . + ((desired_format == 4) ? "f" : "ff") + return crunch + . + ((desired_format == 4) ? "f" : "ff") else //not a supported hex color format. return default ? default : crunch + repeat_string(desired_format, "0")