/tg/ Station 13 - Modules - TypesVar Details - Proc Details

weather

Causes weather to occur on a z level in certain area types

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.

Vars

area_typeTypes of area to affect
blacklist_weather_reagentsA list of reagents that are forbidden from being selected when there is no whitelist and the reagents are randomized
current_mobsList of current mobs being processed by weather
currentpartThe current section our weather subsystem is processing
descdescription of weather
end_durationHow long the "wind-down" graphic will appear before vanishing entirely
end_messageDisplayed once the weather is over
end_overlayArea overlay while weather is ending
end_soundSound that plays while weather is ending
end_sound_volVolume of the sound that plays while weather is ending
immunity_typeUsed by mobs (or movables containing mobs, such as enviro bags) to prevent them from being affected by the weather.
impacted_areasAreas to be affected by the weather, calculated when the weather begins
impacted_areas_blend_modesAreas affected by weather have their blend modes changed
impacted_areas_weightedA weighted list of areas impacted by weather, where weights reflect the total turf count in each area.
impacted_z_levelsThe list of z-levels that this weather is actively affecting
impacted_z_levels_weightedA weighted list of z-levels impacted by weather, where weights reflect the total turf count on each level
namename of weather
next_hit_timeFor barometers to know when the next storm will hit
overlay_cacheList of all overlays to apply to our turfs
overlay_layerSince it's above everything else, this is the layer used by default.
overlay_planePlane for the overlay
probabilityWeight amongst other eligible weather. If zero, will never happen randomly.
protected_areasAreas that are protected and excluded from the affected areas.
stageThe stage of the weather, from 1-4
subsystem_tasksThe list of allowed tasks our weather subsystem is allowed to process (determined by weather_flags)
target_traitThe z-level trait to affect when run randomly or when not overridden.
telegraph_durationHow long from the beginning of the telegraph until the weather begins
telegraph_messageThe message displayed in chat to foreshadow the weather's beginning
telegraph_overlayThe overlay applied to all tiles on the z-level
telegraph_soundThe sound file played to everyone on an affected z-level
telegraph_sound_volVolume of the telegraph sound
thunder_colorColor to apply to thunder while weather is occuring
thunder_iterationThe weather thunder counter to keep track of how much thunder we have processed so far
thunder_turfs_per_tickThe calculated amount of turfs that get thunder effects processed each tick (this gets calculated do not manually set this var)
total_impacted_turfsThe total number of turfs impacted by weather across all z-levels and areas.
turf_iterationThe weather turf counter to keep track of how many turfs we have processed so far
turf_thunder_chanceThe chance, per tick, a turf will have a thunder strike applied to it. This is a decimal value, 1.00 = 100%, 0.50 = 50%, etc. Recommend setting this really low near 0.001 (results in 1 in 1000 affected turfs having thunder strikes applied per tick)
turf_weather_chanceThe chance, per tick, a turf will have weather effects applied to it. This is a decimal value, 1.00 = 100%, 0.50 = 50%, etc. Recommend setting this low near 0.01 (results in 1 in 100 affected turfs having weather reagents applied per tick)
use_glowIf this bit of weather should also draw an overlay that's uneffected by lighting onto the area Taken from weather_glow.dmi
weather_colorColor to apply to the area while weather is occuring
weather_durationHow long the weather lasts once it begins
weather_duration_lowerSee above - this is the lowest possible duration
weather_duration_upperSee above - this is the highest possible duration
weather_flagsList of weather bitflags that determines effects (see \code__DEFINES\weather.dm)
weather_messageDisplayed in chat once the weather begins in earnest
weather_overlayArea overlay while the weather is occuring
weather_reagentThe selected reagent that will be rained down
weather_reagent_holderThe actual atom that holds our reagents that is held in nullspace
weather_soundThe sound played to everyone on an affected z-level when weather is occuring (does not loop)
weather_temperatureThe temperature of our weather that is applied to weather reagents and mobs using adjust_bodytemperature()
weather_turfs_per_tickThe calculated amount of turfs that get weather effects processed each tick (this gets calculated do not manually set this var)
whitelist_weather_reagentsA list (supports regular, nested, and weighted) of possible reagents that will rain down from the sky. Only one of these will be selected to be used as the reagent

Procs

can_weather_act_mobReturns TRUE if the living mob can be affected by the weather
can_weather_act_turfReturns TRUE if the turf can be affected by the weather
endFully ends the weather
generate_overlay_cacheReturns a list of visual offset -> overlays to use
pick_turfSelects a turf impacted by weather, if available, otherwise returns null
startStarts the actual weather and effects from it
telegraphTelegraphs the beginning of the weather on the impacted z levels
thunder_act_turfAffects the turf with thunder
update_areasUpdates the overlays on impacted areas
weather_act_mobAffects the mob with whatever the weather does
weather_act_turfAffects the turf with whatever the weather does
wind_downWeather enters the winding down phase, stops effects

Var Details

area_type

Types of area to affect

blacklist_weather_reagents

A list of reagents that are forbidden from being selected when there is no whitelist and the reagents are randomized

