/atom ///The config type to use for greyscaled sprites. Both this and greyscale_colors must be assigned to work. var/greyscale_config ///A string of hex format colors to be used by greyscale sprites, ex: "#0054aa#badcff" var/greyscale_colors /// Handles updates to greyscale value updates. /// The colors argument can be either a list or the full color string. /// Child procs should call parent last so the update happens after all changes. /atom/proc/set_greyscale(list/colors, new_config) SHOULD_CALL_PARENT(TRUE) if(istype(colors)) colors = colors.Join("") if(!isnull(colors) && greyscale_colors != colors) // If you want to disable greyscale stuff then give a blank string greyscale_colors = colors if(!isnull(new_config) && greyscale_config != new_config) greyscale_config = new_config update_greyscale() /// Checks if this atom uses the GAGS system and if so updates the icon /atom/proc/update_greyscale() SHOULD_CALL_PARENT(TRUE) if(greyscale_colors && greyscale_config) icon = SSgreyscale.GetColoredIconByType(greyscale_config, greyscale_colors) if(!smoothing_flags) // This is a bitfield but we're just checking that some sort of smoothing is happening return update_atom_colour() QUEUE_SMOOTH(src)