/tg/ Station 13 - Modules - TypesVar Details - Proc Details

spritesheet_batched

Vars

cache_job_idIf there is currently an async cache job, its ID.
cache_resultUsed to prevent async cache refresh jobs from looping on failure.
entries_jsonJSON encoded version of entries.
force_cacheForces use of the smart cache. This is for unit tests, please respect the config <3
fully_generatedIf this spritesheet exists in a completed state.
ignore_dir_errorsIf we should avoid propogating 'invalid dir' errors from rust-g. Because sometimes, you just don't know what dirs are valid.
job_idIf there is currently an async job, its ID
load_immediatelyIf this asset should be fully loaded on new Defaults to false so we can process this stuff nicely
sizeslist("32x32")
sprites"foo_bar" -> list("32x32", 5, entry_obj)

Procs

create_spritesheetsCall insert_icon or insert_all_icons here, building a spritesheet!
css_tag
get_background_urlReturns the URL to put in the background:url of the CSS asset
icon_size_idReturns the size class (ex design32x32) for a given sprite's icon
should_refreshReturns true if the cache should be invalidated/doesn't exist.

Var Details

cache_job_id

If there is currently an async cache job, its ID.

cache_result

Used to prevent async cache refresh jobs from looping on failure.

entries_json

JSON encoded version of entries.

force_cache

Forces use of the smart cache. This is for unit tests, please respect the config <3

fully_generated

If this spritesheet exists in a completed state.

ignore_dir_errors

If we should avoid propogating 'invalid dir' errors from rust-g. Because sometimes, you just don't know what dirs are valid.

job_id

If there is currently an async job, its ID

load_immediately

If this asset should be fully loaded on new Defaults to false so we can process this stuff nicely

sizes

list("32x32")

sprites

"foo_bar" -> list("32x32", 5, entry_obj)

Proc Details

create_spritesheets

Call insert_icon or insert_all_icons here, building a spritesheet!

css_tag

Third party helpers

get_background_url

Returns the URL to put in the background:url of the CSS asset

icon_size_id

Returns the size class (ex design32x32) for a given sprite's icon

Arguments:

should_refresh

Returns true if the cache should be invalidated/doesn't exist.