mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
15 lines
13 KiB
HTML
15 lines
13 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 - 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> — <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.html">controller</a>/<a href="datum/controller/subsystem.html">subsystem</a>/<a href="datum/controller/subsystem/sounds.html">sounds</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L3"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.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. "[channel_number]" = index as number</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#var/using_channels">using_channels</a></th><td>Assoc list, "[channel]" = 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.</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!</td></tr><tr><th><a href="datum/controller/subsystem/sounds.html#proc/setup_available_channels">setup_available_channels</a></th><td>Sets up all available sound channels</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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L19"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 19"></a></h3><p>List of all channels as numbers</p><h3 id="var/channel_random_low"><aside class="declaration">var </aside>channel_random_low <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L23"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 23"></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 <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L25"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 25"></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 <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L11"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 11"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L21"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 21"></a></h3><p>Associative list of all reserved channels associated to their position. "[channel_number]" = index as number</p><h3 id="var/using_channels"><aside class="declaration">var </aside>using_channels <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L14"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 14"></a></h3><p>Assoc list, "[channel]" = 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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L16"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 16"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L161"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 161"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L124"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 124"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L65"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 65"></a></aside></h3><p>Frees all the channels a datum is using</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>D - The datum</li>
|
||
</ul><h3 id="proc/free_datumless_channels"><aside class="declaration">proc </aside>free_datumless_channels<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L77"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 77"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L49"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 49"></a></aside></h3><p>Removes a channel from using list</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>channel - The channel number</li>
|
||
</ul><h3 id="proc/random_available_channel"><aside class="declaration">proc </aside>random_available_channel<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L153"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 153"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L145"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 145"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L113"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 113"></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/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L100"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 100"></a></aside></h3><p>Reserves a channel for a datum. Automatic cleanup only when the datum is deleted.</p>
|
||
<p>Returns an integer for channel
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>D - The datum</li>
|
||
</ul><h3 id="proc/reserve_sound_channel_datumless"><aside class="declaration">proc </aside>reserve_sound_channel_datumless<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L85"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 85"></a></aside></h3><p>NO AUTOMATIC CLEANUP - If you use this, you better manually free it later!</p>
|
||
<p>Returns an integer for channel</p><h3 id="proc/setup_available_channels"><aside class="declaration">proc </aside>setup_available_channels<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/controllers/subsystem/non_firing/SSsounds.dm#L33"><img src="git.png" width="16" height="16" title="code/controllers/subsystem/non_firing/SSsounds.dm 33"></a></aside></h3><p>Sets up all available sound channels</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |