mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
Allow wings with a secondary color
Adds code to support wings with extra_overlay having a secondary color, like tails do. Currently extra_overlay is just ignored on wings.
This commit is contained in:
@@ -121,4 +121,14 @@
|
||||
g_wing = new_color_rgb_list[2]
|
||||
b_wing = new_color_rgb_list[3]
|
||||
|
||||
//Indented inside positive primary color choice, don't bother if they clicked cancel
|
||||
var/current_sec_color = rgb(r_wing2,g_wing2,b_wing2)
|
||||
|
||||
var/new_sec_color = input("Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) as null|color
|
||||
if(new_sec_color)
|
||||
new_color_rgb_list = hex2rgb(new_sec_color)
|
||||
r_wing2 = new_color_rgb_list[1]
|
||||
g_wing2 = new_color_rgb_list[2]
|
||||
b_wing2 = new_color_rgb_list[3]
|
||||
|
||||
update_wing_showing()
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
var/icon/wing_s = new/icon("icon" = wing_style.icon, "icon_state" = flapping && wing_style.ani_state ? wing_style.ani_state : wing_style.icon_state)
|
||||
if(wing_style.do_colouration)
|
||||
wing_s.Blend(rgb(src.r_wing, src.g_wing, src.b_wing), wing_style.color_blend_mode)
|
||||
if(wing_style.extra_overlay)
|
||||
var/icon/overlay = new/icon("icon" = wing_style.icon, "icon_state" = wing_style.extra_overlay)
|
||||
overlay.Blend(rgb(src.r_wing2, src.g_wing2, src.b_wing2), wing_style.color_blend_mode)
|
||||
wing_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
return image(wing_s)
|
||||
|
||||
// TODO - Move this to where it should go ~Leshana
|
||||
|
||||
Reference in New Issue
Block a user