mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
1 line
6.5 KiB
HTML
1 line
6.5 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/ai_target_timer - 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/component/ai_target_timer.html#var">Var Details</a> - <a href="datum/component/ai_target_timer.html#proc">Proc Details</a></header><main><h1>ai_target_timer <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/ai_target_timer.html">ai_target_timer</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L2"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 2"></a></h1><p>Increments a blackboard key while the attached mob is engaged with a particular target, does nothing else on its own</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/ai_target_timer.html#var/increment_key">increment_key</a></th><td>Blackboard key to store data inside</td></tr><tr><th><a href="datum/component/ai_target_timer.html#var/last_target">last_target</a></th><td>The last target we had</td></tr><tr><th><a href="datum/component/ai_target_timer.html#var/reset_clock_timer">reset_clock_timer</a></th><td>Timer used to see if you</td></tr><tr><th><a href="datum/component/ai_target_timer.html#var/target_key">target_key</a></th><td>Blackboard key to watch to indicate whether we are 'in combat'</td></tr><tr><th><a href="datum/component/ai_target_timer.html#var/time_on_target">time_on_target</a></th><td>Amount of time we have spent focused on one target</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/ai_target_timer.html#proc/changed_target">changed_target</a></th><td>When we get a new target, reset the timer and start processing</td></tr><tr><th><a href="datum/component/ai_target_timer.html#proc/finalise_losing_target">finalise_losing_target</a></th><td>Called if we have had no target for long enough</td></tr><tr><th><a href="datum/component/ai_target_timer.html#proc/lost_target">lost_target</a></th><td>When we lose our target, start a short timer in case we reacquire it very quickly</td></tr><tr><th><a href="datum/component/ai_target_timer.html#proc/store_current_time">store_current_time</a></th><td>Store the current time on our timer in our blackboard key</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/increment_key"><aside class="declaration">var </aside>increment_key <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L4"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 4"></a></h3><p>Blackboard key to store data inside</p><h3 id="var/last_target"><aside class="declaration">var </aside>last_target <aside>– /<a href="atom.html">atom</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L10"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 10"></a></h3><p>The last target we had</p><h3 id="var/reset_clock_timer"><aside class="declaration">var </aside>reset_clock_timer <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 12"></a></h3><p>Timer used to see if you</p><h3 id="var/target_key"><aside class="declaration">var </aside>target_key <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L6"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 6"></a></h3><p>Blackboard key to watch to indicate whether we are 'in combat'</p><h3 id="var/time_on_target"><aside class="declaration">var </aside>time_on_target <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L8"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 8"></a></h3><p>Amount of time we have spent focused on one target</p><h2 id="proc">Proc Details</h2><h3 id="proc/changed_target"><aside class="declaration">proc </aside>changed_target<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L41"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 41"></a></aside></h3><p>When we get a new target, reset the timer and start processing</p><h3 id="proc/finalise_losing_target"><aside class="declaration">proc </aside>finalise_losing_target<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L62"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 62"></a></aside></h3><p>Called if we have had no target for long enough</p><h3 id="proc/lost_target"><aside class="declaration">proc </aside>lost_target<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L57"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 57"></a></aside></h3><p>When we lose our target, start a short timer in case we reacquire it very quickly</p><h3 id="proc/store_current_time"><aside class="declaration">proc </aside>store_current_time<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/ai_has_target_timer.dm#L73"><img src="git.png" width="16" height="16" title="code/datums/components/ai_has_target_timer.dm 73"></a></aside></h3><p>Store the current time on our timer in our blackboard key</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> |