Fixed JSON planet support

This commit is contained in:
Anuken
2022-02-06 16:11:55 -05:00
parent fce3cf818e
commit cb110e5e6f
4 changed files with 12 additions and 8 deletions

View File

@@ -21,12 +21,10 @@ public abstract class BasicGenerator implements WorldGenerator{
protected Rand rand = new Rand();
protected int width, height;
protected Tiles tiles;
protected @Nullable Tiles tiles;
//for drawing
protected Block floor;
protected Block block;
protected Block ore;
protected @Nullable Block floor, block, ore;
@Override
public void generate(Tiles tiles){

View File

@@ -3,6 +3,7 @@ package mindustry.maps.generators;
import arc.math.geom.*;
import arc.struct.*;
import arc.struct.ObjectIntMap.*;
import arc.util.*;
import arc.util.noise.*;
import mindustry.content.*;
import mindustry.ctype.*;
@@ -20,7 +21,7 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
public int seed = 0;
protected IntSeq ints = new IntSeq();
protected Sector sector;
protected @Nullable Sector sector;
/** Should generate sector bases for a planet. */
public void generateSector(Sector sector){

View File

@@ -2,6 +2,7 @@ package mindustry.maps.planet;
import arc.math.*;
import arc.math.geom.*;
import arc.util.*;
import arc.util.noise.*;
import mindustry.content.*;
import mindustry.game.*;
@@ -21,7 +22,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
public float thoriumScl = 1f, copperScale = 1f, leadScale = 1f, graphiteScale = 1f, berylliumScale = 1f;
Rand rand;
@Nullable Rand rand;
int seed;
void asteroid(int ax, int ay, int radius){