Files
Paradise/obj/effect/spawner/grouped_spawner.html

9 lines
8.7 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>/obj/effect/spawner/grouped_spawner - 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="obj/effect/spawner/grouped_spawner.html#var">Var Details</a> - <a href="obj/effect/spawner/grouped_spawner.html#proc">Proc Details</a></header><main><h1>grouped_spawner <aside>/<a href="obj.html">obj</a>/<a href="obj/effect/spawner.html">effect/spawner</a>/<a href="obj/effect/spawner/grouped_spawner.html">grouped_spawner</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L14"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 14"></a></h1><p>Can be used to group spawners together so you ensure a certain amount of things are spawned but can be spawned on multiple locations.</p>
<p>How to use:
Either place the base grouped_spawner in the map and define the group_id to
determine which spawners belong to one another.
Or make a child instance of the grouped_spawner and define the values there.</p>
<p>When using the base version be sure to define both total_amount and max_per_spawner on
at least one of the spawners of the group.
A mismatch between instances of the same group between these values will lead to a runtime.
So either leave it empty for the rest or have the rest have the same values</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/chosen_spawners">chosen_spawners</a></th><td>Which spawners are chosen to spawn the objects</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/group_id">group_id</a></th><td>The id of the group this spawner belongs to. If left empty it'll use the type as id. Define this for map instances if you want to link different spawners up or want to use the base version.</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/max_per_spawner">max_per_spawner</a></th><td>How many will spawn maximum per spawner. Set this in the map edit tool or in a child instance to set it for all the other instances.</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/max_per_spawner_for_spawners">max_per_spawner_for_spawners</a></th><td>The list which holds the max_per_spawner values for each spawner group</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/path_to_spawn">path_to_spawn</a></th><td>Which path will be used to spawn.</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/spawner_groups">spawner_groups</a></th><td>The assoc list of grouped spawners. Key = group_id, value = list of spawners with that key</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/total_amount">total_amount</a></th><td>How many will spawn. Set this in the map edit tool or in a child instance to set it for all the other instances.</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#var/total_amount_for_spawners">total_amount_for_spawners</a></th><td>The list which holds the total_amount values for each spawner group</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#proc/get_spawn_values">get_spawn_values</a></th><td>Sets the spawn values to the values of the first defined instance of this group_id</td></tr><tr><th><a href="obj/effect/spawner/grouped_spawner.html#proc/save_spawn_values">save_spawn_values</a></th><td>Saves the spawn values. Will only pick the first defined version of this group_id</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/chosen_spawners"><aside class="declaration">var </aside>chosen_spawners <aside> /static/list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L30"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 30"></a></h3><p>Which spawners are chosen to spawn the objects</p><h3 id="var/group_id"><aside class="declaration">var </aside>group_id <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L25"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 25"></a></h3><p>The id of the group this spawner belongs to. If left empty it'll use the type as id. Define this for map instances if you want to link different spawners up or want to use the base version.</p><h3 id="var/max_per_spawner"><aside class="declaration">var </aside>max_per_spawner <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L23"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 23"></a></h3><p>How many will spawn maximum per spawner. Set this in the map edit tool or in a child instance to set it for all the other instances.</p><h3 id="var/max_per_spawner_for_spawners"><aside class="declaration">var </aside>max_per_spawner_for_spawners <aside> /static/list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L34"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 34"></a></h3><p>The list which holds the max_per_spawner values for each spawner group</p><h3 id="var/path_to_spawn"><aside class="declaration">var </aside>path_to_spawn <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L19"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 19"></a></h3><p>Which path will be used to spawn.</p><h3 id="var/spawner_groups"><aside class="declaration">var </aside>spawner_groups <aside> /static/list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L28"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 28"></a></h3><p>The assoc list of grouped spawners. Key = group_id, value = list of spawners with that key</p><h3 id="var/total_amount"><aside class="declaration">var </aside>total_amount <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L21"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 21"></a></h3><p>How many will spawn. Set this in the map edit tool or in a child instance to set it for all the other instances.</p><h3 id="var/total_amount_for_spawners"><aside class="declaration">var </aside>total_amount_for_spawners <aside> /static/list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L32"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 32"></a></h3><p>The list which holds the total_amount values for each spawner group</p><h2 id="proc">Proc Details</h2><h3 id="proc/get_spawn_values"><aside class="declaration">proc </aside>get_spawn_values<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L99"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 99"></a></aside></h3><p>Sets the spawn values to the values of the first defined instance of this group_id</p><h3 id="proc/save_spawn_values"><aside class="declaration">proc </aside>save_spawn_values<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/grouped_spawner.dm#L84"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/grouped_spawner.dm 84"></a></aside></h3><p>Saves the spawn values. Will only pick the first defined version of this group_id</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>