mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
12 lines
14 KiB
HTML
12 lines
14 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/objective - 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.html#var">Var Details</a> - <a href="datum/objective.html#proc">Proc Details</a></header><main><h1>objective <aside>/<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.dm#L11"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 11"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/objective.html#var/completed">completed</a></th><td>If the objective has been completed.</td></tr><tr><th><a href="datum/objective.html#var/delayed_objective_text">delayed_objective_text</a></th><td>What is the text we show when our objective is delayed?</td></tr><tr><th><a href="datum/objective.html#var/explanation_text">explanation_text</a></th><td>What the owner is supposed to do to complete the objective.</td></tr><tr><th><a href="datum/objective.html#var/flags_target">flags_target</a></th><td>Contains the flags needed to meet the conditions of a valid target, such as mindshielded or syndicate agent.</td></tr><tr><th><a href="datum/objective.html#var/martyr_compatible">martyr_compatible</a></th><td>If the objective is compatible with martyr objective, i.e. if you can still do it while dead.</td></tr><tr><th><a href="datum/objective.html#var/name">name</a></th><td>Proper name of the objective. Not player facing, only shown to admins when adding objectives.
|
||
Leave as null (or override to null) if you don't want admins to see that objective as a viable one to add (such as the mindslave objective).</td></tr><tr><th><a href="datum/objective.html#var/needs_pair">needs_pair</a></th><td>If the objective needs another person with a paired objective</td></tr><tr><th><a href="datum/objective.html#var/needs_target">needs_target</a></th><td>If the objective should have <code>find_target()</code> called for it.</td></tr><tr><th><a href="datum/objective.html#var/owner">owner</a></th><td>Owner of the objective.
|
||
Note that it's fine to set this directly, but when needing to check completion of the objective or otherwise check conditions on the owner of the objective,
|
||
always use <code>get_owners()</code>, and check against ALL the owners. <code>get_owners()</code> accounts for objectives that may be team based and therefore have multiple owners.</td></tr><tr><th><a href="datum/objective.html#var/steal_list">steal_list</a></th><td>If set, steal targets will be pulled from this list</td></tr><tr><th><a href="datum/objective.html#var/target">target</a></th><td>The target of the objective.</td></tr><tr><th><a href="datum/objective.html#var/target_amount">target_amount</a></th><td>If they are focused on a particular number. Steal objectives have their own counter.</td></tr><tr><th><a href="datum/objective.html#var/target_department">target_department</a></th><td>The department that'll be targeted by this objective. If set, fills target_jobs with jobs from that department.</td></tr><tr><th><a href="datum/objective.html#var/target_jobs">target_jobs</a></th><td>List of jobs that the objective will target if possible, any crew if not.</td></tr><tr><th><a href="datum/objective.html#var/team">team</a></th><td>The team the objective belongs to, if any.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/objective.html#proc/establish_signals">establish_signals</a></th><td>This is for objectives that need to register signals, so place them in here.</td></tr><tr><th><a href="datum/objective.html#proc/find_assassination_objectives_for_target">find_assassination_objectives_for_target</a></th><td>Helper proc to find assassinate/assassinateonce objectives targeting the same mind as this objective.
|
||
Returns a list of assassination objectives.</td></tr><tr><th><a href="datum/objective.html#proc/find_protect_objectives_for_target">find_protect_objectives_for_target</a></th><td>Helper proc to find protect objectives targeting the same mind as this objective.
|
||
Returns a list of protect objectives.</td></tr><tr><th><a href="datum/objective.html#proc/get_owners">get_owners</a></th><td>Get all owners of the objective, including ones from the objective's team, if it has one.</td></tr><tr><th><a href="datum/objective.html#proc/on_target_cryo">on_target_cryo</a></th><td>Called when the objective's target goes to cryo.</td></tr><tr><th><a href="datum/objective.html#proc/update_explanation_text">update_explanation_text</a></th><td>This is for objectives that have reason to update their text, such as target changes.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/completed"><aside class="declaration">var </aside>completed <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L34"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 34"></a></h3><p>If the objective has been completed.</p><h3 id="var/delayed_objective_text"><aside class="declaration">var </aside>delayed_objective_text <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L48"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 48"></a></h3><p>What is the text we show when our objective is delayed?</p><h3 id="var/explanation_text"><aside class="declaration">var </aside>explanation_text <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L28"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 28"></a></h3><p>What the owner is supposed to do to complete the objective.</p><h3 id="var/flags_target"><aside class="declaration">var </aside>flags_target <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L44"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 44"></a></h3><p>Contains the flags needed to meet the conditions of a valid target, such as mindshielded or syndicate agent.</p><h3 id="var/martyr_compatible"><aside class="declaration">var </aside>martyr_compatible <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L36"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 36"></a></h3><p>If the objective is compatible with martyr objective, i.e. if you can still do it while dead.</p><h3 id="var/name"><aside class="declaration">var </aside>name <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L16"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 16"></a></h3><p>Proper name of the objective. Not player facing, only shown to admins when adding objectives.
|
||
Leave as null (or override to null) if you don't want admins to see that objective as a viable one to add (such as the mindslave objective).</p><h3 id="var/needs_pair"><aside class="declaration">var </aside>needs_pair <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L50"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 50"></a></h3><p>If the objective needs another person with a paired objective</p><h3 id="var/needs_target"><aside class="declaration">var </aside>needs_target <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L30"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 30"></a></h3><p>If the objective should have <code>find_target()</code> called for it.</p><h3 id="var/owner"><aside class="declaration">var </aside>owner <aside>– /<a href="datum.html">datum</a>/<a href="datum/mind.html">mind</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L22"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 22"></a></h3><p>Owner of the objective.
|
||
Note that it's fine to set this directly, but when needing to check completion of the objective or otherwise check conditions on the owner of the objective,
|
||
always use <code>get_owners()</code>, and check against ALL the owners. <code>get_owners()</code> accounts for objectives that may be team based and therefore have multiple owners.</p><h3 id="var/steal_list"><aside class="declaration">var </aside>steal_list <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L42"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 42"></a></h3><p>If set, steal targets will be pulled from this list</p><h3 id="var/target"><aside class="declaration">var </aside>target <aside>– /<a href="datum.html">datum</a>/<a href="datum/mind.html">mind</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L24"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 24"></a></h3><p>The target of the objective.</p><h3 id="var/target_amount"><aside class="declaration">var </aside>target_amount <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L32"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 32"></a></h3><p>If they are focused on a particular number. Steal objectives have their own counter.</p><h3 id="var/target_department"><aside class="declaration">var </aside>target_department <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L40"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 40"></a></h3><p>The department that'll be targeted by this objective. If set, fills target_jobs with jobs from that department.</p><h3 id="var/target_jobs"><aside class="declaration">var </aside>target_jobs <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L38"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 38"></a></h3><p>List of jobs that the objective will target if possible, any crew if not.</p><h3 id="var/team"><aside class="declaration">var </aside>team <aside>– /<a href="datum.html">datum</a>/<a href="datum/team.html">team</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L26"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 26"></a></h3><p>The team the objective belongs to, if any.</p><h2 id="proc">Proc Details</h2><h3 id="proc/establish_signals"><aside class="declaration">proc </aside>establish_signals<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L85"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 85"></a></aside></h3><p>This is for objectives that need to register signals, so place them in here.</p><h3 id="proc/find_assassination_objectives_for_target"><aside class="declaration">proc </aside>find_assassination_objectives_for_target<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L122"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 122"></a></aside></h3><p>Helper proc to find assassinate/assassinateonce objectives targeting the same mind as this objective.
|
||
Returns a list of assassination objectives.</p><h3 id="proc/find_protect_objectives_for_target"><aside class="declaration">proc </aside>find_protect_objectives_for_target<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L108"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 108"></a></aside></h3><p>Helper proc to find protect objectives targeting the same mind as this objective.
|
||
Returns a list of protect objectives.</p><h3 id="proc/get_owners"><aside class="declaration">proc </aside>get_owners<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L99"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 99"></a></aside></h3><p>Get all owners of the objective, including ones from the objective's team, if it has one.</p>
|
||
<p>Use this over directly referencing <code>owner</code> in most cases.</p><h3 id="proc/on_target_cryo"><aside class="declaration">proc </aside>on_target_cryo<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L240"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 240"></a></aside></h3><p>Called when the objective's target goes to cryo.</p><h3 id="proc/update_explanation_text"><aside class="declaration">proc </aside>update_explanation_text<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/gamemodes/objective.dm#L91"><img src="git.png" width="16" height="16" title="code/game/gamemodes/objective.dm 91"></a></aside></h3><p>This is for objectives that have reason to update their text, such as target changes.</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> |