diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index 51fa5969..c66905cd 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -167,7 +167,7 @@ /turf/open/floor/plating/asteroid/airless/cave/volcanic/has_data //subtype for producing a tunnel with given data has_data = TRUE -/turf/open/floor/plating/asteroid/airless/cave/Initialize() +/turf/open/floor/plating/asteroid/airless/cave/Initialize(mapload) if (!mob_spawn_list) mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goldgrub = 1, /mob/living/simple_animal/hostile/asteroid/goliath = 5, /mob/living/simple_animal/hostile/asteroid/basilisk = 4, /mob/living/simple_animal/hostile/asteroid/hivelord = 3) if (!megafauna_spawn_list) @@ -176,6 +176,10 @@ flora_spawn_list = list(/obj/structure/flora/ash/leaf_shroom = 2 , /obj/structure/flora/ash/cap_shroom = 2 , /obj/structure/flora/ash/stem_shroom = 2 , /obj/structure/flora/ash/cacti = 1, /obj/structure/flora/ash/tall_shroom = 2) . = ..() + + return INITIALIZE_HINT_LATELOAD + +/turf/open/floor/plating/asteroid/airless/cave/LateInitialize() if(!has_data) produce_tunnel_from_data() @@ -273,8 +277,6 @@ var/maybe_boss = pickweight(megafauna_spawn_list) if(megafauna_spawn_list[maybe_boss]) randumb = maybe_boss - if(ispath(maybe_boss, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it - megafauna_spawn_list[maybe_boss] = 0 else //this is not danger, don't spawn a boss, spawn something else randumb = pickweight(mob_spawn_list) @@ -285,7 +287,15 @@ return //if the random is a standard mob, avoid spawning if there's another one within 12 tiles if((ispath(randumb, /obj/structure/spawner/lavaland) || istype(H, /obj/structure/spawner/lavaland)) && get_dist(src, H) <= 2) return //prevents tendrils spawning in each other's collapse range + + for (var/area/L in range(8, T)) + if (istype(L, /area/lavaland/surface/outdoors/) && !istype(L, /area/lavaland/surface/outdoors/unexplored)\ + && istype(L, /area/ruin) && istype(randumb, /mob/living/simple_animal/hostile/megafauna)) + randumb = pickweight(mob_spawn_list) //If we're megafauna within 8 tiles of a safe location, just become a normal enemy + break + if(istype(randumb, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it + megafauna_spawn_list[3] = 0 new randumb(T) return TRUE