Allow empty maps in FileMapGenerator

This commit is contained in:
Anuken
2021-08-25 21:57:18 -04:00
parent f46b22e4a7
commit c25e6b586b
3 changed files with 11 additions and 2 deletions

View File

@ -234,7 +234,6 @@ public class PlanetRenderer implements Disposable{
Tmp.c1.set(from).lerp(to, (f+ Time.globalTime /timeScale)%1f);
batch.color(Tmp.c1);
batch.vertex(Tmp.bz3.valueAt(Tmp.v32, f));
}
batch.flush(Gl.lineStrip);
}

View File

@ -21,6 +21,16 @@ public class FileMapGenerator implements WorldGenerator{
this.preset = preset;
}
public FileMapGenerator(Map map, SectorPreset preset){
this.map = map;
this.preset = preset;
}
/** If you use this constructor, make sure to override generate()! */
public FileMapGenerator(SectorPreset preset){
this(emptyMap, preset);
}
@Override
public void generate(Tiles tiles){
if(map == null) throw new RuntimeException("Generator has null map, cannot be used.");

View File

@ -11,4 +11,4 @@ android.useAndroidX=true
#used for slow jitpack builds; TODO see if this actually works
http.socketTimeout=80000
http.connectionTimeout=80000
archash=7e96b986053ce489aae161aa6bcbb5d921c609d4
archash=6534b0e34bfcb24d02d99cb9534d087ea76b5601