Merge remote-tracking branch 'origin/master'

# Conflicts:
#	core/src/io/anuke/mindustry/core/Renderer.java
This commit is contained in:
Anuken
2018-10-08 19:55:51 -04:00
31 changed files with 730 additions and 102 deletions

View File

@@ -84,7 +84,7 @@ public class CustomGameDialog extends FloatingDialog{
float images = 146f;
int i = 0;
for(Map map : world.maps().all()){
for(Map map : world.maps.all()){
if(i % maxwidth == 0){
maps.row();
@@ -112,7 +112,7 @@ public class CustomGameDialog extends FloatingDialog{
i++;
}
if(world.maps().all().size == 0){
if(world.maps.all().size == 0){
maps.add("$text.maps.none").pad(50);
}

View File

@@ -85,7 +85,7 @@ public class GenViewDialog extends FloatingDialog{
Pixmap pixmap = new Pixmap(sectorSize, sectorSize, Format.RGBA8888);
for(int i = 0; i < sectorSize; i++){
for(int j = 0; j < sectorSize; j++){
world.generator().generateTile(result, wx, wy, i, j, true, null, ores);
world.generator.generateTile(result, wx, wy, i, j, true, null, ores);
pixmap.drawPixel(i, sectorSize - 1 - j, ColorMapper.colorFor(result.floor, result.wall, Team.none, result.elevation, (byte)0));
}
}

View File

@@ -40,15 +40,15 @@ public class MapsDialog extends FloatingDialog{
String name = meta.tags.get("name", file.nameWithoutExtension());
if(world.maps().getByName(name) != null && !world.maps().getByName(name).custom){
if(world.maps.getByName(name) != null && !world.maps.getByName(name).custom){
ui.showError(Bundles.format("text.editor.import.exists", name));
}else if(world.maps().getByName(name) != null){
}else if(world.maps.getByName(name) != null){
ui.showConfirm("$text.confirm", "$text.editor.overwrite.confirm", () -> {
world.maps().saveMap(name, data, meta.tags);
world.maps.saveMap(name, data, meta.tags);
setup();
});
}else{
world.maps().saveMap(name, data, meta.tags);
world.maps.saveMap(name, data, meta.tags);
setup();
}
@@ -80,7 +80,7 @@ public class MapsDialog extends FloatingDialog{
float mapsize = 200f;
int i = 0;
for(Map map : world.maps().all()){
for(Map map : world.maps.all()){
if(i % maxwidth == 0){
maps.row();
@@ -100,7 +100,7 @@ public class MapsDialog extends FloatingDialog{
i++;
}
if(world.maps().all().size == 0){
if(world.maps.all().size == 0){
maps.add("$text.maps.none");
}
@@ -154,7 +154,7 @@ public class MapsDialog extends FloatingDialog{
table.addImageTextButton("$text.delete", "icon-trash-16", "clear", 16 * 2, () -> {
ui.showConfirm("$text.confirm", Bundles.format("text.map.delete", map.name), () -> {
world.maps().removeMap(map);
world.maps.removeMap(map);
dialog.hide();
setup();
});

View File

@@ -42,7 +42,7 @@ public class RestartDialog extends FloatingDialog{
buttons().addButton("$text.sector.retry", () -> {
Sector sector = world.getSector();
ui.loadLogic(() -> world.sectors().playSector(sector));
ui.loadLogic(() -> world.sectors.playSector(sector));
hide();
}).size(130f, 60f);
}

View File

@@ -51,7 +51,7 @@ public class SectorsDialog extends FloatingDialog{
buttons().addImageTextButton("$text.sector.deploy", "icon-play", 10*3, () -> {
hide();
ui.loadLogic(() -> world.sectors().playSector(selected));
ui.loadLogic(() -> world.sectors.playSector(selected));
}).size(230f, 64f).disabled(b -> selected == null)
.update(t -> t.setText(selected != null && selected.hasSave() ? "$text.sector.resume" : "$text.sector.deploy"));
}
@@ -132,7 +132,7 @@ public class SectorsDialog extends FloatingDialog{
float drawX = x + width/2f+ sectorX * padSectorSize - offsetX * padSectorSize - panX % padSectorSize;
float drawY = y + height/2f + sectorY * padSectorSize - offsetY * padSectorSize - panY % padSectorSize;
Sector sector = world.sectors().get(sectorX, sectorY);
Sector sector = world.sectors.get(sectorX, sectorY);
int width = (sector == null ? 1 : sector.width);
int height = (sector == null ? 1 : sector.height);
float paddingx = (width-1) * sectorPadding;

View File

@@ -153,7 +153,7 @@ public class SettingsMenuDialog extends SettingsDialog{
ui.showConfirm("$text.confirm", "$text.settings.clear.confirm", () -> {
Settings.clearBytes("sectors");
Settings.save();
world.sectors().load();
world.sectors.load();
dialog.hide();
});
});