Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions code/datums/mapgen/CaveGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down