Files
GS13NG/datum/weather.html
2025-02-05 06:19:18 +00:00

12 lines
22 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/weather - /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/weather.html#var">Var Details</a> - <a href="datum/weather.html#proc">Proc Details</a></header><main><h1>weather <aside>/<a href="datum.html">datum</a>/<a href="datum/weather.html">weather</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L10"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 10"></a></h1><p>Causes weather to occur on a z level in certain area types</p>
<p>The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
Weather always occurs on different z levels at different times, regardless of weather type.
Can have custom durations, targets, and can automatically protect indoor areas.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/weather.html#var/aesthetic">aesthetic</a></th><td>If the weather has no purpose but aesthetics.</td></tr><tr><th><a href="datum/weather.html#var/area_type">area_type</a></th><td>Types of area to affect</td></tr><tr><th><a href="datum/weather.html#var/barometer_predictable">barometer_predictable</a></th><td>Whether a barometer can predict when the weather will happen</td></tr><tr><th><a href="datum/weather.html#var/desc">desc</a></th><td>description of weather</td></tr><tr><th><a href="datum/weather.html#var/end_duration">end_duration</a></th><td>In deciseconds, how long the &quot;wind-down&quot; graphic will appear before vanishing entirely</td></tr><tr><th><a href="datum/weather.html#var/end_message">end_message</a></th><td>Displayed once the weather is over</td></tr><tr><th><a href="datum/weather.html#var/end_overlay">end_overlay</a></th><td>Area overlay while weather is ending</td></tr><tr><th><a href="datum/weather.html#var/end_sound">end_sound</a></th><td>Sound that plays while weather is ending</td></tr><tr><th><a href="datum/weather.html#var/immunity_type">immunity_type</a></th><td>Used by mobs (or movables containing mobs, such as enviro bags) to prevent them from being affected by the weather.</td></tr><tr><th><a href="datum/weather.html#var/impacted_areas">impacted_areas</a></th><td>Areas to be affected by the weather, calculated when the weather begins</td></tr><tr><th><a href="datum/weather.html#var/impacted_z_levels">impacted_z_levels</a></th><td>The list of z-levels that this weather is actively affecting</td></tr><tr><th><a href="datum/weather.html#var/name">name</a></th><td>name of weather</td></tr><tr><th><a href="datum/weather.html#var/next_hit_time">next_hit_time</a></th><td>For barometers to know when the next storm will hit</td></tr><tr><th><a href="datum/weather.html#var/overlay_layer">overlay_layer</a></th><td>Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.</td></tr><tr><th><a href="datum/weather.html#var/overlay_plane">overlay_plane</a></th><td>Plane for the overlay</td></tr><tr><th><a href="datum/weather.html#var/perpetual">perpetual</a></th><td>This causes the weather to only end if forced to</td></tr><tr><th><a href="datum/weather.html#var/probability">probability</a></th><td>Weight amongst other eligible weather. if zero, will never happen randomly.</td></tr><tr><th><a href="datum/weather.html#var/protect_indoors">protect_indoors</a></th><td>TRUE value protects areas with outdoors marked as false, regardless of area type</td></tr><tr><th><a href="datum/weather.html#var/protected_areas">protected_areas</a></th><td>Areas that are protected and excluded from the affected areas.</td></tr><tr><th><a href="datum/weather.html#var/stage">stage</a></th><td>The stage of the weather, from 1-4</td></tr><tr><th><a href="datum/weather.html#var/target_trait">target_trait</a></th><td>The z-level trait to affect when run randomly or when not overridden.</td></tr><tr><th><a href="datum/weather.html#var/telegraph_duration">telegraph_duration</a></th><td>In deciseconds, how long from the beginning of the telegraph until the weather begins</td></tr><tr><th><a href="datum/weather.html#var/telegraph_message">telegraph_message</a></th><td>The message displayed in chat to foreshadow the weather's beginning</td></tr><tr><th><a href="datum/weather.html#var/telegraph_overlay">telegraph_overlay</a></th><td>The overlay applied to all tiles on the z-level</td></tr><tr><th><a href="datum/weather.html#var/telegraph_sound">telegraph_sound</a></th><td>The sound file played to everyone on an affected z-level</td></tr><tr><th><a href="datum/weather.html#var/weather_color">weather_color</a></th><td>Color to apply to the area while weather is occuring</td></tr><tr><th><a href="datum/weather.html#var/weather_duration">weather_duration</a></th><td>In deciseconds, how long the weather lasts once it begins</td></tr><tr><th><a href="datum/weather.html#var/weather_duration_lower">weather_duration_lower</a></th><td>See above - this is the lowest possible duration</td></tr><tr><th><a href="datum/weather.html#var/weather_duration_upper">weather_duration_upper</a></th><td>See above - this is the highest possible duration</td></tr><tr><th><a href="datum/weather.html#var/weather_message">weather_message</a></th><td>Displayed in chat once the weather begins in earnest</td></tr><tr><th><a href="datum/weather.html#var/weather_overlay">weather_overlay</a></th><td>Area overlay while the weather is occuring</td></tr><tr><th><a href="datum/weather.html#var/weather_sound">weather_sound</a></th><td>Looping sound while weather is occuring</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/weather.html#proc/can_weather_act">can_weather_act</a></th><td>Returns TRUE if the living mob can be affected by the weather</td></tr><tr><th><a href="datum/weather.html#proc/end">end</a></th><td>Fully ends the weather</td></tr><tr><th><a href="datum/weather.html#proc/start">start</a></th><td>Starts the actual weather and effects from it</td></tr><tr><th><a href="datum/weather.html#proc/telegraph">telegraph</a></th><td>Telegraphs the beginning of the weather on the impacted z levels</td></tr><tr><th><a href="datum/weather.html#proc/update_areas">update_areas</a></th><td>Updates the overlays on impacted areas</td></tr><tr><th><a href="datum/weather.html#proc/weather_act">weather_act</a></th><td>Affects the mob with whatever the weather does</td></tr><tr><th><a href="datum/weather.html#proc/wind_down">wind_down</a></th><td>Weather enters the winding down phase, stops effects</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/aesthetic"><aside class="declaration">var </aside>aesthetic <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L66"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 66"></a></h3><p>If the weather has no purpose but aesthetics.</p><h3 id="var/area_type"><aside class="declaration">var </aside>area_type <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L50"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 50"></a></h3><p>Types of area to affect</p><h3 id="var/barometer_predictable"><aside class="declaration">var </aside>barometer_predictable <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L79"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 79"></a></h3><p>Whether a barometer can predict when the weather will happen</p><h3 id="var/desc"><aside class="declaration">var </aside>desc <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 14"></a></h3><p>description of weather</p><h3 id="var/end_duration"><aside class="declaration">var </aside>end_duration <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L43"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 43"></a></h3><p>In deciseconds, how long the &quot;wind-down&quot; graphic will appear before vanishing entirely</p><h3 id="var/end_message"><aside class="declaration">var </aside>end_message <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L41"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 41"></a></h3><p>Displayed once the weather is over</p><h3 id="var/end_overlay"><aside class="declaration">var </aside>end_overlay <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L47"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 47"></a></h3><p>Area overlay while weather is ending</p><h3 id="var/end_sound"><aside class="declaration">var </aside>end_sound <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L45"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 45"></a></h3><p>Sound that plays while weather is ending</p><h3 id="var/immunity_type"><aside class="declaration">var </aside>immunity_type <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L68"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 68"></a></h3><p>Used by mobs (or movables containing mobs, such as enviro bags) to prevent them from being affected by the weather.</p><h3 id="var/impacted_areas"><aside class="declaration">var </aside>impacted_areas <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L54"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 54"></a></h3><p>Areas to be affected by the weather, calculated when the weather begins</p><h3 id="var/impacted_z_levels"><aside class="declaration">var </aside>impacted_z_levels <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L59"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 59"></a></h3><p>The list of z-levels that this weather is actively affecting</p><h3 id="var/name"><aside class="declaration">var </aside>name <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 12"></a></h3><p>name of weather</p><h3 id="var/next_hit_time"><aside class="declaration">var </aside>next_hit_time <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L81"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 81"></a></h3><p>For barometers to know when the next storm will hit</p><h3 id="var/overlay_layer"><aside class="declaration">var </aside>overlay_layer <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L62"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 62"></a></h3><p>Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.</p><h3 id="var/overlay_plane"><aside class="declaration">var </aside>overlay_plane <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L64"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 64"></a></h3><p>Plane for the overlay</p><h3 id="var/perpetual"><aside class="declaration">var </aside>perpetual <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L83"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 83"></a></h3><p>This causes the weather to only end if forced to</p><h3 id="var/probability"><aside class="declaration">var </aside>probability <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L74"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 74"></a></h3><p>Weight amongst other eligible weather. if zero, will never happen randomly.</p><h3 id="var/protect_indoors"><aside class="declaration">var </aside>protect_indoors <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L52"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 52"></a></h3><p>TRUE value protects areas with outdoors marked as false, regardless of area type</p><h3 id="var/protected_areas"><aside class="declaration">var </aside>protected_areas <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L57"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 57"></a></h3><p>Areas that are protected and excluded from the affected areas.</p><h3 id="var/stage"><aside class="declaration">var </aside>stage <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L71"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 71"></a></h3><p>The stage of the weather, from 1-4</p><h3 id="var/target_trait"><aside class="declaration">var </aside>target_trait <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L76"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 76"></a></h3><p>The z-level trait to affect when run randomly or when not overridden.</p><h3 id="var/telegraph_duration"><aside class="declaration">var </aside>telegraph_duration <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L20"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 20"></a></h3><p>In deciseconds, how long from the beginning of the telegraph until the weather begins</p><h3 id="var/telegraph_message"><aside class="declaration">var </aside>telegraph_message <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L17"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 17"></a></h3><p>The message displayed in chat to foreshadow the weather's beginning</p><h3 id="var/telegraph_overlay"><aside class="declaration">var </aside>telegraph_overlay <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L24"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 24"></a></h3><p>The overlay applied to all tiles on the z-level</p><h3 id="var/telegraph_sound"><aside class="declaration">var </aside>telegraph_sound <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L22"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 22"></a></h3><p>The sound file played to everyone on an affected z-level</p><h3 id="var/weather_color"><aside class="declaration">var </aside>weather_color <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L38"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 38"></a></h3><p>Color to apply to the area while weather is occuring</p><h3 id="var/weather_duration"><aside class="declaration">var </aside>weather_duration <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L28"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 28"></a></h3><p>In deciseconds, how long the weather lasts once it begins</p><h3 id="var/weather_duration_lower"><aside class="declaration">var </aside>weather_duration_lower <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L30"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 30"></a></h3><p>See above - this is the lowest possible duration</p><h3 id="var/weather_duration_upper"><aside class="declaration">var </aside>weather_duration_upper <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L32"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 32"></a></h3><p>See above - this is the highest possible duration</p><h3 id="var/weather_message"><aside class="declaration">var </aside>weather_message <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L26"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 26"></a></h3><p>Displayed in chat once the weather begins in earnest</p><h3 id="var/weather_overlay"><aside class="declaration">var </aside>weather_overlay <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L36"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 36"></a></h3><p>Area overlay while the weather is occuring</p><h3 id="var/weather_sound"><aside class="declaration">var </aside>weather_sound <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L34"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 34"></a></h3><p>Looping sound while weather is occuring</p><h2 id="proc">Proc Details</h2><h3 id="proc/can_weather_act"><aside class="declaration">proc </aside>can_weather_act<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/mob_to_check) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L198"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 198"></a></aside></h3><p>Returns TRUE if the living mob can be affected by the weather</p><h3 id="proc/end"><aside class="declaration">proc </aside>end<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L179"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 179"></a></aside></h3><p>Fully ends the weather</p>
<p>Effects no longer occur and area overlays are removed
Removes weather from processing completely</p><h3 id="proc/start"><aside class="declaration">proc </aside>start<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L133"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 133"></a></aside></h3><p>Starts the actual weather and effects from it</p>
<p>Updates area overlays and sends sounds and messages to mobs to notify them
Begins dealing effects from weather to mobs in the area</p><h3 id="proc/telegraph"><aside class="declaration">proc </aside>telegraph<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L96"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 96"></a></aside></h3><p>Telegraphs the beginning of the weather on the impacted z levels</p>
<p>Sends sounds and details to mobs in the area
Calculates duration and hit areas, and makes a callback for the actual weather to start</p><h3 id="proc/update_areas"><aside class="declaration">proc </aside>update_areas<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L235"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 235"></a></aside></h3><p>Updates the overlays on impacted areas</p><h3 id="proc/weather_act"><aside class="declaration">proc </aside>weather_act<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/L) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L225"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 225"></a></aside></h3><p>Affects the mob with whatever the weather does</p><h3 id="proc/wind_down"><aside class="declaration">proc </aside>wind_down<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/weather/weather.dm#L158"><img src="git.png" width="16" height="16" title="code/datums/weather/weather.dm 158"></a></aside></h3><p>Weather enters the winding down phase, stops effects</p>
<p>Updates areas to be in the winding down phase
Sends sounds and messages to mobs to notify them</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>