Anuken/Mindustry-Suggestions/issues/548
This commit is contained in:
@@ -78,7 +78,6 @@ public class Saves{
|
||||
}
|
||||
|
||||
public void update(){
|
||||
SaveSlot current = this.current;
|
||||
|
||||
if(current != null && state.isGame()
|
||||
&& !(state.isPaused() && Core.scene.hasDialog())){
|
||||
@@ -93,14 +92,13 @@ public class Saves{
|
||||
if(time > Core.settings.getInt("saveinterval") * 60){
|
||||
saving = true;
|
||||
|
||||
Time.runTask(2f, () -> {
|
||||
try{
|
||||
current.save();
|
||||
}catch(Throwable e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
saving = false;
|
||||
});
|
||||
try{
|
||||
current.save();
|
||||
}catch(Throwable e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Time.runTask(3f, () -> saving = false);
|
||||
|
||||
time = 0;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Build{
|
||||
result.beforePlaceBegan(tile, previous);
|
||||
|
||||
tile.setBlock(sub, team, rotation);
|
||||
tile.<ConstructBuild>bc().setConstruct(previous, result);
|
||||
tile.<ConstructBuild>bc().setConstruct(previous.size == sub.size ? previous : Blocks.air, result);
|
||||
|
||||
result.placeBegan(tile, previous);
|
||||
|
||||
@@ -91,7 +91,7 @@ public class Build{
|
||||
}
|
||||
|
||||
if(type.isMultiblock()){
|
||||
if((type.canReplace(tile.block()) || (tile.block instanceof ConstructBlock && tile.<ConstructBuild>bc().cblock == type)) &&
|
||||
if(((type.canReplace(tile.block()) || tile.block.alwaysReplace) || (tile.block instanceof ConstructBlock && tile.<ConstructBuild>bc().cblock == type)) &&
|
||||
type.canPlaceOn(tile, team) && tile.interactable(team)){
|
||||
|
||||
//if the block can be replaced but the sizes differ, check all the spaces around the block to make sure it can fit
|
||||
@@ -105,7 +105,7 @@ public class Build{
|
||||
int wx = dx + offsetx + x, wy = dy + offsety + y;
|
||||
|
||||
Tile check = world.tile(wx, wy);
|
||||
if(check == null || (!check.block.alwaysReplace && check.block != tile.block)) return false;
|
||||
if(check == null || (!check.block.alwaysReplace && check.block != tile.block && !(check.block.size == 1 && type.canReplace(check.block)))) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Wall extends Block{
|
||||
|
||||
@Override
|
||||
public boolean canReplace(Block other){
|
||||
return super.canReplace(other) && health > other.health && size == other.size;
|
||||
return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && health > other.health && size >= other.size;
|
||||
}
|
||||
|
||||
public class WallBuild extends Building{
|
||||
|
||||
Reference in New Issue
Block a user