byond - Modules - Types

code/__HELPERS/icons.dm

/proc/getFlatIconCreate a single /icon from a given /atom or /image.
/proc/generate_and_hash_rsc_filegenerates a filename for a given asset. like generate_asset_name(), except returns the rsc reference and the rsc file hash as well as the asset name (sans extension) used so that certain asset files dont have to be hashed twice
/proc/is_valid_dmi_filegiven a text string, returns whether it is a valid dmi icons folder path
/proc/get_icon_dmi_pathgiven an icon object, dmi file path, or atom/image/mutable_appearance, attempts to find and return an associated dmi file path. a weird quirk about dm is that /icon objects represent both compile-time or dynamic icons in the rsc, but stringifying rsc references returns a dmi file path ONLY if that icon represents a completely unchanged dmi file from when the game was compiled. so if the given object is associated with an icon that was in the rsc when the game was compiled, this returns a path. otherwise it returns ""
/proc/pick_and_customize_iconAsks the user for an icon (either from file or as a path) and offers to customize it if possible (e.g. setting icon_state)
/proc/icon2htmlgenerate an asset for the given icon or the icon of the given appearance for [thing], and send it to any clients in target. Arguments:
/proc/generate_asset_nameGenerate a filename for this asset The same asset will always lead to the same asset name (Generated names do not include file extention.)
/proc/icon_existsChecks if the given iconstate exists in the given file, caching the result. Setting scream to TRUE will print a stack trace ONCE.
/proc/center_imageCenter's an image. Requires: The Image The x dimension of the icon file used in the image The y dimension of the icon file used in the image eg: center_image(image_to_center, 32,32) eg2: center_image(image_to_center, 96,96)
/proc/center_iconCenters an icon.