Fixed WorldLoadEvent being fired on startup
This commit is contained in:
@@ -39,7 +39,9 @@ public class MenuRenderer implements Disposable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void generate(){
|
private void generate(){
|
||||||
world.beginMapLoad();
|
//suppress tile change events.
|
||||||
|
world.setGenerating(true);
|
||||||
|
|
||||||
Tiles tiles = world.resize(width, height);
|
Tiles tiles = world.resize(width, height);
|
||||||
//only uses base game ores now, mod ones usually contrast too much with the floor
|
//only uses base game ores now, mod ones usually contrast too much with the floor
|
||||||
Seq<Block> ores = Seq.with(Blocks.oreCopper, Blocks.oreLead, Blocks.oreScrap, Blocks.oreCoal, Blocks.oreTitanium, Blocks.oreThorium);
|
Seq<Block> ores = Seq.with(Blocks.oreCopper, Blocks.oreLead, Blocks.oreScrap, Blocks.oreCoal, Blocks.oreTitanium, Blocks.oreThorium);
|
||||||
@@ -160,7 +162,8 @@ public class MenuRenderer implements Disposable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
world.endMapLoad();
|
//don't fire a world load event, it just causes lag and confusion
|
||||||
|
world.setGenerating(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cache(){
|
private void cache(){
|
||||||
|
|||||||
@@ -104,8 +104,10 @@ public class HudFragment{
|
|||||||
t.add(new Minimap()).name("minimap");
|
t.add(new Minimap()).name("minimap");
|
||||||
t.row();
|
t.row();
|
||||||
//position
|
//position
|
||||||
|
// + (mobile ? "" : "\n[lightgray]" + World.toTile(Core.input.mouseWorldX()) + "," + World.toTile(Core.input.mouseWorldY()))
|
||||||
t.label(() -> player.tileX() + "," + player.tileY())
|
t.label(() -> player.tileX() + "," + player.tileY())
|
||||||
.visible(() -> Core.settings.getBool("position"))
|
.visible(() -> Core.settings.getBool("position"))
|
||||||
|
//.right().labelAlign(Align.right)
|
||||||
.touchable(Touchable.disabled)
|
.touchable(Touchable.disabled)
|
||||||
.name("position");
|
.name("position");
|
||||||
t.top().right();
|
t.top().right();
|
||||||
|
|||||||
Reference in New Issue
Block a user