1 line
12 KiB
HTML
1 line
12 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/controller/subsystem/sounds - /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/controller/subsystem/sounds.html#var">Var Details</a> - <a href="datum/controller/subsystem/sounds.html#proc">Proc Details</a></header><main><h1>sounds <aside>/<a href="datum.html">datum</a>/<a href="datum/controller/subsystem.html">controller/subsystem</a>/<a href="datum/controller/subsystem/sounds.html">sounds</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L3"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 3"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/channel_list">channel_list</a></th><td>List of all channels as numbers</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/channel_random_low">channel_random_low</a></th><td>lower iteration position - Incremented and looped to get "random" sound channels for normal sounds. The channel at this index is returned when asking for a random channel.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/channel_reserve_high">channel_reserve_high</a></th><td>higher reserve position - decremented and incremented to reserve sound channels, anything above this is reserved. The channel at this index is the highest unreserved channel.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/random_channels_min">random_channels_min</a></th><td>Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/reserved_channels">reserved_channels</a></th><td>Associative list of all reserved channels associated to their position. <code>"[channel_number]" =</code> index as number</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/using_channels">using_channels</a></th><td>Assoc list, <code>"[channel]" =</code> either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/using_channels_by_datum">using_channels_by_datum</a></th><td>Assoc list datum = list(channel1, channel2, ...) for what channels something reserved.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/available_channels_left">available_channels_left</a></th><td>How many channels we have left.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/free_channel">free_channel</a></th><td>Frees a channel and updates the datastructure. Private proc.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/free_datum_channels">free_datum_channels</a></th><td>Frees all the channels a datum is using.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/free_datumless_channels">free_datumless_channels</a></th><td>Frees all datumless channels</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/free_sound_channel">free_sound_channel</a></th><td>Removes a channel from using list.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/random_available_channel">random_available_channel</a></th><td>Random available channel, returns number</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/random_available_channel_text">random_available_channel_text</a></th><td>Random available channel, returns text.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/reserve_channel">reserve_channel</a></th><td>Reserves a channel and updates the datastructure. Private proc.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/reserve_sound_channel">reserve_sound_channel</a></th><td>Reserves a channel for a datum. Automatic cleanup only when the datum is deleted. Returns an integer for channel.</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/reserve_sound_channel_datumless">reserve_sound_channel_datumless</a></th><td>NO AUTOMATIC CLEANUP - If you use this, you better manually free it later! Returns an integer for channel.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/channel_list"><aside class="declaration">var </aside>channel_list <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L18"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 18"></a></h3><p>List of all channels as numbers</p><h3 id="var/channel_random_low"><aside class="declaration">var </aside>channel_random_low <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L22"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 22"></a></h3><p>lower iteration position - Incremented and looped to get "random" sound channels for normal sounds. The channel at this index is returned when asking for a random channel.</p><h3 id="var/channel_reserve_high"><aside class="declaration">var </aside>channel_reserve_high <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L26"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 26"></a></h3><p>higher reserve position - decremented and incremented to reserve sound channels, anything above this is reserved. The channel at this index is the highest unreserved channel.</p><h3 id="var/random_channels_min"><aside class="declaration">var </aside>random_channels_min <aside>– /static</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L9"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 9"></a></h3><p>Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.</p><h3 id="var/reserved_channels"><aside class="declaration">var </aside>reserved_channels <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L20"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 20"></a></h3><p>Associative list of all reserved channels associated to their position. <code>"[channel_number]" =</code> index as number</p><h3 id="var/using_channels"><aside class="declaration">var </aside>using_channels <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L13"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 13"></a></h3><p>Assoc list, <code>"[channel]" =</code> either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel</p><h3 id="var/using_channels_by_datum"><aside class="declaration">var </aside>using_channels_by_datum <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L15"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 15"></a></h3><p>Assoc list datum = list(channel1, channel2, ...) for what channels something reserved.</p><h2 id="proc">Proc Details</h2><h3 id="proc/available_channels_left"><aside class="declaration">proc </aside>available_channels_left<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L132"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 132"></a></aside></h3><p>How many channels we have left.</p><h3 id="proc/free_channel"><aside class="declaration">proc </aside>free_channel<aside>(number) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L101"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 101"></a></aside></h3><p>Frees a channel and updates the datastructure. Private proc.</p><h3 id="proc/free_datum_channels"><aside class="declaration">proc </aside>free_datum_channels<aside>(/<a href="datum.html">datum</a>/D) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L52"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 52"></a></aside></h3><p>Frees all the channels a datum is using.</p><h3 id="proc/free_datumless_channels"><aside class="declaration">proc </aside>free_datumless_channels<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L62"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 62"></a></aside></h3><p>Frees all datumless channels</p><h3 id="proc/free_sound_channel"><aside class="declaration">proc </aside>free_sound_channel<aside>(channel) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L41"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 41"></a></aside></h3><p>Removes a channel from using list.</p><h3 id="proc/random_available_channel"><aside class="declaration">proc </aside>random_available_channel<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L126"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 126"></a></aside></h3><p>Random available channel, returns number</p><h3 id="proc/random_available_channel_text"><aside class="declaration">proc </aside>random_available_channel_text<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L120"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 120"></a></aside></h3><p>Random available channel, returns text.</p><h3 id="proc/reserve_channel"><aside class="declaration">proc </aside>reserve_channel<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L90"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 90"></a></aside></h3><p>Reserves a channel and updates the datastructure. Private proc.</p><h3 id="proc/reserve_sound_channel"><aside class="declaration">proc </aside>reserve_sound_channel<aside>(/<a href="datum.html">datum</a>/D) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L76"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 76"></a></aside></h3><p>Reserves a channel for a datum. Automatic cleanup only when the datum is deleted. Returns an integer for channel.</p><h3 id="proc/reserve_sound_channel_datumless"><aside class="declaration">proc </aside>reserve_sound_channel_datumless<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/controllers/subsystem/sounds.dm#L66"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/sounds.dm 66"></a></aside></h3><p>NO AUTOMATIC CLEANUP - If you use this, you better manually free it later! Returns an integer for channel.</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> |