diff --git a/core/src/io/anuke/mindustry/ai/WaveSpawner.java b/core/src/io/anuke/mindustry/ai/WaveSpawner.java index 7385cfb2fe..c03140c985 100644 --- a/core/src/io/anuke/mindustry/ai/WaveSpawner.java +++ b/core/src/io/anuke/mindustry/ai/WaveSpawner.java @@ -156,7 +156,7 @@ public class WaveSpawner{ for(int y = quady * quadsize; y < world.height() && y < (quady + 1) * quadsize; y++){ Tile tile = world.tile(x, y); - if(tile == null || tile.solid() || world.pathfinder().getValueforTeam(Team.red, x, y) == Float.MAX_VALUE){ + if(tile == null || tile.solid() || world.pathfinder.getValueforTeam(Team.red, x, y) == Float.MAX_VALUE){ setQuad(quadx, quady, false); break outer; } diff --git a/core/src/io/anuke/mindustry/core/Logic.java b/core/src/io/anuke/mindustry/core/Logic.java index fee3dc345d..f78e835e2b 100644 --- a/core/src/io/anuke/mindustry/core/Logic.java +++ b/core/src/io/anuke/mindustry/core/Logic.java @@ -100,15 +100,15 @@ public class Logic extends Module{ state.mode = world.getSector().currentMission().getMode(); world.getSector().currentMission().onBegin(); - world.sectors().save(); + world.sectors.save(); } //check if all assigned missions are complete if(!world.getSector().complete && world.getSector().completedMissions >= world.getSector().missions.size){ state.mode = GameMode.victory; - world.sectors().completeSector(world.getSector().x, world.getSector().y); - world.sectors().save(); + world.sectors.completeSector(world.getSector().x, world.getSector().y); + world.sectors.save(); if(!headless){ ui.missions.show(world.getSector()); } @@ -180,7 +180,7 @@ public class Logic extends Module{ EntityQuery.collideGroups(bulletGroup, playerGroup); EntityQuery.collideGroups(playerGroup, playerGroup); - world.pathfinder().update(); + world.pathfinder.update(); } } diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index a53a0152e4..d51689caa1 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -360,7 +360,7 @@ public class Renderer extends RendererModule{ if(world.tile(worldx, worldy) == null) continue; - float value = world.pathfinder().getDebugValue(worldx, worldy); + float value = world.pathfinder.getDebugValue(worldx, worldy); Draw.color(Color.PURPLE); Draw.alpha((value % 10f) / 10f); Lines.square(worldx * tilesize, worldy * tilesize, 4f); diff --git a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java index 52cc4003ec..336e0cb42b 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java @@ -266,11 +266,11 @@ public class MapEditorDialog extends Dialog implements Disposable{ if(name.isEmpty()){ ui.showError("$text.editor.save.noname"); }else{ - Map map = world.maps().getByName(name); + Map map = world.maps.getByName(name); if(map != null && !map.custom){ ui.showError("$text.editor.save.overwrite"); }else{ - world.maps().saveMap(name, editor.getMap(), editor.getTags()); + world.maps.saveMap(name, editor.getMap(), editor.getTags()); ui.showInfoFade("$text.editor.saved"); } } diff --git a/core/src/io/anuke/mindustry/editor/MapLoadDialog.java b/core/src/io/anuke/mindustry/editor/MapLoadDialog.java index a657da6f8b..e557a1fe10 100644 --- a/core/src/io/anuke/mindustry/editor/MapLoadDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapLoadDialog.java @@ -38,8 +38,8 @@ public class MapLoadDialog extends FloatingDialog{ public void rebuild(){ content().clear(); - if(world.maps().all().size > 0){ - selected = world.maps().all().first(); + if(world.maps.all().size > 0){ + selected = world.maps.all().first(); } ButtonGroup group = new ButtonGroup<>(); @@ -55,7 +55,7 @@ public class MapLoadDialog extends FloatingDialog{ ScrollPane pane = new ScrollPane(table, "horizontal"); pane.setFadeScrollBars(false); - for(Map map : world.maps().all()){ + for(Map map : world.maps.all()){ TextButton button = new TextButton(map.getDisplayName(), "toggle"); button.add(new BorderImage(map.texture, 2f)).size(16 * 4f); @@ -67,7 +67,7 @@ public class MapLoadDialog extends FloatingDialog{ if(++i % maxcol == 0) table.row(); } - if(world.maps().all().size == 0){ + if(world.maps.all().size == 0){ pane.setStyle(Core.skin.get("clear", ScrollPaneStyle.class)); table.add("$text.maps.none").center(); }else{ diff --git a/core/src/io/anuke/mindustry/editor/MapSaveDialog.java b/core/src/io/anuke/mindustry/editor/MapSaveDialog.java index 97fafb8884..a8a377b921 100644 --- a/core/src/io/anuke/mindustry/editor/MapSaveDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapSaveDialog.java @@ -24,7 +24,7 @@ public class MapSaveDialog extends FloatingDialog{ shown(() -> { content().clear(); content().label(() -> { - Map map = world.maps().getByName(field.getText()); + Map map = world.maps.getByName(field.getText()); if(map != null){ if(map.custom){ return "$text.editor.overwrite"; @@ -69,7 +69,7 @@ public class MapSaveDialog extends FloatingDialog{ if(field.getText().isEmpty()){ return true; } - Map map = world.maps().getByName(field.getText()); + Map map = world.maps.getByName(field.getText()); return map != null && !map.custom; } } diff --git a/core/src/io/anuke/mindustry/entities/units/GroundUnit.java b/core/src/io/anuke/mindustry/entities/units/GroundUnit.java index 19451d739d..2c918bf266 100644 --- a/core/src/io/anuke/mindustry/entities/units/GroundUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/GroundUnit.java @@ -268,7 +268,7 @@ public abstract class GroundUnit extends BaseUnit{ protected void moveToCore(){ Tile tile = world.tileWorld(x, y); if(tile == null) return; - Tile targetTile = world.pathfinder().getTargetTile(team, tile); + Tile targetTile = world.pathfinder.getTargetTile(team, tile); if(tile == targetTile) return; @@ -288,7 +288,7 @@ public abstract class GroundUnit extends BaseUnit{ Tile tile = world.tileWorld(x, y); if(tile == null) return; - Tile targetTile = world.pathfinder().getTargetTile(enemy, tile); + Tile targetTile = world.pathfinder.getTargetTile(enemy, tile); TileEntity core = getClosestCore(); if(tile == targetTile || core == null || distanceTo(core) < 90f) return; diff --git a/core/src/io/anuke/mindustry/graphics/FloorRenderer.java b/core/src/io/anuke/mindustry/graphics/FloorRenderer.java index 3e82311fa2..84d18664fc 100644 --- a/core/src/io/anuke/mindustry/graphics/FloorRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/FloorRenderer.java @@ -49,7 +49,7 @@ public class FloorRenderer{ @Override public Tile getNearby(int dx, int dy){ Sector sec = world.getSector(); - GenResult result = world.generator().generateTile(sec.x, sec.y, x + dx, y + dy); + GenResult result = world.generator.generateTile(sec.x, sec.y, x + dx, y + dy); gutterNearTile.x = (short)(x + dx); gutterNearTile.y = (short)(y + dy); gutterNearTile.setElevation(result.elevation); @@ -192,7 +192,7 @@ public class FloorRenderer{ Floor floor = null; if(tile == null && sector != null && tilex < world.width() + gutter*2 && tiley < world.height() + gutter*2){ - GenResult result = world.generator().generateTile(sector.x, sector.y, tilex - gutter, tiley - gutter); + GenResult result = world.generator.generateTile(sector.x, sector.y, tilex - gutter, tiley - gutter); floor = (Floor) result.floor; }else if(tile != null){ floor = tile.floor(); @@ -223,7 +223,7 @@ public class FloorRenderer{ if(tile == null){ if(sector != null && tilex < world.width() + gutter*2 && tiley < world.height() + gutter*2){ - GenResult result = world.generator().generateTile(sector.x, sector.y, tilex - gutter, tiley - gutter); + GenResult result = world.generator.generateTile(sector.x, sector.y, tilex - gutter, tiley - gutter); floor = (Floor)result.floor; gutterTile.setFloor(floor); gutterTile.x = (short)(tilex - gutter); diff --git a/core/src/io/anuke/mindustry/io/SaveMeta.java b/core/src/io/anuke/mindustry/io/SaveMeta.java index 22cfbed537..0f527ace6a 100644 --- a/core/src/io/anuke/mindustry/io/SaveMeta.java +++ b/core/src/io/anuke/mindustry/io/SaveMeta.java @@ -27,7 +27,7 @@ public class SaveMeta{ this.timePlayed = timePlayed; this.sector = sector; this.mode = GameMode.values()[mode]; - this.map = world.maps().getByName(map); + this.map = world.maps.getByName(map); this.wave = wave; this.difficulty = difficulty; } diff --git a/core/src/io/anuke/mindustry/io/versions/Save16.java b/core/src/io/anuke/mindustry/io/versions/Save16.java index 8503b7e8ef..52e859635c 100644 --- a/core/src/io/anuke/mindustry/io/versions/Save16.java +++ b/core/src/io/anuke/mindustry/io/versions/Save16.java @@ -42,10 +42,10 @@ public class Save16 extends SaveFileVersion{ byte mode = stream.readByte(); String mapname = stream.readUTF(); - Map map = world.maps().getByName(mapname); + Map map = world.maps.getByName(mapname); world.setMap(map); - world.setSector(world.sectors().get(sector)); + world.setSector(world.sectors.get(sector)); int wave = stream.readInt(); byte difficulty = stream.readByte(); diff --git a/core/src/io/anuke/mindustry/maps/Sectors.java b/core/src/io/anuke/mindustry/maps/Sectors.java index d64f6cbbdd..d5b6e9784d 100644 --- a/core/src/io/anuke/mindustry/maps/Sectors.java +++ b/core/src/io/anuke/mindustry/maps/Sectors.java @@ -52,7 +52,7 @@ public class Sectors{ if(!headless){ sector.saveID = control.saves.addSave("sector-" + sector.packedPosition()).index; } - world.sectors().save(); + world.sectors.save(); world.setSector(sector); sector.currentMission().onBegin(); }else if(SaveIO.breakingVersions.contains(sector.getSave().getBuild())){ @@ -176,7 +176,7 @@ public class Sectors{ //gen tiles in sector for (int x = 0; x < sectorSize; x++) { for (int y = 0; y < sectorSize; y++) { - world.generator().generateTile(result, sx + sector.x, sy + sector.y, x, y, true, null, ores); + world.generator.generateTile(result, sx + sector.x, sy + sector.y, x, y, true, null, ores); newTiles[sx * sectorSize + x][sy * sectorSize + y] = new Tile(x + sx * sectorSize, y + sy*sectorSize, result.floor.id, result.wall.id, (byte)0, (byte)0, result.elevation); } } @@ -340,8 +340,8 @@ public class Sectors{ int toX = x * sectorSize / sectorImageSize; int toY = y * sectorSize / sectorImageSize; - GenResult result = world.generator().generateTile(sector.x, sector.y, toX, toY, false); - world.generator().generateTile(secResult, sector.x, sector.y, toX, ((y+1) * sectorSize / sectorImageSize), false, null, null); + GenResult result = world.generator.generateTile(sector.x, sector.y, toX, toY, false); + world.generator.generateTile(secResult, sector.x, sector.y, toX, ((y+1) * sectorSize / sectorImageSize), false, null, null); int color = ColorMapper.colorFor(result.floor, result.wall, Team.none, result.elevation, secResult.elevation > result.elevation ? (byte)(1 << 6) : (byte)0); pixmap.drawPixel(x, pixmap.getHeight() - 1 - y, color); diff --git a/core/src/io/anuke/mindustry/maps/TutorialSector.java b/core/src/io/anuke/mindustry/maps/TutorialSector.java index 386ece0d75..5e54f0546e 100644 --- a/core/src/io/anuke/mindustry/maps/TutorialSector.java +++ b/core/src/io/anuke/mindustry/maps/TutorialSector.java @@ -49,7 +49,7 @@ public class TutorialSector{ for(int x = 0; x < world.width(); x++){ for(int y = 0; y < world.height(); y++){ Tile tile = world.tile(x, y); - world.generator().generateTile(res, 0, 0, x, y, true, null, ores); + world.generator.generateTile(res, 0, 0, x, y, true, null, ores); if(!tile.hasCliffs()){ tile.setFloor((Floor) res.floor); } diff --git a/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java b/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java index 7a0f892894..e27edb4bce 100644 --- a/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/WorldGenerator.java @@ -187,7 +187,7 @@ public class WorldGenerator{ SeedRandom rnd = new SeedRandom(sector.getSeed()); Generation gena = new Generation(sector, tiles, tiles.length, tiles[0].length, rnd); Array spawnpoints = sector.currentMission().getSpawnPoints(gena); - Array ores = world.sectors().getOres(sector.x, sector.y); + Array ores = world.sectors.getOres(sector.x, sector.y); for(int x = 0; x < width; x++){ for(int y = 0; y < height; y++){ diff --git a/core/src/io/anuke/mindustry/maps/missions/ExpandMission.java b/core/src/io/anuke/mindustry/maps/missions/ExpandMission.java index 660064ff4c..9a3344aec2 100644 --- a/core/src/io/anuke/mindustry/maps/missions/ExpandMission.java +++ b/core/src/io/anuke/mindustry/maps/missions/ExpandMission.java @@ -9,11 +9,11 @@ public class ExpandMission extends ActionMission{ public ExpandMission(int expandX, int expandY){ runner = () -> { if(headless){ - world.sectors().expandSector(world.getSector(), expandX, expandY); + world.sectors.expandSector(world.getSector(), expandX, expandY); done = true; }else{ ui.loadLogic(() -> { - world.sectors().expandSector(world.getSector(), expandX, expandY); + world.sectors.expandSector(world.getSector(), expandX, expandY); done = true; }); } diff --git a/core/src/io/anuke/mindustry/maps/missions/WaveMission.java b/core/src/io/anuke/mindustry/maps/missions/WaveMission.java index 6e65f6c71b..a23e822994 100644 --- a/core/src/io/anuke/mindustry/maps/missions/WaveMission.java +++ b/core/src/io/anuke/mindustry/maps/missions/WaveMission.java @@ -37,7 +37,7 @@ public class WaveMission extends Mission{ public void onBegin(){ super.onBegin(); - world.pathfinder().activateTeamPath(waveTeam); + world.pathfinder.activateTeamPath(waveTeam); } @Override diff --git a/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java index 4e57765124..1ac06c1a9c 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java @@ -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); } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/GenViewDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/GenViewDialog.java index e966a00693..64a8a21bec 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/GenViewDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/GenViewDialog.java @@ -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)); } } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/MapsDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/MapsDialog.java index 3e81f0a3e9..65d6e2717d 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/MapsDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/MapsDialog.java @@ -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(); }); diff --git a/core/src/io/anuke/mindustry/ui/dialogs/RestartDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/RestartDialog.java index c02bdecb5c..1a7707d09b 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/RestartDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/RestartDialog.java @@ -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); } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/SectorsDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/SectorsDialog.java index 7055c00f6e..9c38f552b8 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/SectorsDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/SectorsDialog.java @@ -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; diff --git a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java index 93d8620be6..ab131b512e 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java @@ -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(); }); }); diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index c2b690b067..adb9cac4eb 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -97,8 +97,8 @@ public class ServerControl extends Module{ if(Settings.getBool("shuffle")){ if(world.getSector() == null){ - if(world.maps().all().size > 0){ - Array maps = world.maps().all(); + if(world.maps.all().size > 0){ + Array maps = world.maps.all(); Map previous = world.getMap(); Map map = previous; @@ -179,7 +179,7 @@ public class ServerControl extends Module{ if(arg.length > 0){ String search = arg[0]; - for(Map map : world.maps().all()){ + for(Map map : world.maps.all()){ if(map.name.equalsIgnoreCase(search)) result = map; } @@ -234,7 +234,7 @@ public class ServerControl extends Module{ handler.register("maps", "Display all available maps.", arg -> { info("Maps:"); - for(Map map : world.maps().all()){ + for(Map map : world.maps.all()){ info(" &ly{0}: &lb&fi{1} / {2}x{3}", map.name, map.custom ? "Custom" : "Default", map.meta.width, map.meta.height); } }); @@ -814,13 +814,13 @@ public class ServerControl extends Module{ private void playSectorMap(boolean wait){ int x = Settings.getInt("sector_x"), y = Settings.getInt("sector_y"); - if(world.sectors().get(x, y) == null){ - world.sectors().createSector(x, y); + if(world.sectors.get(x, y) == null){ + world.sectors.createSector(x, y); } - world.sectors().get(x, y).completedMissions = 0; + world.sectors.get(x, y).completedMissions = 0; - play(wait, () -> world.loadSector(world.sectors().get(x, y))); + play(wait, () -> world.loadSector(world.sectors.get(x, y))); } private void play(boolean wait, Runnable run){ @@ -898,8 +898,8 @@ public class ServerControl extends Module{ //all assigned missions are complete if(world.getSector().completedMissions >= world.getSector().missions.size){ Log.info("Mission complete."); - world.sectors().completeSector(world.getSector().x, world.getSector().y); - world.sectors().save(); + world.sectors.completeSector(world.getSector().x, world.getSector().y); + world.sectors.save(); gameOvers = 0; inExtraRound = true; Settings.putInt("sector_x", world.getSector().x + world.getSector().size); diff --git a/tests/src/test/java/ApplicationTests.java b/tests/src/test/java/ApplicationTests.java index 6687284282..435541b852 100644 --- a/tests/src/test/java/ApplicationTests.java +++ b/tests/src/test/java/ApplicationTests.java @@ -105,20 +105,20 @@ public class ApplicationTests{ @Test void loadSector(){ - world.sectors().createSector(0, 0); - world.sectors().playSector(world.sectors().get(0, 0)); + world.sectors.createSector(0, 0); + world.sectors.playSector(world.sectors.get(0, 0)); } @Test void playMap(){ - assertTrue(world.maps().all().size > 0); + assertTrue(world.maps.all().size > 0); - world.loadMap(world.maps().all().first()); + world.loadMap(world.maps.all().first()); } @Test void spawnWaves(){ - world.loadMap(world.maps().all().first()); + world.loadMap(world.maps.all().first()); logic.runWave(); unitGroups[waveTeam.ordinal()].updateEvents(); assertFalse(unitGroups[waveTeam.ordinal()].isEmpty()); @@ -126,7 +126,7 @@ public class ApplicationTests{ @Test void createMap(){ - assertTrue(world.maps().all().size > 0); + assertTrue(world.maps.all().size > 0); Tile[][] tiles = world.createTiles(8, 8); @@ -182,17 +182,17 @@ public class ApplicationTests{ @Test void save(){ - assertTrue(world.maps().all().size > 0); + assertTrue(world.maps.all().size > 0); - world.loadMap(world.maps().all().first()); + world.loadMap(world.maps.all().first()); SaveIO.saveToSlot(0); } @Test void load(){ - assertTrue(world.maps().all().size > 0); + assertTrue(world.maps.all().size > 0); - world.loadMap(world.maps().all().first()); + world.loadMap(world.maps.all().first()); Map map = world.getMap(); SaveIO.saveToSlot(0);