Fixed #6, removed save folder from repository
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
/deploy/
|
/deploy/
|
||||||
/desktop/packr-out/
|
/desktop/packr-out/
|
||||||
/desktop/packr-export/
|
/desktop/packr-export/
|
||||||
|
/desktop/mindustry-saves/
|
||||||
/core/lib/
|
/core/lib/
|
||||||
*.gif
|
*.gif
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,10 @@ public class Control extends Module{
|
|||||||
"pause", Keys.SPACE
|
"pause", Keys.SPACE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
for(int i = 0; i < Vars.saveSlots; i ++){
|
||||||
|
Settings.defaults("saveslot" + i, "empty");
|
||||||
|
}
|
||||||
|
|
||||||
Settings.loadAll("io.anuke.moment");
|
Settings.loadAll("io.anuke.moment");
|
||||||
|
|
||||||
for(Map map : Map.values()){
|
for(Map map : Map.values()){
|
||||||
|
|||||||
@@ -291,23 +291,28 @@ public class Renderer extends RendererModule{
|
|||||||
Graphics.surface("shadow");
|
Graphics.surface("shadow");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean expand = l >= 2;
|
||||||
|
int expandr = (expand ? 4 : 0);
|
||||||
|
|
||||||
if(l == 1){
|
if(l == 1){
|
||||||
Graphics.end();
|
Graphics.end();
|
||||||
drawCache(1, crangex, crangey);
|
drawCache(1, crangex, crangey);
|
||||||
Graphics.begin();
|
Graphics.begin();
|
||||||
}else{
|
}else{
|
||||||
for(int x = -rangex; x <= rangex; x++){
|
for(int x = -rangex - expandr; x <= rangex + expandr; x++){
|
||||||
for(int y = -rangey; y <= rangey; y++){
|
for(int y = -rangey - expandr; y <= rangey + expandr; y++){
|
||||||
int worldx = Mathf.scl(camera.position.x, tilesize) + x;
|
int worldx = Mathf.scl(camera.position.x, tilesize) + x;
|
||||||
int worldy = Mathf.scl(camera.position.y, tilesize) + y;
|
int worldy = Mathf.scl(camera.position.y, tilesize) + y;
|
||||||
|
boolean expanded = (x < -rangex || x > rangex || y < -rangey || y > rangey);
|
||||||
|
|
||||||
if(world.tile(worldx, worldy) != null){
|
if(world.tile(worldx, worldy) != null){
|
||||||
Tile tile = world.tile(worldx, worldy);
|
Tile tile = world.tile(worldx, worldy);
|
||||||
if(l == 0){
|
if(l == 0 && !expanded){
|
||||||
if(tile.block() != Blocks.air && world.isAccessible(worldx, worldy)){
|
if(tile.block() != Blocks.air && world.isAccessible(worldx, worldy)){
|
||||||
tile.block().drawShadow(tile);
|
tile.block().drawShadow(tile);
|
||||||
}
|
}
|
||||||
}else if(!(tile.block() instanceof StaticBlock)){
|
}else if(!(tile.block() instanceof StaticBlock) &&
|
||||||
|
!expanded || tile.block().expanded){
|
||||||
if(l == 2){
|
if(l == 2){
|
||||||
tile.block().draw(tile);
|
tile.block().draw(tile);
|
||||||
}else if(l == 3){
|
}else if(l == 3){
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ public class SaveIO{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO GWT support
|
||||||
public static void load(FileHandle file){
|
public static void load(FileHandle file){
|
||||||
|
|
||||||
try(DataInputStream stream = new DataInputStream(file.read())){
|
try(DataInputStream stream = new DataInputStream(file.read())){
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ public class Block{
|
|||||||
public String description;
|
public String description;
|
||||||
/**Detailed description of the block. Can be as long as necesary.*/
|
/**Detailed description of the block. Can be as long as necesary.*/
|
||||||
public String fullDescription;
|
public String fullDescription;
|
||||||
|
/**Whether to draw this block in the expanded draw range.*/
|
||||||
|
public boolean expanded = false;
|
||||||
|
|
||||||
public Block(String name) {
|
public Block(String name) {
|
||||||
blocks.add(this);
|
blocks.add(this);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class Generator extends PowerBlock{
|
|||||||
|
|
||||||
public Generator(String name){
|
public Generator(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
expanded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user