Fixed build errors

This commit is contained in:
Anuken
2018-10-08 17:02:16 -04:00
parent f7bd376499
commit 0b168376ed
23 changed files with 65 additions and 65 deletions

View File

@@ -156,7 +156,7 @@ public class WaveSpawner{
for(int y = quady * quadsize; y < world.height() && y < (quady + 1) * quadsize; y++){ for(int y = quady * quadsize; y < world.height() && y < (quady + 1) * quadsize; y++){
Tile tile = world.tile(x, 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); setQuad(quadx, quady, false);
break outer; break outer;
} }

View File

@@ -100,15 +100,15 @@ public class Logic extends Module{
state.mode = world.getSector().currentMission().getMode(); state.mode = world.getSector().currentMission().getMode();
world.getSector().currentMission().onBegin(); world.getSector().currentMission().onBegin();
world.sectors().save(); world.sectors.save();
} }
//check if all assigned missions are complete //check if all assigned missions are complete
if(!world.getSector().complete && world.getSector().completedMissions >= world.getSector().missions.size){ if(!world.getSector().complete && world.getSector().completedMissions >= world.getSector().missions.size){
state.mode = GameMode.victory; state.mode = GameMode.victory;
world.sectors().completeSector(world.getSector().x, world.getSector().y); world.sectors.completeSector(world.getSector().x, world.getSector().y);
world.sectors().save(); world.sectors.save();
if(!headless){ if(!headless){
ui.missions.show(world.getSector()); ui.missions.show(world.getSector());
} }
@@ -180,7 +180,7 @@ public class Logic extends Module{
EntityQuery.collideGroups(bulletGroup, playerGroup); EntityQuery.collideGroups(bulletGroup, playerGroup);
EntityQuery.collideGroups(playerGroup, playerGroup); EntityQuery.collideGroups(playerGroup, playerGroup);
world.pathfinder().update(); world.pathfinder.update();
} }
} }

View File

