Added expandSector method

This commit is contained in:
Anuken
2018-09-21 08:47:37 -04:00
parent 4ba46bff69
commit 950f4a9f1a
2 changed files with 11 additions and 1 deletions

View File

@ -16,7 +16,7 @@ import java.util.zip.InflaterInputStream;
import static io.anuke.mindustry.Vars.*; import static io.anuke.mindustry.Vars.*;
public class SaveIO{ public class SaveIO{
public static final IntArray breakingVersions = IntArray.with(47, 48, 49, 50, 51, 52); public static final IntArray breakingVersions = IntArray.with(47, 48, 49, 50, 51, 52, 53, 54, 55, 56);
public static final IntMap<SaveFileVersion> versions = new IntMap<>(); public static final IntMap<SaveFileVersion> versions = new IntMap<>();
public static final Array<SaveFileVersion> versionArray = Array.with( public static final Array<SaveFileVersion> versionArray = Array.with(
new Save16() new Save16()

View File

@ -69,6 +69,16 @@ public class Sectors{
return grid.get(Bits.getLeftShort(position), Bits.getRightShort(position)); return grid.get(Bits.getLeftShort(position), Bits.getRightShort(position));
} }
/**Tries to a sector in a specific direciton, specified by expandX and expandY.
* If a sector is in that direction, this method will return false (failure)
* @param sector the sector to expand
* @param expandX spaces in X coordinate to expand, can be negative
* @param expandY spaces in Y coordinate to expand, can be negative*/
public boolean expandSector(Sector sector, int expandX, int expandY){
return false;
}
/**Unlocks a sector. This shows nearby sectors.*/ /**Unlocks a sector. This shows nearby sectors.*/
public void completeSector(int x, int y){ public void completeSector(int x, int y){
createSector(x, y); createSector(x, y);