byond - Modules - TypesVar Details - Proc Details

greyscale_config

Vars

expected_colorsHow many colors are expected to be given when building the sprite
greyscale_flagsFlags that can be used to modify use
icon_cacheGenerated icons keyed by their color arguments
icon_fileReference to the dmi file for this config
icon_statesA list of icon states and their layers
json_configReference to the json config file
nameUser friendly name used in the debug menu
prefixThis is used to differentiate sprites that can use the same json, but you dont want a ton of different icon files. It applies this prefix to the icon states before gathering the icons.
string_icon_fileString path to the icon file, used for reloading
string_json_configString path to the json file, used for reloading

Procs

DebugNameGets the name used for debug purposes
GenerateActually create the icon and color it in, handles caching
GenerateLayerGroupInternal recursive proc to handle nested layer groups
ReadIconStateConfigurationTakes the json icon state configuration and puts it into a more processed format
ReadLayersFromJsonTakes the json layers configuration and puts it into a more processed format
ReadMetadataReads layer configurations to take out some useful overall information

Var Details

expected_colors

How many colors are expected to be given when building the sprite

greyscale_flags

Flags that can be used to modify use

icon_cache

Generated icons keyed by their color arguments

icon_file

Reference to the dmi file for this config

icon_states

A list of icon states and their layers

json_config

Reference to the json config file

name

User friendly name used in the debug menu

prefix

This is used to differentiate sprites that can use the same json, but you dont want a ton of different icon files. It applies this prefix to the icon states before gathering the icons.

string_icon_file

String path to the icon file, used for reloading

string_json_config

String path to the json file, used for reloading

Proc Details

DebugName

Gets the name used for debug purposes

Generate

Actually create the icon and color it in, handles caching

GenerateLayerGroup

Internal recursive proc to handle nested layer groups

ReadIconStateConfiguration

Takes the json icon state configuration and puts it into a more processed format

ReadLayersFromJson

Takes the json layers configuration and puts it into a more processed format

ReadMetadata

Reads layer configurations to take out some useful overall information