Fixes teshari clothing fallback fallback rendering (#13823)

This commit is contained in:
Tastyfish
2022-05-23 11:50:14 +01:00
committed by GitHub
parent 90920d4b10
commit dcce332080
2 changed files with 8 additions and 8 deletions
@@ -108,7 +108,7 @@
if(item.greyscale_colors)
// Just use the colors already given to us, but re-align to expected colors.
var/list/colors = SSgreyscale.ParseColorString(item.greyscale_colors)
var/default_color = (length(colors) >= 1) ? colors[1] : "#00000000"
var/default_color = (length(colors) >= 1) ? colors[1] : COLOR_DARK
var/list/final_list = list()
for(var/i in 1 to expected_num_colors)
final_list += (i < length(colors)) ? colors[i] : default_color
@@ -120,10 +120,10 @@
for(var/i in 1 to expected_num_colors)
if(length(item.species_clothing_color_coords) < i)
color_list += "#00000000"
color_list += COLOR_DARK
continue
var/color = item.species_clothing_color_coords[i]
color_list += final_human_icon.GetPixel(color[1], color[2]) || "#00000000"
var/coord = item.species_clothing_color_coords[i]
color_list += final_human_icon.GetPixel(coord[1], coord[2]) || COLOR_DARK
fallback_greyscale_colors = color_list.Join("")
@@ -1,8 +1,8 @@
// These COLORPIXEL defines indicate the pixel position on the base sprite of a clothing piece from which the color will be taken.
#define GLASSES_COLORPIXEL_X_1 14
#define GLASSES_COLORPIXEL_Y_1 26
#define GLASSES_COLORPIXEL_X_2 17
#define GLASSES_COLORPIXEL_Y_2 26
#define GLASSES_COLORPIXEL_X_1 10
#define GLASSES_COLORPIXEL_Y_1 16
#define GLASSES_COLORPIXEL_X_2 18
#define GLASSES_COLORPIXEL_Y_2 16
#define GLOVES_COLORPIXEL_X_1 10
#define GLOVES_COLORPIXEL_Y_1 13