diff --git a/code/game/turfs/simulated/outdoors/snow.dm b/code/game/turfs/simulated/outdoors/snow.dm index 366fdfa5e69..07a6804803e 100644 --- a/code/game/turfs/simulated/outdoors/snow.dm +++ b/code/game/turfs/simulated/outdoors/snow.dm @@ -51,6 +51,7 @@ name = "ice" icon_state = "ice" desc = "Looks slippery." + edge_blending_priority = 0 /turf/simulated/floor/outdoors/ice/Entered(var/mob/living/M) sleep(1 * world.tick_lag) diff --git a/code/modules/lighting/lighting_fake_sun_vr.dm b/code/modules/lighting/lighting_fake_sun_vr.dm new file mode 100644 index 00000000000..4ddff922ba6 --- /dev/null +++ b/code/modules/lighting/lighting_fake_sun_vr.dm @@ -0,0 +1,50 @@ +/obj/effect/fake_sun + name = "fake sun" + desc = "Deletes itself, but first updates all the lighting on outdoor turfs." + icon = 'icons/effects/effects_vr.dmi' + icon_state = "fakesun" + + var/list/possible_light_setups = list( + list( + "brightness" = 1.0, + "color" = "#f3932d" + ), + list( + "brightness" = 6.0, + "color" = "#abfff7" + ) + ) + +/obj/effect/fake_sun/Initialize() + ..() + return INITIALIZE_HINT_LATELOAD + +/obj/effect/fake_sun/LateInitialize() + . = ..() + + var/list/our_choice = pick(possible_light_setups) + + // Calculate new values to apply + var/new_brightness = our_choice["brightness"] + var/new_color = our_choice["color"] + var/lum_r = new_brightness * GetRedPart (new_color) / 255 + var/lum_g = new_brightness * GetGreenPart(new_color) / 255 + var/lum_b = new_brightness * GetBluePart (new_color) / 255 + var/static/update_gen = -1 // Used to prevent double-processing corners. Otherwise would happen when looping over adjacent turfs. + + var/list/turfs = block(locate(1,1,z),locate(world.maxx,world.maxy,z)) + + var/count = 0 + for(var/turf/simulated/T as anything in turfs) + if(!T.lighting_overlay) + T.lighting_build_overlay() + if(!T.outdoors) + continue + for(var/C in T.get_corners()) + var/datum/lighting_corner/LC = C + if(LC.update_gen != update_gen && LC.active) + LC.update_gen = update_gen + LC.update_lumcount(lum_r, lum_g, lum_b) + count++ + update_gen-- + qdel(src) \ No newline at end of file diff --git a/icons/effects/effects_vr.dmi b/icons/effects/effects_vr.dmi index f9824436dd3..79a41c3463c 100644 Binary files a/icons/effects/effects_vr.dmi and b/icons/effects/effects_vr.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 3d45c71f867..c476353c6a6 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2425,6 +2425,7 @@ #include "code\modules\lighting\lighting_area.dm" #include "code\modules\lighting\lighting_atom.dm" #include "code\modules\lighting\lighting_corner.dm" +#include "code\modules\lighting\lighting_fake_sun_vr.dm" #include "code\modules\lighting\lighting_overlay.dm" #include "code\modules\lighting\lighting_setup.dm" #include "code\modules\lighting\lighting_source.dm"