Gamemodes removed

This commit is contained in:
Anuken
2019-01-12 16:55:24 -05:00
parent 777bd60f88
commit 8aa1509f47
49 changed files with 741 additions and 678 deletions
@@ -4,6 +4,7 @@ import io.anuke.arc.Core;
import io.anuke.arc.collection.IntIntMap;
import io.anuke.arc.collection.ObjectMap;
//todo: specify preferred game rules here; can be overriden
public class MapMeta{
public final int version;
public final ObjectMap<String, String> tags;
@@ -21,6 +21,7 @@ public class BasicGenerator extends RandomGenerator{
@Override
public void generate(Tile[][] tiles){
//todo use set seed
int seed = Mathf.random(99999999);
sim.setSeed(seed);
sim2.setSeed(seed + 1);
@@ -42,5 +43,17 @@ public class BasicGenerator extends RandomGenerator{
}
}
}
//rock outcrops
double rocks = sim.octaveNoise2D(3, 0.7, 1f / 70f, x, y);
double edgeDist = Math.min(x, Math.min(y, Math.min(Math.abs(x - (width - 1)), Math.abs(y - (height - 1)))));
double transition = 8;
if(edgeDist < transition){
rocks += (transition - edgeDist) / transition / 1.5;
}
if(rocks > 0.64){
block = Blocks.rocksSmall;
}
}
}