From 7e4f0a0b0f443f287fa817ab2ab02e98e6b8ee00 Mon Sep 17 00:00:00 2001 From: Vi3trice <80771500+Vi3trice@users.noreply.github.com> Date: Thu, 9 Oct 2025 07:14:37 -0400 Subject: [PATCH] Optimize the volcanoes (#30592) * Optimize the hell out of volcanoes * I knew I forgot something when moving stuff around --- code/datums/weather/weather_types/lavaland_weather.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/datums/weather/weather_types/lavaland_weather.dm b/code/datums/weather/weather_types/lavaland_weather.dm index 84a7e4fcc9f..74978e6557c 100644 --- a/code/datums/weather/weather_types/lavaland_weather.dm +++ b/code/datums/weather/weather_types/lavaland_weather.dm @@ -153,15 +153,15 @@ new_river.generate(nodes = 4, ignore_bridges = TRUE, warning = TRUE) if(world.time >= next_rubble) next_rubble = world.time + rand(3 DECISECONDS, 2 SECONDS) - var/hits = 0 - var/target - for(var/turf/T in get_area_turfs(/area/lavaland/surface/outdoors)) - if(istype(get_area(T), /area/lavaland/surface/outdoors/outpost/no_boulder)) + for(var/area/lavaland/surface/outdoors/N in GLOB.all_areas) + if(istype(N, /area/lavaland/surface/outdoors/outpost/no_boulder)) continue // No hitting the no boulder area - if(istype(T, /turf/simulated/floor)) // dont waste our time hitting walls + for(var/turf/simulated/floor/T in N) // dont waste our time hitting walls valid_targets += T if(isnull(valid_targets)) // prevents a runtime when coding without lavaland enabled. Or theres somehow ZERO turfs. return + var/hits = 0 + var/target while(hits <= 150 && length(valid_targets)) //sling a bunch of rocks around the map target = pick(valid_targets) new /obj/effect/temp_visual/rock_target(target)