Adjusts some code to reduce the rapid increase of clustering accidentally somehow caused in this improvement PR

Conflicts:
	code/modules/procedural mapping/mapGeneratorModules/nature.dm
This commit is contained in:
Remie Richards
2015-05-01 05:05:32 +01:00
committed by Tigercat2000
parent 0bcdcd037b
commit 88faef42ea
3 changed files with 20 additions and 15 deletions
@@ -63,6 +63,7 @@
if(replace)
undefineRegion()
//Sphere mode engage
var/evenCheckZ = 0
if(max(bigZ,lilZ) % 2 == 0)
evenCheckZ = centerZ+1
@@ -188,9 +189,8 @@
M.clusterCheckFlags = clusters[moduleClusters]
//src << "Defining Region"
N.defineCircularRegion(Start,End)
//N.defineRegion(Start, End)
src << "Defining Region"
N.defineRegion(Start, End)
src << "Region Defined"
src << "Generating Region"
N.generate()
@@ -42,7 +42,8 @@
if(clusterCheckFlags & CLUSTER_CHECK_SAME_TURFS)
clustering = rand(clusterMin,clusterMax)
for(var/turf/F in trange(clustering,T))
if(F.type == turfPath) //NOT istype(), exact typematching
//if(F.type == turfPath) //NOT istype(), exact typematching
if(istype(F,turfPath))
continue
if(locate(turfPath) in trange(clustering, T))
@@ -52,13 +53,15 @@
if(clusterCheckFlags & CLUSTER_CHECK_DIFFERENT_TURFS)
clustering = rand(clusterMin,clusterMax)
for(var/turf/F in trange(clustering,T))
if(F.type != turfPath)
//if(F.type != turfPath)
if(!(istype(F,turfPath)))
continue
//Success!
if(prob(spawnableTurfs[turfPath]))
T.ChangeTurf(turfPath)
//Atoms DO care whether atoms can be placed here
if(checkPlaceAtom(T))
@@ -71,14 +74,16 @@
if(clusterCheckFlags & CLUSTER_CHECK_SAME_ATOMS)
clustering = rand(clusterMin, clusterMax)
for(var/atom/movable/M in range(clustering,T))
if(M.type == atomPath)
//if(M.type == atomPath)
if(istype(M,atomPath))
continue
//You're DIFFERENT from me? I hate you I'm going home
if(clusterCheckFlags & CLUSTER_CHECK_DIFFERENT_ATOMS)
clustering = rand(clusterMin, clusterMax)
for(var/atom/movable/M in range(clustering,T))
if(M.type != atomPath)
//if(M.type != atomPath)
if(!(istype(M,atomPath)))
continue
//Success!
@@ -121,11 +126,11 @@
//Settings appropriate for turfs/atoms that cover SOME of the map region, sometimes referred to as a splatter layer.
/datum/mapGeneratorModule/splatterLayer
clusterCheckFlags = CLUSTER_CHECK_ALL
spawnableAtoms = list(/atom = 30)
spawnableTurfs = list(/turf = 30)
spawnableAtoms = list(/atom = 15)
spawnableTurfs = list(/turf = 15)
//Settings appropriate for turfs/atoms that cover a lot of the map region, eg a dense forest.
/datum/mapGeneratorModule/denseLayer
clusterCheckFlags = CLUSTER_CHECK_NONE
spawnableAtoms = list(/atom = 75)
spawnableTurfs = list(/turf = 75)
spawnableAtoms = list(/atom = 35)
spawnableTurfs = list(/turf = 35)
@@ -4,11 +4,11 @@
//Pine Trees
/datum/mapGeneratorModule/pineTrees
spawnableAtoms = list(/obj/structure/flora/tree/pine = 30)
spawnableAtoms = list(/obj/structure/flora/tree/pine = 15)
//Dead Trees
/datum/mapGeneratorModule/deadTrees
spawnableAtoms = list(/obj/structure/flora/tree/dead = 10)
spawnableAtoms = list(/obj/structure/flora/tree/dead = 5)
//Random assortment of bushes
/datum/mapGeneratorModule/randBushes
@@ -18,7 +18,7 @@
..()
spawnableAtoms = typesof(/obj/structure/flora/ausbushes)
for(var/i in spawnableAtoms)
spawnableAtoms[i] = 20
spawnableAtoms[i] = 15
//Random assortment of rocks and rockpiles
@@ -34,4 +34,4 @@
//Grass tufts with a high spawn chance
/datum/mapGeneratorModule/denseLayer/grassTufts
spawnableTurfs = list()
spawnableAtoms = list(/obj/structure/flora/ausbushes/grassybush = 75)
spawnableAtoms = list(/obj/structure/flora/ausbushes/grassybush = 35)