mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-14 17:57:56 +07:00
Allow empty maps in FileMapGenerator
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
@ -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.");
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user