diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index c9140515a06..d83c9887a7e 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -35,8 +35,8 @@ #define DEFAULT_PLANE 0 //Marks out the default plane, even if we don't use it -#define WEATHER_PLANE 1 -#define PARTICLE_WEATHER_PLANE 2 +#define PARTICLE_WEATHER_PLANE 1 +#define WEATHER_PLANE 2 #define AREA_PLANE 3 #define MASSIVE_OBJ_PLANE 4 #define GHOST_PLANE 5 diff --git a/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm b/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm index b5dc090c9aa..c6635c723f2 100644 --- a/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm +++ b/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm @@ -328,22 +328,23 @@ . = ..() if(!.) return - home.AddComponent(/datum/component/hide_weather_planes, src, particle_weather) + home.AddComponent(/datum/component/hide_weather_planes, src) + RegisterSignal(home, COMSIG_GROUP_HUD_CHANGED, PROC_REF(hud_changed)) + update_state(home.our_hud?.mymob) + +/atom/movable/screen/plane_master/weather/proc/hud_changed(datum/source, datum/hud/old_hud, datum/hud/new_hud) + SIGNAL_HANDLER + update_state(new_hud?.mymob) /atom/movable/screen/plane_master/weather/proc/update_state(mob/mymob) if(!istype(mymob)) return // If the client wants particle weather, only show the PARTICLE_WEATHER_PLANE, otherwise only show the normal WEATHER_PLANE - if (mymob.canon_client?.prefs?.read_preference(/datum/preference/toggle/particle_weather) != particle_weather) - hide_from(mymob) - else - show_to(mymob) - -/atom/movable/screen/plane_master/weather/show_to(mob/mymob) - // Only show ourselves if the player wants it if (mymob.canon_client?.prefs?.read_preference(/datum/preference/toggle/particle_weather) == particle_weather) - return ..() + set_alpha(255) + else + set_alpha(0) /atom/movable/screen/plane_master/weather/particle name = "Particle Weather" @@ -365,7 +366,7 @@ . = ..() if(!.) return - home.AddComponent(/datum/component/hide_weather_planes, src, TRUE) + home.AddComponent(/datum/component/hide_weather_planes, src) /atom/movable/screen/plane_master/massive_obj name = "Massive object" diff --git a/code/_onclick/hud/rendering/render_plate.dm b/code/_onclick/hud/rendering/render_plate.dm index 7dd681d378c..9945d702c77 100644 --- a/code/_onclick/hud/rendering/render_plate.dm +++ b/code/_onclick/hud/rendering/render_plate.dm @@ -73,7 +73,7 @@ add_relay_to(GET_NEW_PLANE(RENDER_PLANE_EMISSIVE_BLOOM, offset), blend_override = BLEND_MULTIPLY) /atom/movable/screen/plane_master/rendering_plate/particle_weather - name = "Particle Weather" + name = "Particle Weather Holder Plate" documentation = "Plane used to render particle weather, masked by WEATHER_MASK_PLANE. \ Cannot be a single screen object as it needs to be a planemaster in order to be properly masked by the weather mask." plane = RENDER_PLANE_PARTICLE_WEATHER @@ -89,7 +89,7 @@ . = ..() if(!.) return - home.AddComponent(/datum/component/hide_weather_planes, src, TRUE) + home.AddComponent(/datum/component/hide_weather_planes, src) RegisterSignal(home, COMSIG_GROUP_HUD_CHANGED, PROC_REF(hud_changed)) update_state(home.our_hud?.mymob) @@ -117,7 +117,7 @@ return ..() /atom/movable/screen/plane_master/rendering_plate/particle_weather/emissive - name = "Emissive Particle Weather" + name = "Emissive Particle Weather Holder Plate" documentation = "Secondary particle weather plane for emissive parts of weather, which is additionally rendered onto the emissive plane after being masked." plane = RENDER_PLANE_EMISSIVE_PARTICLE_WEATHER diff --git a/code/datums/weather/weather_types/rain_storm.dm b/code/datums/weather/weather_types/rain_storm.dm index 2b2998fff72..e3e7380f34c 100644 --- a/code/datums/weather/weather_types/rain_storm.dm +++ b/code/datums/weather/weather_types/rain_storm.dm @@ -6,13 +6,19 @@ min_severity = 30 telegraph_message = span_danger("Thunder rumbles far above. You hear droplets drumming against the canopy.") + telegraph_overlay = "rain_low" telegraph_duration = 30 SECONDS weather_message = span_userdanger("Rain pours down around you!") + weather_overlay = "rain_high" end_message = span_bolddanger("The downpour gradually slows to a light shower.") + end_overlay = "rain_low" end_duration = 30 SECONDS + // Don't display overlays when using particle weather + weather_alpha = 0 + weather_duration_lower = 3 MINUTES weather_duration_upper = 5 MINUTES diff --git a/code/modules/client/preferences/particle_weather.dm b/code/modules/client/preferences/particle_weather.dm index a9185eb5d13..c552e29a9f9 100644 --- a/code/modules/client/preferences/particle_weather.dm +++ b/code/modules/client/preferences/particle_weather.dm @@ -8,8 +8,11 @@ for(var/atom/movable/screen/plane_master/rendering_plate/particle_weather/plane_master as anything in client.mob?.hud_used?.get_true_plane_masters(RENDER_PLANE_PARTICLE_WEATHER)) plane_master.update_state(client.mob) + for(var/atom/movable/screen/plane_master/rendering_plate/particle_weather/emissive/plane_master as anything in client.mob?.hud_used?.get_true_plane_masters(RENDER_PLANE_EMISSIVE_PARTICLE_WEATHER)) + plane_master.update_state(client.mob) + for(var/atom/movable/screen/plane_master/weather/plane_master as anything in client.mob?.hud_used?.get_true_plane_masters(WEATHER_PLANE)) plane_master.update_state(client.mob) - for(var/atom/movable/screen/plane_master/weather/plane_master as anything in client.mob?.hud_used?.get_true_plane_masters(PARTICLE_WEATHER_PLANE)) + for(var/atom/movable/screen/plane_master/weather/particle/plane_master as anything in client.mob?.hud_used?.get_true_plane_masters(PARTICLE_WEATHER_PLANE)) plane_master.update_state(client.mob)