mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Optimize the volcanoes (#30592)
* Optimize the hell out of volcanoes * I knew I forgot something when moving stuff around
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user