diff --git a/code/controllers/subsystem/minimum_spawns.dm b/code/controllers/subsystem/minimum_spawns.dm index 299a67e8ce..9ddde80aa8 100644 --- a/code/controllers/subsystem/minimum_spawns.dm +++ b/code/controllers/subsystem/minimum_spawns.dm @@ -100,44 +100,51 @@ GLOBAL_LIST_INIT(minimum_snow_under_spawns, list( where_we_droppin_boys_iterations++ CHECK_TICK if(where_we_droppin_boys_iterations >= 1250) + INIT_ANNOUNCE("Minimum Spawns subsystem stopped early on spawns list 1 - too many iterations!") break var/turf/RT = pick_n_take(valid_mining_turfs) //Pick a random mining Z-level turf var/MS_tospawn = pick_n_take(active_spawns) - for(var/mob/living/simple_animal/hostile/H in urange(70,RT)) //prevents mob clumps - if((ispath(MS_tospawn, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(src, H) <= 70) + for(var/mob/living/simple_animal/hostile/megafauna/H in urange(70,RT)) //prevents mob clumps + if((istype(MS_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(RT, H) <= 70) + // INIT_ANNOUNCE("MSTS failed - [MS_tospawn] too close to [H], [get_dist(RT, H)] tiles distance, [RT.x] [RT.y] [RT.z]") active_spawns.Add(MS_tospawn) return //let's try not to dump megas too close to each other? - if((ispath(MS_tospawn, /obj/structure/spawner) || istype(H, /obj/structure/spawner)) && get_dist(src, H) <= 35) + if((istype(MS_tospawn, /obj/structure/spawner)) && get_dist(RT, H) <= 40) + // INIT_ANNOUNCE("MSTS failed - [MS_tospawn] too close to [H], [get_dist(RT, H)] tiles distance, [RT.x] [RT.y] [RT.z]") active_spawns.Add(MS_tospawn) return //let's at least /try/ to space these out? for(var/obj/structure/spawner/LT in urange(70,RT)) //prevents tendril/mega clumps - if((ispath(MS_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(src, LT) <= 70) + if((istype(MS_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(RT, LT) <= 70) active_spawns.Add(MS_tospawn) + // INIT_ANNOUNCE("MSTS failed - [MS_tospawn] too close to [LT], [get_dist(RT, LT)] tiles distance, [RT.x] [RT.y] [RT.z]") return //let's try not to dump megas too close to each other? - if((ispath(MS_tospawn, /obj/structure/spawner)) && get_dist(src, LT) <= 35) + if((istype(MS_tospawn, /obj/structure/spawner)) && get_dist(RT, LT) <= 40) active_spawns.Add(MS_tospawn) + // INIT_ANNOUNCE("MSTS failed - [MS_tospawn] too close to [LT], [get_dist(RT, LT)] tiles distance, [RT.x] [RT.y] [RT.z]") return //let's at least /try/ to space these out? // man the overhead on this is gonna SUCK + // INIT_ANNOUNCE("MSTS succeeded! - [MS_tospawn] spawning at [RT.x] [RT.y] [RT.z]") new MS_tospawn(RT) while(active_spawns_2.len) where_we_droppin_boys_iterations++ CHECK_TICK if(where_we_droppin_boys_iterations >= 1250) + INIT_ANNOUNCE("Minimum Spawns subsystem stopped early on active list 2 - too many iterations!") break var/turf/RT = pick_n_take(valid_mining_turfs_2) //Pick a random mining Z-level turf var/MS2_tospawn = pick_n_take(active_spawns_2) for(var/mob/living/simple_animal/hostile/H in urange(70,RT)) //prevents mob clumps - if((ispath(MS2_tospawn, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(src, H) <= 70) + if((istype(MS2_tospawn, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(RT, H) <= 70) active_spawns_2.Add(MS2_tospawn) return //let's try not to dump megas too close to each other? - if((ispath(MS2_tospawn, /obj/structure/spawner) || istype(H, /obj/structure/spawner)) && get_dist(src, H) <= 35) + if((istype(MS2_tospawn, /obj/structure/spawner)) && get_dist(RT, H) <= 40) active_spawns_2.Add(MS2_tospawn) return //let's at least /try/ to space these out? for(var/obj/structure/spawner/LT in urange(70,RT)) //prevents tendril/mega clumps - if((ispath(MS2_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(src, LT) <= 70) + if((istype(MS2_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(RT, LT) <= 70) active_spawns_2.Add(MS2_tospawn) return //let's try not to dump megas too close to each other? - if((ispath(MS2_tospawn, /obj/structure/spawner)) && get_dist(src, LT) <= 35) + if((istype(MS2_tospawn, /obj/structure/spawner)) && get_dist(RT, LT) <= 40) active_spawns.Add(MS2_tospawn) return //let's at least /try/ to space these out? // man the overhead on this is gonna SUCK