Files
2025-02-05 06:19:18 +00:00

6 lines
4.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>/datum/component/omen - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/component/omen.html#var">Var Details</a> - <a href="datum/component/omen.html#proc">Proc Details</a></header><main><h1>omen <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/omen.html">omen</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/omen.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/components/omen.dm 9"></a></h1><p>omen.dm: For when you want someone to have a really bad day</p>
<p>When you attach an omen component to someone, they start running the risk of all sorts of bad environmental injuries, like nearby vending machines randomly falling on you,
or hitting your head really hard when you slip and fall, or... well, for now those two are all I have. More will come.</p>
<p>Omens are removed once the victim is either maimed by one of the possible injuries, or if they receive a blessing (read: bashing with a bible) from the chaplain.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/omen.html#var/vessel">vessel</a></th><td>Whatever's causing the omen, if there is one. Destroying the vessel won't stop the omen, but we destroy the vessel (if one exists) upon the omen ending</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/omen.html#proc/check_accident">check_accident</a></th><td>check_accident() is called each step we take</td></tr><tr><th><a href="datum/component/omen.html#proc/check_bless">check_bless</a></th><td>Hijack the mood system to see if we get the blessing mood event to cancel the omen</td></tr><tr><th><a href="datum/component/omen.html#proc/check_slip">check_slip</a></th><td>If we get knocked down, see if we have a really bad slip and bash our head hard</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/vessel"><aside class="declaration">var </aside>vessel <aside> /<a href="obj.html">obj</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/omen.dm#L15"><img src="git.png" width="16" height="16" title="code/datums/components/omen.dm 15"></a></h3><p>Whatever's causing the omen, if there is one. Destroying the vessel won't stop the omen, but we destroy the vessel (if one exists) upon the omen ending</p><h2 id="proc">Proc Details</h2><h3 id="proc/check_accident"><aside class="declaration">proc </aside>check_accident<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/our_guy) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/omen.dm#L43"><img src="git.png" width="16" height="16" title="code/datums/components/omen.dm 43"></a></aside></h3><p>check_accident() is called each step we take</p>
<p>While we're walking around, roll to see if there's any environmental hazards (currently only vending machines) on one of the adjacent tiles we can trigger.
We do the prob() at the beginning to A. add some tension for /when/ it will strike, and B. (more importantly) ameliorate the fact that we're checking up to 5 turfs's contents each time</p><h3 id="proc/check_bless"><aside class="declaration">proc </aside>check_bless<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/our_guy, category) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/omen.dm#L70"><img src="git.png" width="16" height="16" title="code/datums/components/omen.dm 70"></a></aside></h3><p>Hijack the mood system to see if we get the blessing mood event to cancel the omen</p><h3 id="proc/check_slip"><aside class="declaration">proc </aside>check_slip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/our_guy, amount) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/omen.dm#L55"><img src="git.png" width="16" height="16" title="code/datums/components/omen.dm 55"></a></aside></h3><p>If we get knocked down, see if we have a really bad slip and bash our head hard</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>