current_mobs

List of current mobs being processed by weather

currentpart

The current section our weather subsystem is processing

desc

description of weather

end_duration

How long the "wind-down" graphic will appear before vanishing entirely

end_message

Displayed once the weather is over

end_overlay

Area overlay while weather is ending

end_sound

Sound that plays while weather is ending

end_sound_vol

Volume of the sound that plays while weather is ending

immunity_type

Used by mobs (or movables containing mobs, such as enviro bags) to prevent them from being affected by the weather.

impacted_areas

Areas to be affected by the weather, calculated when the weather begins

impacted_areas_blend_modes

Areas affected by weather have their blend modes changed

impacted_areas_weighted

A weighted list of areas impacted by weather, where weights reflect the total turf count in each area.

impacted_z_levels

The list of z-levels that this weather is actively affecting

impacted_z_levels_weighted

A weighted list of z-levels impacted by weather, where weights reflect the total turf count on each level

name

name of weather

next_hit_time

For barometers to know when the next storm will hit

overlay_cache

List of all overlays to apply to our turfs

overlay_layer

Since it's above everything else, this is the layer used by default.

overlay_plane

Plane for the overlay

probability

Weight amongst other eligible weather. If zero, will never happen randomly.

protected_areas

Areas that are protected and excluded from the affected areas.

stage

The stage of the weather, from 1-4

subsystem_tasks

The list of allowed tasks our weather subsystem is allowed to process (determined by weather_flags)

target_trait

The z-level trait to affect when run randomly or when not overridden.

telegraph_duration

How long from the beginning of the telegraph until the weather begins

telegraph_message

The message displayed in chat to foreshadow the weather's beginning

telegraph_overlay

The overlay applied to all tiles on the z-level

telegraph_sound

The sound file played to everyone on an affected z-level

telegraph_sound_vol

Volume of the telegraph sound

thunder_color

Color to apply to thunder while weather is occuring

thunder_iteration

The weather thunder counter to keep track of how much thunder we have processed so far

thunder_turfs_per_tick

The calculated amount of turfs that get thunder effects processed each tick (this gets calculated do not manually set this var)

total_impacted_turfs

The total number of turfs impacted by weather across all z-levels and areas.

turf_iteration

The weather turf counter to keep track of how many turfs we have processed so far

turf_thunder_chance

The chance, per tick, a turf will have a thunder strike applied to it. This is a decimal value, 1.00 = 100%, 0.50 = 50%, etc. Recommend setting this really low near 0.001 (results in 1 in 1000 affected turfs having thunder strikes applied per tick)

turf_weather_chance

The chance, per tick, a turf will have weather effects applied to it. This is a decimal value, 1.00 = 100%, 0.50 = 50%, etc. Recommend setting this low near 0.01 (results in 1 in 100 affected turfs having weather reagents applied per tick)

use_glow

If this bit of weather should also draw an overlay that's uneffected by lighting onto the area Taken from weather_glow.dmi

weather_color

Color to apply to the area while weather is occuring

weather_duration

How long the weather lasts once it begins

weather_duration_lower

See above - this is the lowest possible duration

weather_duration_upper

See above - this is the highest possible duration

weather_flags

List of weather bitflags that determines effects (see \code__DEFINES\weather.dm)

weather_message

Displayed in chat once the weather begins in earnest

weather_overlay

Area overlay while the weather is occuring

weather_reagent

The selected reagent that will be rained down

weather_reagent_holder

The actual atom that holds our reagents that is held in nullspace

weather_sound

The sound played to everyone on an affected z-level when weather is occuring (does not loop)

weather_temperature

The temperature of our weather that is applied to weather reagents and mobs using adjust_bodytemperature()

weather_turfs_per_tick

The calculated amount of turfs that get weather effects processed each tick (this gets calculated do not manually set this var)

whitelist_weather_reagents

A list (supports regular, nested, and weighted) of possible reagents that will rain down from the sky. Only one of these will be selected to be used as the reagent

Proc Details

can_weather_act_mob

Returns TRUE if the living mob can be affected by the weather

can_weather_act_turf

Returns TRUE if the turf can be affected by the weather

end

Fully ends the weather

Effects no longer occur and area overlays are removed Removes weather from processing completely

generate_overlay_cache

Returns a list of visual offset -> overlays to use

pick_turf

Selects a turf impacted by weather, if available, otherwise returns null

start

Starts the actual weather and effects from it

Updates area overlays and sends sounds and messages to mobs to notify them Begins dealing effects from weather to mobs in the area

telegraph

Telegraphs the beginning of the weather on the impacted z levels

Sends sounds and details to mobs in the area Calculates duration and hit areas, and makes a callback for the actual weather to start

thunder_act_turf

Affects the turf with thunder

update_areas

Updates the overlays on impacted areas

weather_act_mob

Affects the mob with whatever the weather does

weather_act_turf

Affects the turf with whatever the weather does

wind_down

Weather enters the winding down phase, stops effects

Updates areas to be in the winding down phase Sends sounds and messages to mobs to notify them