Colorable Glasses Fix (#18989)

* Fixed colorable glasses frames being affected by the alpha value.
This commit is contained in:
Geeves
2024-04-20 20:15:19 +00:00
committed by GitHub
parent b18e52b262
commit c16cc65992
5 changed files with 15 additions and 5 deletions
+6 -3
View File
@@ -179,10 +179,13 @@
///When you want to slice out a chunk from a sprite
var/alpha_mask
///Boolean, determines whether accent colour is applied or not
/// Boolean, determines whether accent colour is applied or not
var/has_accents = FALSE
///used for accents which are coloured differently to the main body of the sprite
/// appearance_flags Bitflag, when has_accents is set to true, this will determine which flags will be applied to the accent image
var/accent_flags = RESET_COLOR
/// used for accents which are coloured differently to the main body of the sprite
var/accent_color = COLOR_GRAY
/**
@@ -271,7 +274,7 @@
if(build_from_parts)
add_overlay(overlay_image(icon,"[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite
if(has_accents)
add_overlay(overlay_image(icon,"[icon_state]_acc",accent_color, RESET_COLOR))
add_overlay(overlay_image(icon, "[icon_state]_acc", accent_color, accent_flags))
/obj/item/device
icon = 'icons/obj/device.dmi'
+1 -1
View File
@@ -48,7 +48,7 @@ var/list/mob_icon_icon_states = list()
if(additional_parts)
I.add_overlay(additional_parts)
if(has_accents)
I.add_overlay(overlay_image(icon,"[UNDERSCORE_OR_NULL(src.icon_species_tag)][item_state][contained_sprite ? slot_str_to_contained_flag(slot) : ""]_acc",accent_color, RESET_COLOR))
I.add_overlay(overlay_image(icon, "[UNDERSCORE_OR_NULL(src.icon_species_tag)][item_state][contained_sprite ? slot_str_to_contained_flag(slot) : ""]_acc", accent_color, accent_flags))
var/offset_x = worn_x_dimension
var/offset_y = worn_y_dimension
center_image(I, offset_x, offset_y)