Files
GS13NG/datum/asset_transport.html

25 lines
8.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/asset_transport - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/asset_transport.html#var">Var Details</a> - <a href="datum/asset_transport.html#proc">Proc Details</a></header><main><h1>asset_transport <aside>/<a href="datum.html">datum</a>/<a href="datum/asset_transport.html">asset_transport</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L5"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 5"></a></h1><p>Base browse_rsc asset transport</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/asset_transport.html#var/dont_mutate_filenames">dont_mutate_filenames</a></th><td>Don't mutate the filename of assets when sending via browse_rsc.
This is to make it easier to debug issues with assets, and allow server operators to bypass issues that make it to production.
If turning this on fixes asset issues, something isn't using get_asset_url and the asset isn't marked legacy, fix one of those.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/asset_transport.html#proc/Initialize">Initialize</a></th><td>Initialize - Called when SSassets initializes.</td></tr><tr><th><a href="datum/asset_transport.html#proc/Load">Load</a></th><td>Called when the transport is loaded by the config controller, not called on the default transport unless it gets loaded by a config change.</td></tr><tr><th><a href="datum/asset_transport.html#proc/get_asset_url">get_asset_url</a></th><td>Returns a url for a given asset.
asset_name - Name of the asset.
asset_cache_item - asset cache item datum for the asset, optional, overrides asset_name</td></tr><tr><th><a href="datum/asset_transport.html#proc/register_asset">register_asset</a></th><td>Register a browser asset with the asset cache system
asset_name - the identifier of the asset
asset - the actual asset file (or an asset_cache_item datum)
returns a /datum/asset_cache_item.
mutiple calls to register the same asset under the same asset_name return the same datum</td></tr><tr><th><a href="datum/asset_transport.html#proc/send_assets">send_assets</a></th><td>Sends a list of browser assets to a client
client - a client or mob
asset_list - A list of asset filenames to be sent to the client. Can optionally be assoicated with the asset's asset_cache_item datum.
Returns TRUE if any assets were sent.</td></tr><tr><th><a href="datum/asset_transport.html#proc/send_assets_slow">send_assets_slow</a></th><td>Precache files without clogging up the browse() queue, used for passively sending files on connection start.</td></tr><tr><th><a href="datum/asset_transport.html#proc/validate_config">validate_config</a></th><td>Check the config is valid to load this transport
Returns TRUE or FALSE</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/dont_mutate_filenames"><aside class="declaration">var </aside>dont_mutate_filenames <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L11"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 11"></a></h3><p>Don't mutate the filename of assets when sending via browse_rsc.
This is to make it easier to debug issues with assets, and allow server operators to bypass issues that make it to production.
If turning this on fixes asset issues, something isn't using get_asset_url and the asset isn't marked legacy, fix one of those.</p><h2 id="proc">Proc Details</h2><h3 id="proc/Initialize"><aside class="declaration">proc </aside>Initialize<aside>(/list/assets) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L20"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 20"></a></aside></h3><p>Initialize - Called when SSassets initializes.</p><h3 id="proc/Load"><aside class="declaration">proc </aside>Load<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L14"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 14"></a></aside></h3><p>Called when the transport is loaded by the config controller, not called on the default transport unless it gets loaded by a config change.</p><h3 id="proc/get_asset_url"><aside class="declaration">proc </aside>get_asset_url<aside>(asset_name, /<a href="datum.html">datum</a>/<a href="datum/asset_cache_item.html">asset_cache_item</a>/asset_cache_item) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L60"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 60"></a></aside></h3><p>Returns a url for a given asset.
asset_name - Name of the asset.
asset_cache_item - asset cache item datum for the asset, optional, overrides asset_name</p><h3 id="proc/register_asset"><aside class="declaration">proc </aside>register_asset<aside>(asset_name, asset) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L33"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 33"></a></aside></h3><p>Register a browser asset with the asset cache system
asset_name - the identifier of the asset
asset - the actual asset file (or an asset_cache_item datum)
returns a /datum/asset_cache_item.
mutiple calls to register the same asset under the same asset_name return the same datum</p><h3 id="proc/send_assets"><aside class="declaration">proc </aside>send_assets<aside>(/<a href="client.html">client</a>/client, /list/asset_list) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L78"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 78"></a></aside></h3><p>Sends a list of browser assets to a client
client - a client or mob
asset_list - A list of asset filenames to be sent to the client. Can optionally be assoicated with the asset's asset_cache_item datum.
Returns TRUE if any assets were sent.</p><h3 id="proc/send_assets_slow"><aside class="declaration">proc </aside>send_assets_slow<aside>(/<a href="client.html">client</a>/client, /list/files, filerate) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L140"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 140"></a></aside></h3><p>Precache files without clogging up the browse() queue, used for passively sending files on connection start.</p><h3 id="proc/validate_config"><aside class="declaration">proc </aside>validate_config<aside>(log) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/asset_cache/transports/asset_transport.dm#L153"><img src="git.png" width="16" height="16" title="code/modules/asset_cache/transports/asset_transport.dm 153"></a></aside></h3><p>Check the config is valid to load this transport
Returns TRUE or FALSE</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>