mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
a9b0ecb7d0
## About The Pull Request A weather anomaly can spawn on the station, causing a sandstorm, snowstorm, or rainstorm to affect the room (and nearby rooms). These weathers range from "harmless" to "mildly damaging". They last for around five minutes. The weather doesn't start immediately, giving people time to neutralize it before it causes damage. Neutralizing the anomaly stops the weather. If they detonate, it just throw objects away from itself. <img width="407" height="225" alt="image" src="https://github.com/user-attachments/assets/2de1b797-2b17-442c-9023-11085b4849cf" /> <img width="991" height="674" alt="image" src="https://github.com/user-attachments/assets/afe5a21d-9cf8-4e9d-95ec-adef6fd12a93" /> A rarer version of the anomaly can also occur, which brings a lightning storm, which may damage the station itself. Also, reactive weather armor. When you are hit, it summons a lightning strike below nearby assailants. ## Why It's Good For The Game With the added rain mechanics I wanted to use them, but it's kinda hard to shoe them into the station because, "why is it raining on a space station that makes no sense" However, anomalies are weird, so this fits perfectly ## Changelog 🆑 Melbert add: Weather anomalies, in four variants: Rain, snow, sand, and the rare lightning storm. add: Reactive Weather Armor /🆑
70 lines
3.4 KiB
Plaintext
70 lines
3.4 KiB
Plaintext
//A reference to this list is passed into area sound managers, and it's modified in a manner that preserves that reference in ash_storm.dm
|
|
GLOBAL_LIST_EMPTY(ash_storm_sounds)
|
|
GLOBAL_LIST_EMPTY(rain_storm_sounds)
|
|
GLOBAL_LIST_EMPTY(sand_storm_sounds)
|
|
/// Tracks where we should play snowstorm sounds for the area sound listener
|
|
GLOBAL_LIST_EMPTY(snowstorm_sounds)
|
|
/// The wizard rain event can run multiple times so we use a global reagent whitelist to reuse the same list to boost performance
|
|
GLOBAL_LIST_EMPTY(wizard_rain_reagents)
|
|
|
|
#define STARTUP_STAGE 1
|
|
#define MAIN_STAGE 2
|
|
#define WIND_DOWN_STAGE 3
|
|
#define END_STAGE 4
|
|
|
|
/// The amount of reagent units that is applied when an object comes into contact with rain
|
|
#define WEATHER_REAGENT_VOLUME 5
|
|
/// Weather reagent volume applied to randomly selected turfs/objects is scaled by this multiplier to compensate for reduced processing frequency
|
|
#define TURF_REAGENT_VOLUME_MULTIPLIER 3
|
|
|
|
/// 1 / 400 chance for a turf to get a thunder strike per tick (death and destruction to mobs/equipment in area)
|
|
#define THUNDER_CHANCE_INSANE 0.0025
|
|
/// 1 / 1,000 chance for a turf to get a thunder strike per tick (damage to mobs/equipment in area)
|
|
#define THUNDER_CHANCE_HIGH 0.001
|
|
/// 1 / 5,000 chance for a turf to get a thunder strike per tick (sporadic damage to mobs/equipment in area)
|
|
#define THUNDER_CHANCE_AVERAGE 0.0002
|
|
/// 1 / 20,000 chance for a turf to get a thunder strike per tick (rare damage to mobs/equipment in area)
|
|
#define THUNDER_CHANCE_RARE 0.00005
|
|
/// 1 / 50,000 chance for a turf to get a thunder strike per tick (almost no damage to mobs/equipment in area)
|
|
#define THUNDER_CHANCE_VERY_RARE 0.00002
|
|
|
|
/// admin verb to control thunder via the run_weather command
|
|
GLOBAL_LIST_INIT(thunder_chance_options, list(
|
|
"Relentless - The Sky is Angry, Very Angry" = THUNDER_CHANCE_INSANE,
|
|
"Abundant - A shocking amount of thunder" = THUNDER_CHANCE_HIGH,
|
|
"Regular - Standard Storm Activity" = THUNDER_CHANCE_AVERAGE,
|
|
"Occasional - A polite amount of thunder" = THUNDER_CHANCE_RARE,
|
|
"Rare - Like finding a four-leaf clover, but in the sky" = THUNDER_CHANCE_VERY_RARE,
|
|
"None - Admin Safe Space (Thunder Disabled)" = 0,
|
|
))
|
|
|
|
//WEATHER FLAGS
|
|
/// If weather will affect turfs
|
|
#define WEATHER_TURFS (1<<0)
|
|
/// If weather will affect mobs
|
|
#define WEATHER_MOBS (1<<1)
|
|
/// If weather will apply thunder strikes to turfs
|
|
#define WEATHER_THUNDER (1<<2)
|
|
/// If weather will be allowed to affect indoor areas
|
|
#define WEATHER_INDOORS (1<<3)
|
|
/// If weather is endless and can only be stopped manually
|
|
#define WEATHER_ENDLESS (1<<4)
|
|
/// If weather will be detected by a barometer
|
|
#define WEATHER_BAROMETER (1<<5)
|
|
/// If weather temperature ignores clothing insulation when adjusting bodytemperature
|
|
#define WEATHER_TEMPERATURE_BYPASS_CLOTHING (1<<6)
|
|
/// Alerts are only sent to people within affected area rather than on affected z-levels
|
|
#define WEATHER_STRICT_ALERT (1<<7)
|
|
|
|
/// Does weather have any type of processing related to mobs, turfs, or thunder?
|
|
#define FUNCTIONAL_WEATHER (WEATHER_TURFS|WEATHER_MOBS|WEATHER_THUNDER)
|
|
|
|
// Indexes for weather_data list to override behaviors
|
|
#define WEATHER_FORCED_AREAS "Areas"
|
|
#define WEATHER_FORCED_FLAGS "Flags"
|
|
#define WEATHER_FORCED_REAGENT "Reagent"
|
|
#define WEATHER_FORCED_THUNDER "Thunder Chance"
|
|
#define WEATHER_FORCED_TELEGRAPH "Telegraph Duration"
|
|
#define WEATHER_FORCED_END "End Duration"
|
|
#define WEATHER_FORCED_DURATION "Weather Duration"
|