fix: do more ruin checks for lavaland procgen (#25018)

* fix: do more ruin checks for lavaland procgen

* I'm is smart
This commit is contained in:
warriorstar-orion
2024-04-07 06:15:15 -04:00
committed by GitHub
parent e02097bcab
commit 645a0d64b7
@@ -279,7 +279,9 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
// Move our tunnel forward
tunnel = get_step(tunnel, dir)
if(istype(tunnel))
// Separate ruin area check here because of the raw ChangeTurf call that
// doesn't go through SpawnFloor/Flora/Monster.
if(istype(tunnel) && !istype(tunnel.loc, /area/ruin))
// Small chance to have forks in our tunnel; otherwise dig our tunnel.
var/caveprob = 20
switch(SSmapping.cave_theme)
@@ -342,6 +344,8 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
/obj/effect/spawner/oasisrock/proc/make_rock(radius)
var/our_turf = get_turf(src)
for(var/turf/oasis in circlerangeturfs(our_turf, radius))
if(istype(oasis.loc, /area/ruin))
continue
oasis.ChangeTurf(/turf/simulated/mineral/random/high_chance/volcanic, ignore_air = TRUE)
var/list/valid_turfs = circlerangeturfs(our_turf, radius + 1)
valid_turfs -= circlerangeturfs(our_turf, radius)
@@ -352,6 +356,9 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
qdel(src)
/turf/simulated/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T, monsterprob = 30)
if(istype(T.loc, /area/ruin))
return
for(var/S in RANGE_TURFS(1, src))
var/turf/NT = S
if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored))
@@ -365,6 +372,9 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
T.ChangeTurf(turf_type, FALSE, FALSE, TRUE)
/turf/simulated/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T, monsterprob = 30)
if(istype(T.loc, /area/ruin))
return
if(prob(monsterprob))
if(istype(loc, /area/mine/explored) || !istype(loc, /area/lavaland/surface/outdoors/unexplored))
return
@@ -406,6 +416,9 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
#undef RECURSION_MAX
/turf/simulated/floor/plating/asteroid/airless/cave/proc/SpawnFlora(turf/T)
if(istype(T.loc, /area/ruin))
return
var/floraprob = 12
switch(SSmapping.cave_theme)
if(BLOCKED_BURROWS)