@@ -360,7 +360,7 @@ public class Renderer extends RendererModule{
if(world.tile(worldx, worldy) == null) continue; 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.color(Color.PURPLE);
Draw.alpha((value % 10f) / 10f); Draw.alpha((value % 10f) / 10f);
Lines.square(worldx * tilesize, worldy * tilesize, 4f); Lines.square(worldx * tilesize, worldy * tilesize, 4f);

View File

@@ -266,11 +266,11 @@ public class MapEditorDialog extends Dialog implements Disposable{
if(name.isEmpty()){ if(name.isEmpty()){
ui.showError("$text.editor.save.noname"); ui.showError("$text.editor.save.noname");
}else{ }else{
Map map = world.maps().getByName(name); Map map = world.maps.getByName(name);
if(map != null && !map.custom){ if(map != null && !map.custom){
ui.showError("$text.editor.save.overwrite"); ui.showError("$text.editor.save.overwrite");
}else{ }else{
world.maps().saveMap(name, editor.getMap(), editor.getTags()); world.maps.saveMap(name, editor.getMap(), editor.getTags());
ui.showInfoFade("$text.editor.saved"); ui.showInfoFade("$text.editor.saved");
} }
} }

View File

@@ -38,8 +38,8 @@ public class MapLoadDialog extends FloatingDialog{
public void rebuild(){ public void rebuild(){
content().clear(); content().clear();
if(world.maps().all().size > 0){ if(world.maps.all().size > 0){
selected = world.maps().all().first(); selected = world.maps.all().first();
} }
ButtonGroup<TextButton> group = new ButtonGroup<>(); ButtonGroup<TextButton> group = new ButtonGroup<>();
@@ -55,7 +55,7 @@ public class MapLoadDialog extends FloatingDialog{
ScrollPane pane = new ScrollPane(table, "horizontal"); ScrollPane pane = new ScrollPane(table, "horizontal");
pane.setFadeScrollBars(false); pane.setFadeScrollBars(false);
for(Map map : world.maps().all()){ for(Map map : world.maps.all()){
TextButton button = new TextButton(map.getDisplayName(), "toggle"); TextButton button = new TextButton(map.getDisplayName(), "toggle");
button.add(new BorderImage(map.texture, 2f)).size(16 * 4f); 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(++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)); pane.setStyle(Core.skin.get("clear", ScrollPaneStyle.class));
table.add("$text.maps.none").center(); table.add("$text.maps.none").center();
}else{ }else{

View File

@@ -24,7 +24,7 @@ public class MapSaveDialog extends FloatingDialog{
shown(() -> { shown(() -> {
content().clear(); content().clear();
content().label(() -> { content().label(() -> {
Map map = world.maps().getByName(field.getText()); Map map = world.maps.getByName(field.getText());
if(map != null){ if(map != null){
if(map.custom){ if(map.custom){
return "$text.editor.overwrite"; return "$text.editor.overwrite";
@@ -69,7 +69,7 @@ public class MapSaveDialog extends FloatingDialog{
if(field.getText().isEmpty()){ if(field.getText().isEmpty()){
return true; return true;
} }
Map map = world.maps().getByName(field.getText()); Map map = world.maps.getByName(field.getText());
return map != null && !map.custom; return map != null && !map.custom;
} }
} }

View File

@@ -268,7 +268,7 @@ public abstract class GroundUnit extends BaseUnit{
protected void moveToCore(){ protected void moveToCore(){
Tile tile = world.tileWorld(x, y); Tile tile = world.tileWorld(x, y);
if(tile == null) return; if(tile == null) return;
Tile targetTile = world.pathfinder().getTargetTile(team, tile); Tile targetTile = world.pathfinder.getTargetTile(team, tile);
if(tile == targetTile) return; if(tile == targetTile) return;
@@ -288,7 +288,7 @@ public abstract class GroundUnit extends BaseUnit{
Tile tile = world.tileWorld(x, y); Tile tile = world.tileWorld(x, y);
if(tile == null) return; if(tile == null) return;
Tile targetTile = world.pathfinder().getTargetTile(enemy, tile); Tile targetTile = world.pathfinder.getTargetTile(enemy, tile);
TileEntity core = getClosestCore(); TileEntity core = getClosestCore();
if(tile == targetTile || core == null || distanceTo(core) < 90f) return; if(tile == targetTile || core == null || distanceTo(core) < 90f) return;

View File

@@ -49,7 +49,7 @@ public class FloorRenderer{
@Override @Override
public Tile getNearby(int dx, int dy){ public Tile getNearby(int dx, int dy){
Sector sec = world.getSector(); 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.x = (short)(x + dx);
gutterNearTile.y = (short)(y + dy); gutterNearTile.y = (short)(y + dy);
gutterNearTile.setElevation(result.elevation); gutterNearTile.setElevation(result.elevation);
@@ -192,7 +192,7 @@ public class FloorRenderer{
Floor floor = null; Floor floor = null;
if(tile == null && sector != null && tilex < world.width() + gutter*2 && tiley < world.height() + gutter*2){ 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; floor = (Floor) result.floor;
}else if(tile != null){ }else if(tile != null){
floor = tile.floor(); floor = tile.floor();
@@ -223,7 +223,7 @@ public class FloorRenderer{
if(tile == null){ if(tile == null){
if(sector != null && tilex < world.width() + gutter*2 && tiley < world.height() + gutter*2){ 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; floor = (Floor)result.floor;
gutterTile.setFloor(floor); gutterTile.setFloor(floor);
gutterTile.x = (short)(tilex - gutter); gutterTile.x = (short)(tilex - gutter);

View File

@@ -27,7 +27,7 @@ public class SaveMeta{
this.timePlayed = timePlayed; this.timePlayed = timePlayed;
this.sector = sector; this.sector = sector;
this.mode = GameMode.values()[mode]; this.mode = GameMode.values()[mode];
this.map = world.maps().getByName(map); this.map = world.maps.getByName(map);
this.wave = wave; this.wave = wave;
this.difficulty = difficulty; this.difficulty = difficulty;
} }

View File

@@ -42,10 +42,10 @@ public class Save16 extends SaveFileVersion{
byte mode = stream.readByte(); byte mode = stream.readByte();
String mapname = stream.readUTF(); String mapname = stream.readUTF();
Map map = world.maps().getByName(mapname); Map map = world.maps.getByName(mapname);
world.setMap(map); world.setMap(map);
world.setSector(world.sectors().get(sector)); world.setSector(world.sectors.get(sector));
int wave = stream.readInt(); int wave = stream.readInt();
byte difficulty = stream.readByte(); byte difficulty = stream.readByte();

View File

@@ -52,7 +52,7 @@ public class Sectors{
if(!headless){ if(!headless){
sector.saveID = control.saves.addSave("sector-" + sector.packedPosition()).index; sector.saveID = control.saves.addSave("sector-" + sector.packedPosition()).index;
} }
world.sectors().save(); world.sectors.save();
world.setSector(sector); world.setSector(sector);
sector.currentMission().onBegin(); sector.currentMission().onBegin();
}else if(SaveIO.breakingVersions.contains(sector.getSave().getBuild())){ }else if(SaveIO.breakingVersions.contains(sector.getSave().getBuild())){
@@ -176,7 +176,7 @@ public class Sectors{
//gen tiles in sector //gen tiles in sector
for (int x = 0; x < sectorSize; x++) { for (int x = 0; x < sectorSize; x++) {
for (int y = 0; y < sectorSize; y++) { 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); 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 toX = x * sectorSize / sectorImageSize;
int toY = y * sectorSize / sectorImageSize; int toY = y * sectorSize / sectorImageSize;
GenResult result = world.generator().generateTile(sector.x, sector.y, toX, toY, false); 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); 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); 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); pixmap.drawPixel(x, pixmap.getHeight() - 1 - y, color);

View File

@@ -49,7 +49,7 @@ public class TutorialSector{
for(int x = 0; x < world.width(); x++){ for(int x = 0; x < world.width(); x++){
for(int y = 0; y < world.height(); y++){ for(int y = 0; y < world.height(); y++){
Tile tile = world.tile(x, 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()){ if(!tile.hasCliffs()){
tile.setFloor((Floor) res.floor); tile.setFloor((Floor) res.floor);
} }

View File

@@ -187,7 +187,7 @@ public class WorldGenerator{
SeedRandom rnd = new SeedRandom(sector.getSeed()); SeedRandom rnd = new SeedRandom(sector.getSeed());
Generation gena = new Generation(sector, tiles, tiles.length, tiles[0].length, rnd); Generation gena = new Generation(sector, tiles, tiles.length, tiles[0].length, rnd);
Array<GridPoint2> spawnpoints = sector.currentMission().getSpawnPoints(gena); Array<GridPoint2> spawnpoints = sector.currentMission().getSpawnPoints(gena);
Array<Item> ores = world.sectors().getOres(sector.x, sector.y); Array<Item> ores = world.sectors.getOres(sector.x, sector.y);
for(int x = 0; x < width; x++){ for(int x = 0; x < width; x++){
for(int y = 0; y < height; y++){ for(int y = 0; y < height; y++){

View File

@@ -9,11 +9,11 @@ public class ExpandMission extends ActionMission{
public ExpandMission(int expandX, int expandY){ public ExpandMission(int expandX, int expandY){
runner = () -> { runner = () -> {
if(headless){ if(headless){
world.sectors().expandSector(world.getSector(), expandX, expandY); world.sectors.expandSector(world.getSector(), expandX, expandY);
done = true; done = true;
}else{ }else{
ui.loadLogic(() -> { ui.loadLogic(() -> {
world.sectors().expandSector(world.getSector(), expandX, expandY); world.sectors.expandSector(world.getSector(), expandX, expandY);
done = true; done = true;
}); });
} }

View File

@@ -37,7 +37,7 @@ public class WaveMission extends Mission{
public void onBegin(){ public void onBegin(){
super.onBegin(); super.onBegin();
world.pathfinder().activateTeamPath(waveTeam); world.pathfinder.activateTeamPath(waveTeam);
} }
@Override @Override

View File

@@ -84,7 +84,7 @@ public class CustomGameDialog extends FloatingDialog{
float images = 146f; float images = 146f;
int i = 0; int i = 0;
for(Map map : world.maps().all()){ for(Map map : world.maps.all()){
if(i % maxwidth == 0){ if(i % maxwidth == 0){
maps.row(); maps.row();
@@ -112,7 +112,7 @@ public class CustomGameDialog extends FloatingDialog{
i++; i++;
} }
if(world.maps().all().size == 0){ if(world.maps.all().size == 0){
maps.add("$text.maps.none").pad(50); 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); Pixmap pixmap = new Pixmap(sectorSize, sectorSize, Format.RGBA8888);
for(int i = 0; i < sectorSize; i++){ for(int i = 0; i < sectorSize; i++){
for(int j = 0; j < sectorSize; j++){ 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)); 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()); 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)); 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", () -> { ui.showConfirm("$text.confirm", "$text.editor.overwrite.confirm", () -> {
world.maps().saveMap(name, data, meta.tags); world.maps.saveMap(name, data, meta.tags);
setup(); setup();
}); });
}else{ }else{
world.maps().saveMap(name, data, meta.tags); world.maps.saveMap(name, data, meta.tags);
setup(); setup();
} }
@@ -80,7 +80,7 @@ public class MapsDialog extends FloatingDialog{
float mapsize = 200f; float mapsize = 200f;
int i = 0; int i = 0;
for(Map map : world.maps().all()){ for(Map map : world.maps.all()){
if(i % maxwidth == 0){ if(i % maxwidth == 0){
maps.row(); maps.row();
@@ -100,7 +100,7 @@ public class MapsDialog extends FloatingDialog{
i++; i++;
} }
if(world.maps().all().size == 0){ if(world.maps.all().size == 0){
maps.add("$text.maps.none"); maps.add("$text.maps.none");
} }
@@ -154,7 +154,7 @@ public class MapsDialog extends FloatingDialog{
table.addImageTextButton("$text.delete", "icon-trash-16", "clear", 16 * 2, () -> { table.addImageTextButton("$text.delete", "icon-trash-16", "clear", 16 * 2, () -> {
ui.showConfirm("$text.confirm", Bundles.format("text.map.delete", map.name), () -> { ui.showConfirm("$text.confirm", Bundles.format("text.map.delete", map.name), () -> {
world.maps().removeMap(map); world.maps.removeMap(map);
dialog.hide(); dialog.hide();
setup(); setup();
}); });

View File

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

View File

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

View File

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

View File

@@ -97,8 +97,8 @@ public class ServerControl extends Module{
if(Settings.getBool("shuffle")){ if(Settings.getBool("shuffle")){
if(world.getSector() == null){ if(world.getSector() == null){
if(world.maps().all().size > 0){ if(world.maps.all().size > 0){
Array<Map> maps = world.maps().all(); Array<Map> maps = world.maps.all();
Map previous = world.getMap(); Map previous = world.getMap();
Map map = previous; Map map = previous;
@@ -179,7 +179,7 @@ public class ServerControl extends Module{
if(arg.length > 0){ if(arg.length > 0){
String search = arg[0]; String search = arg[0];
for(Map map : world.maps().all()){ for(Map map : world.maps.all()){
if(map.name.equalsIgnoreCase(search)) result = map; if(map.name.equalsIgnoreCase(search)) result = map;
} }
@@ -234,7 +234,7 @@ public class ServerControl extends Module{
handler.register("maps", "Display all available maps.", arg -> { handler.register("maps", "Display all available maps.", arg -> {
info("Maps:"); 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); 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){ private void playSectorMap(boolean wait){
int x = Settings.getInt("sector_x"), y = Settings.getInt("sector_y"); int x = Settings.getInt("sector_x"), y = Settings.getInt("sector_y");
if(world.sectors().get(x, y) == null){ if(world.sectors.get(x, y) == null){
world.sectors().createSector(x, y); 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){ private void play(boolean wait, Runnable run){
@@ -898,8 +898,8 @@ public class ServerControl extends Module{
//all assigned missions are complete //all assigned missions are complete
if(world.getSector().completedMissions >= world.getSector().missions.size){ if(world.getSector().completedMissions >= world.getSector().missions.size){
Log.info("Mission complete."); Log.info("Mission complete.");
world.sectors().completeSector(world.getSector().x, world.getSector().y); world.sectors.completeSector(world.getSector().x, world.getSector().y);
world.sectors().save(); world.sectors.save();
gameOvers = 0; gameOvers = 0;
inExtraRound = true; inExtraRound = true;
Settings.putInt("sector_x", world.getSector().x + world.getSector().size); Settings.putInt("sector_x", world.getSector().x + world.getSector().size);

View File

@@ -105,20 +105,20 @@ public class ApplicationTests{
@Test @Test
void loadSector(){ void loadSector(){
world.sectors().createSector(0, 0); world.sectors.createSector(0, 0);
world.sectors().playSector(world.sectors().get(0, 0)); world.sectors.playSector(world.sectors.get(0, 0));
} }
@Test @Test
void playMap(){ 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 @Test
void spawnWaves(){ void spawnWaves(){
world.loadMap(world.maps().all().first()); world.loadMap(world.maps.all().first());
logic.runWave(); logic.runWave();
unitGroups[waveTeam.ordinal()].updateEvents(); unitGroups[waveTeam.ordinal()].updateEvents();
assertFalse(unitGroups[waveTeam.ordinal()].isEmpty()); assertFalse(unitGroups[waveTeam.ordinal()].isEmpty());
@@ -126,7 +126,7 @@ public class ApplicationTests{
@Test @Test
void createMap(){ void createMap(){
assertTrue(world.maps().all().size > 0); assertTrue(world.maps.all().size > 0);
Tile[][] tiles = world.createTiles(8, 8); Tile[][] tiles = world.createTiles(8, 8);
@@ -182,17 +182,17 @@ public class ApplicationTests{
@Test @Test
void save(){ 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); SaveIO.saveToSlot(0);
} }
@Test @Test
void load(){ 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(); Map map = world.getMap();
SaveIO.saveToSlot(0); SaveIO.saveToSlot(0);