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