diff --git a/code/datums/mapgen/CaveGenerator.dm b/code/datums/mapgen/CaveGenerator.dm index db3bd8aa9223..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,13 +54,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(gen_gurf_only && !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