From fb3d84acfb4112f324927dce2f7b9122c142f170 Mon Sep 17 00:00:00 2001 From: ToasterBiome Date: Fri, 2 Sep 2022 18:19:04 -0500 Subject: [PATCH 1/2] Update CaveGenerator.dm --- code/datums/mapgen/CaveGenerator.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/datums/mapgen/CaveGenerator.dm b/code/datums/mapgen/CaveGenerator.dm index db3bd8aa9223..6ee144a2282b 100644 --- a/code/datums/mapgen/CaveGenerator.dm +++ b/code/datums/mapgen/CaveGenerator.dm @@ -53,13 +53,16 @@ for(var/i in turfs) //Go through all the turfs and generate them var/turf/gen_turf = i - var/area/A = gen_turf.loc - if(!(A.area_flags & CAVES_ALLOWED)) + if(!istype(gen_turf,/turf/open/genturf)) continue if(istype(gen_turf,/turf/closed/mineral)) continue + var/area/A = gen_turf.loc + if(!(A.area_flags & CAVES_ALLOWED)) + continue + var/closed = text2num(string_gen[world.maxx * (gen_turf.y - 1) + gen_turf.x]) var/stored_flags From 00d54400f59c1a8bf56b6c8c776116df80a921b8 Mon Sep 17 00:00:00 2001 From: ToasterBiome Date: Sat, 3 Sep 2022 13:45:20 -0500 Subject: [PATCH 2/2] Update CaveGenerator.dm --- code/datums/mapgen/CaveGenerator.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/datums/mapgen/CaveGenerator.dm b/code/datums/mapgen/CaveGenerator.dm index 6ee144a2282b..7f3a1d5600b1 100644 --- a/code/datums/mapgen/CaveGenerator.dm +++ b/code/datums/mapgen/CaveGenerator.dm @@ -4,7 +4,8 @@ var/open_turf_types = list(/turf/open/floor/plating/asteroid/airless = 1) ///Weighted list of the types that spawns if the turf is closed var/closed_turf_types = list(/turf/closed/mineral/random = 1) - + ///If this is set to TRUE then it will only change turfs that are /turf/open/genturf, for more flexability in design + var/gen_gurf_only = TRUE ///Weighted list of mobs that can spawn in the area. var/list/mob_spawn_list @@ -53,7 +54,7 @@ for(var/i in turfs) //Go through all the turfs and generate them var/turf/gen_turf = i - if(!istype(gen_turf,/turf/open/genturf)) + if(gen_gurf_only && !istype(gen_turf,/turf/open/genturf)) continue if(istype(gen_turf,/turf/closed/mineral))