mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
10 lines
12 KiB
HTML
10 lines
12 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/objective_holder - 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/objective_holder.html#var">Var Details</a> - <a href="datum/objective_holder.html#proc">Proc Details</a></header><main><h1>objective_holder <aside>/<a href="datum.html">datum</a>/<a href="datum/objective_holder.html">objective_holder</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L5"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 5"></a></h1><p>An objective holder for minds, antag datums, and teams.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/objective_holder.html#var/assigned_targets">assigned_targets</a></th><td>A list of strings which contain <a href="datum/objective.html#var/target" title="/datum/objective">targets</a> of the antagonist's objectives. Used to prevent duplicate objectives.</td></tr><tr><th><a href="datum/objective_holder.html#var/objective_owner">objective_owner</a></th><td>Who do we belong to [mind, antagonist, team]</td></tr><tr><th><a href="datum/objective_holder.html#var/objectives">objectives</a></th><td>Our list of current objectives</td></tr><tr><th><a href="datum/objective_holder.html#var/on_add_callback">on_add_callback</a></th><td>A callback invoked when a new objective is added. This is required because sometimes objectives are added directly without going through objective_owner. Not currently used.</td></tr><tr><th><a href="datum/objective_holder.html#var/on_remove_callback">on_remove_callback</a></th><td>A callback invoked when a new objective is added. This is required because sometimes objectives are removed directly without going through objective_owner (EX: replace_objective(), clear()). Not currently used.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/objective_holder.html#proc/add_objective">add_objective</a></th><td>Add an objective.</td></tr><tr><th><a href="datum/objective_holder.html#proc/clear">clear</a></th><td>Clear all objectives of a certain type</td></tr><tr><th><a href="datum/objective_holder.html#proc/get_holder_owner">get_holder_owner</a></th><td>Returns <code>objective_owner</code></td></tr><tr><th><a href="datum/objective_holder.html#proc/get_objectives">get_objectives</a></th><td>Get all of the objectives we own</td></tr><tr><th><a href="datum/objective_holder.html#proc/get_targets">get_targets</a></th><td>Get all of our targets</td></tr><tr><th><a href="datum/objective_holder.html#proc/handle_objective">handle_objective</a></th><td>Handles the searching of targets for objectives that need it.</td></tr><tr><th><a href="datum/objective_holder.html#proc/has_objectives">has_objectives</a></th><td>Do we have any objectives</td></tr><tr><th><a href="datum/objective_holder.html#proc/remove_objective">remove_objective</a></th><td>Remove an objective and deletes it. You should never need to transfer an objective.</td></tr><tr><th><a href="datum/objective_holder.html#proc/replace_objective">replace_objective</a></th><td>Replace old_objective with new_objective</td></tr><tr><th><a href="datum/objective_holder.html#proc/set_callbacks">set_callbacks</a></th><td>Sets the callbacks, not on new because that can be irreliable for subtypes.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/assigned_targets"><aside class="declaration">var </aside>assigned_targets <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L11"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 11"></a></h3><p>A list of strings which contain <a href="datum/objective.html#var/target" title="/datum/objective">targets</a> of the antagonist's objectives. Used to prevent duplicate objectives.</p><h3 id="var/objective_owner"><aside class="declaration">var </aside>objective_owner <aside>– /<a href="datum.html">datum</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L9"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 9"></a></h3><p>Who do we belong to [mind, antagonist, team]</p><h3 id="var/objectives"><aside class="declaration">var </aside>objectives <aside>– /list/<a href="datum.html">datum</a>/<a href="datum/objective.html">objective</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L7"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 7"></a></h3><p>Our list of current objectives</p><h3 id="var/on_add_callback"><aside class="declaration">var </aside>on_add_callback <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L13"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 13"></a></h3><p>A callback invoked when a new objective is added. This is required because sometimes objectives are added directly without going through objective_owner. Not currently used.</p><h3 id="var/on_remove_callback"><aside class="declaration">var </aside>on_remove_callback <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L15"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 15"></a></h3><p>A callback invoked when a new objective is added. This is required because sometimes objectives are removed directly without going through objective_owner (EX: replace_objective(), clear()). Not currently used.</p><h2 id="proc">Proc Details</h2><h3 id="proc/add_objective"><aside class="declaration">proc </aside>add_objective<aside>(/<a href="datum.html">datum</a>/<a href="datum/objective.html">objective</a>/Objective, _explanation_text, /<a href="mob.html">mob</a>/target_override, add_to_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L86"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 86"></a></aside></h3><p>Add an objective.</p>
|
||
<ul>
|
||
<li>Objective - The objective to add <a href="datum.html" title="/datum">/datum/objective, path</a></li>
|
||
<li>_explanation_text - Optional, will assign this text to the objective</li>
|
||
<li>target_override - A target override, will prevent finding a target</li>
|
||
<li>add_to_list - Do we add the new objective to our list? Or will it be handled elsewhere (like replace_objective). Should not be set to false outside of this file.</li>
|
||
</ul><h3 id="proc/clear"><aside class="declaration">proc </aside>clear<aside>(check_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L32"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 32"></a></aside></h3><p>Clear all objectives of a certain type</p>
|
||
<ul>
|
||
<li>checktype - The type to check, if null, remoe all objectives.</li>
|
||
</ul><h3 id="proc/get_holder_owner"><aside class="declaration">proc </aside>get_holder_owner<aside>() <span class="as"> as </span>/<a href="datum.html">datum</a> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L138"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 138"></a></aside></h3><p>Returns <code>objective_owner</code></p><h3 id="proc/get_objectives"><aside class="declaration">proc </aside>get_objectives<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L55"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 55"></a></aside></h3><p>Get all of the objectives we own</p><h3 id="proc/get_targets"><aside class="declaration">proc </aside>get_targets<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L61"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 61"></a></aside></h3><p>Get all of our targets</p><h3 id="proc/handle_objective"><aside class="declaration">proc </aside>handle_objective<aside>(/<a href="datum.html">datum</a>/<a href="datum/objective.html">objective</a>/Objective) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L114"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 114"></a></aside></h3><p>Handles the searching of targets for objectives that need it.</p><h3 id="proc/has_objectives"><aside class="declaration">proc </aside>has_objectives<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L49"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 49"></a></aside></h3><p>Do we have any objectives</p><h3 id="proc/remove_objective"><aside class="declaration">proc </aside>remove_objective<aside>(/<a href="datum.html">datum</a>/<a href="datum/objective.html">objective</a>/Objective) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L127"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 127"></a></aside></h3><p>Remove an objective and deletes it. You should never need to transfer an objective.</p><h3 id="proc/replace_objective"><aside class="declaration">proc </aside>replace_objective<aside>(/<a href="datum.html">datum</a>/<a href="datum/objective.html">objective</a>/old_objective, /<a href="datum.html">datum</a>/<a href="datum/objective.html">objective</a>/new_objective, /<a href="datum.html">datum</a>/original_target_department, /list/original_steal_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L67"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 67"></a></aside></h3><p>Replace old_objective with new_objective</p><h3 id="proc/set_callbacks"><aside class="declaration">proc </aside>set_callbacks<aside>(_on_add_callback, _on_remove_callback) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective_holder.dm#L42"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective_holder.dm 42"></a></aside></h3><p>Sets the callbacks, not on new because that can be irreliable for subtypes.</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> |