Fixed WorldLoadEvent being fired on startup
This commit is contained in:
@@ -39,7 +39,9 @@ public class MenuRenderer implements Disposable{
|
||||
}
|
||||
|
||||
private void generate(){
|
||||
world.beginMapLoad();
|
||||
//suppress tile change events.
|
||||
world.setGenerating(true);
|
||||
|
||||
Tiles tiles = world.resize(width, height);
|
||||
//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);
|
||||
@@ -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(){
|
||||
|
||||
@@ -104,8 +104,10 @@ public class HudFragment{
|
||||
t.add(new Minimap()).name("minimap");
|
||||
t.row();
|
||||
//position
|
||||
// + (mobile ? "" : "\n[lightgray]" + World.toTile(Core.input.mouseWorldX()) + "," + World.toTile(Core.input.mouseWorldY()))
|
||||
t.label(() -> player.tileX() + "," + player.tileY())
|
||||
.visible(() -> Core.settings.getBool("position"))
|
||||
//.right().labelAlign(Align.right)
|
||||
.touchable(Touchable.disabled)
|
||||
.name("position");
|
||||
t.top().right();
|
||||
|
||||
Reference in New Issue
Block a user