This commit is contained in:
Anuken
2018-11-01 09:09:12 -04:00
parent 9a1bb69cd8
commit 8bf68aa020
4 changed files with 11 additions and 18 deletions

View File

@@ -21,6 +21,7 @@ text.level.highscore = High Score\: [accent]{0}
text.level.delete.title = Confirm Delete text.level.delete.title = Confirm Delete
text.map.delete = Are you sure you want to delete the map "[orange]{0}[]"? text.map.delete = Are you sure you want to delete the map "[orange]{0}[]"?
text.level.select = Level Select text.level.select = Level Select
text.filename = File Name\:
text.level.mode = Gamemode\: text.level.mode = Gamemode\:
text.construction.desktop = To deselect a block or stop building, [accent]use space[]. text.construction.desktop = To deselect a block or stop building, [accent]use space[].
text.construction.title = Block Construction Guide text.construction.title = Block Construction Guide
@@ -628,6 +629,7 @@ block.rtg-generator.name = RTG Generator
block.spectre.name = Spectre block.spectre.name = Spectre
block.meltdown.name = Meltdown block.meltdown.name = Meltdown
block.container.name = Container block.container.name = Container
block.core.description = The most important building in the game.
team.blue.name = blue team.blue.name = blue
team.red.name = red team.red.name = red
team.orange.name = orange team.orange.name = orange
@@ -672,5 +674,3 @@ tutorial.daggerfactory = Construct a[accent] dagger mech factory.[]\n\nThis will
tutorial.router = Factories need resources to function.\nCreate a router to split conveyor resources. tutorial.router = Factories need resources to function.\nCreate a router to split conveyor resources.
tutorial.dagger = Link power nodes to the factory.\nOnce requirements are met, a mech will be created.\n\nCreate more drills, generators and conveyors as necessary. tutorial.dagger = Link power nodes to the factory.\nOnce requirements are met, a mech will be created.\n\nCreate more drills, generators and conveyors as necessary.
tutorial.battle = The[LIGHT_GRAY] enemy[] has revealed their core.\nDestroy it with your unit and dagger mechs. tutorial.battle = The[LIGHT_GRAY] enemy[] has revealed their core.\nDestroy it with your unit and dagger mechs.
block.core.description = The most important building in the game.
text.filename = File Name\:

View File

@@ -2,7 +2,6 @@ package io.anuke.mindustry.maps;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.IntArray;
import io.anuke.annotations.Annotations.Serialize; import io.anuke.annotations.Annotations.Serialize;
import io.anuke.mindustry.game.Saves.SaveSlot; import io.anuke.mindustry.game.Saves.SaveSlot;
import io.anuke.mindustry.game.SpawnGroup; import io.anuke.mindustry.game.SpawnGroup;
@@ -25,8 +24,6 @@ public class Sector{
public int saveID = -1; public int saveID = -1;
/**Num of missions in this sector that have been completed so far.*/ /**Num of missions in this sector that have been completed so far.*/
public int completedMissions; public int completedMissions;
/**List of links to other sector coords.*/
public IntArray links = new IntArray();
/**Display texture. Needs to be disposed.*/ /**Display texture. Needs to be disposed.*/
public transient Texture texture; public transient Texture texture;

View File

@@ -35,7 +35,7 @@ public class Sectors{
private final GridMap<Sector> grid = new GridMap<>(); private final GridMap<Sector> grid = new GridMap<>();
private final SectorPresets presets = new SectorPresets(); private final SectorPresets presets = new SectorPresets();
private final Array<Item> allOres = Item.getAllOres(); private final Array<Item> allOres = Item.getAllOres();
private AsyncExecutor executor = new AsyncExecutor(6); private final AsyncExecutor executor = new AsyncExecutor(6);
public void playSector(Sector sector){ public void playSector(Sector sector){
if(sector.hasSave() && SaveIO.breakingVersions.contains(sector.getSave().getBuild())){ if(sector.hasSave() && SaveIO.breakingVersions.contains(sector.getSave().getBuild())){
@@ -109,6 +109,7 @@ public class Sectors{
for(GridPoint2 g : Geometry.d4){ for(GridPoint2 g : Geometry.d4){
createSector(x + g.x, y + g.y); createSector(x + g.x, y + g.y);
Sector other = grid.get(x + g.x, y + g.y);
} }
} }

View File

@@ -139,42 +139,37 @@ public class SectorsDialog extends FloatingDialog{
float drawY = y + height/2f + sectorY * padSectorSize - offsetY * padSectorSize - panY % padSectorSize + padSectorSize/2f; float drawY = y + height/2f + sectorY * padSectorSize - offsetY * padSectorSize - panY % padSectorSize + padSectorSize/2f;
Sector sector = world.sectors.get(sectorX, sectorY); Sector sector = world.sectors.get(sectorX, sectorY);
int width = 1;
int height = 1;
if(sector == null || sector.texture == null){ if(sector == null || sector.texture == null){
Draw.color(Color.DARK_GRAY); Draw.color(Color.DARK_GRAY);
Draw.rect(Draw.getBlankRegion(), drawX, drawY, sectorSize * width + 1f, sectorSize * height + 1f); Draw.rect(Draw.getBlankRegion(), drawX, drawY, sectorSize + 1f, sectorSize + 1f);
continue; continue;
} }
Draw.colorl(!sector.complete ? 0.3f : 1f); Draw.colorl(!sector.complete ? 0.3f : 1f);
Draw.rect(sector.texture, drawX, drawY, sectorSize * width + 1f, sectorSize * height + 1f); Draw.rect(sector.texture, drawX, drawY, sectorSize + 1f, sectorSize + 1f);
if(sector.missions.size == 0) continue; Draw.color(Palette.place);
Draw.color(Color.DARK_GRAY);
Fill.square(drawX, drawY - 5f, Unit.dp.scl(10f), 45f);
if(sector == selected){ if(sector == selected){
Draw.color(Palette.place); Draw.color(Palette.place);
}else if(Mathf.inRect(mouse.x, mouse.y, drawX - padSectorSize/2f * width, drawY - padSectorSize/2f * height, }else if(Mathf.inRect(mouse.x, mouse.y, drawX - padSectorSize / 2f, drawY - padSectorSize / 2f,
drawX + padSectorSize/2f * width, drawY + padSectorSize/2f * height)){ drawX + padSectorSize / 2f, drawY + padSectorSize / 2f)){
if(clicked){ if(clicked){
selectSector(sector); selectSector(sector);
} }
Draw.color(Palette.remove); Draw.color(Palette.remove);
}else if (sector.complete){ }else if(sector.complete){
Draw.color(Palette.accent); Draw.color(Palette.accent);
}else{ }else{
Draw.color(Color.LIGHT_GRAY); Draw.color(Color.LIGHT_GRAY);
} }
Fill.square(drawX, drawY, Unit.dp.scl(10f), 45f); Fill.square(drawX, drawY, Unit.dp.scl(10f), 45f);
//Lines.crect(drawX, drawY, sectorSize * width + paddingx, sectorSize * height + paddingy, 0);
} }
} }
Draw.color(Color.GRAY); Draw.color(Color.GRAY);
Lines.stroke(Unit.dp.scl(4f)); Lines.stroke(Unit.dp.scl(4f));
//Lines.crect(x + width/2f, y + height/2f, width, height); //Lines.crect(x + width/2f, y + height/2f, width, height);