mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
11 lines
3.1 KiB
HTML
11 lines
3.1 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>code/__HELPERS/iconprocs.dm - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a></header><main><h1>code/__HELPERS/iconprocs.dm <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/__HELPERS/iconprocs.dm"><img src="git.png" width="16" height="16" title="code/__HELPERS/iconprocs.dm"></a></h1><table class="summary" cellspacing="0"><tr><th>/proc/<a href="global.html#proc/generate_and_hash_rsc_file">generate_and_hash_rsc_file</a></th><td>Generates 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</td></tr><tr><th>/proc/<a href="global.html#proc/get_dummy_savefile">get_dummy_savefile</a></th><td>Gets a dummy savefile for usage in icon generation.
|
|
Savefiles generated from this proc will be empty.</td></tr><tr><th>/proc/<a href="global.html#proc/icon2base64">icon2base64</a></th><td>Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
|
exporting it as text, and then parsing the base64 from that.
|
|
(This relies on byond automatically storing icons in savefiles as base64)</td></tr><tr><th>/proc/<a href="global.html#proc/is_valid_dmi_file">is_valid_dmi_file</a></th><td>given a text string, returns whether it is a valid dmi icons folder path</td></tr><tr><th>/proc/<a href="global.html#proc/get_icon_dmi_path">get_icon_dmi_path</a></th><td>Given 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 ""</td></tr><tr><th>/proc/<a href="global.html#proc/icon2asset">icon2asset</a></th><td>generate an asset for the given icon or the icon of the given appearance for [thing], and send it to any clients in target.
|
|
Arguments:</td></tr><tr><th>/proc/<a href="global.html#proc/costly_icon2asset">costly_icon2asset</a></th><td>Costlier version of icon2asset() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.</td></tr><tr><th>/proc/<a href="global.html#proc/get_icon_dimensions">get_icon_dimensions</a></th><td>Returns a list containing the width and height of an icon file</td></tr></table></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/776b9861f70566b1e6a0763a465ef22f7920a3d6">776b986</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |