Adds weather to the exoplanets (#18855)

This pr adds weather to some exoplanets:
-snow exoplanets, including adhomai, can go from calm to light snow,
medium snow, and heavy snow
-jungle planets, including konyang, can go from calm to light rain,
regular rain, and storm
-lava planets can go from calm to ash

---------

Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Alberyk
2024-04-06 15:23:01 -03:00
committed by GitHub
parent 77ef4add97
commit b2dfb35453
9 changed files with 112 additions and 6 deletions
+4 -6
View File
@@ -539,16 +539,14 @@
/obj/effect/landmark/exoplanet_spawn/proc/do_spawn(obj/effect/overmap/visitable/sector/exoplanet/planet)
return
///Resets the given weather state to our planet replacing the old one, and trigger updates. Can be a type path or instance.
/obj/effect/overmap/visitable/sector/exoplanet/proc/reset_weather(var/singleton/state/weather/W)
///Sets the given weather state to our planet replacing the old one, and trigger updates. Can be a type path or instance.
/obj/effect/overmap/visitable/sector/exoplanet/proc/set_weather(var/singleton/state/weather/W)
initial_weather_state = W
if(!(z in map_z))
return //It's entire possible the levels weren't initialized yet, so don't bother.
//Tells all our levels exposed to the sky to force change the weather.
SSweather.setup_weather_system(z, initial_weather_state)
SSweather.setup_weather_system(map_z[length(map_z)], initial_weather_state)
///Setup the initial weather state for the planet. Doesn't apply it to our z levels however.
/obj/effect/overmap/visitable/sector/exoplanet/proc/generate_weather()
if(ispath(initial_weather_state))
initial_weather_state = GET_SINGLETON(initial_weather_state)
reset_weather(initial_weather_state)
set_weather(initial_weather_state)