Fixed power distributors connecting to generators, wrong save extension
This commit is contained in:
@@ -88,6 +88,11 @@ public class Recipes implements ContentList{
|
||||
new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 150), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 100));
|
||||
|
||||
//UNITS
|
||||
|
||||
//bodies
|
||||
//new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
|
||||
|
||||
//actual unit related stuff
|
||||
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
|
||||
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 20));
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.io;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.async.AsyncExecutor;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.game.Difficulty;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
@@ -169,8 +168,8 @@ public class Saves {
|
||||
|
||||
public void exportFile(FileHandle file) throws IOException{
|
||||
try{
|
||||
if(!file.extension().equals("mins")){
|
||||
file = file.parent().child(file.nameWithoutExtension() + "." + Vars.saveExtension);
|
||||
if(!file.extension().equals(saveExtension)){
|
||||
file = file.parent().child(file.nameWithoutExtension() + "." + saveExtension);
|
||||
}
|
||||
SaveIO.fileFor(index).copyTo(file);
|
||||
}catch (Exception e){
|
||||
|
||||
@@ -95,7 +95,7 @@ public class LoadDialog extends FloatingDialog{
|
||||
} catch (IOException e) {
|
||||
ui.showError(Bundles.format("text.save.export.fail", Strings.parseException(e, false)));
|
||||
}
|
||||
}, false, "mins");
|
||||
}, false, saveExtension);
|
||||
}else{
|
||||
try {
|
||||
FileHandle file = Gdx.files.local("save-" + slot.getName() + "." + Vars.saveExtension);
|
||||
@@ -162,7 +162,7 @@ public class LoadDialog extends FloatingDialog{
|
||||
}else{
|
||||
ui.showError("$text.save.import.invalid");
|
||||
}
|
||||
}, true, "mins");
|
||||
}, true, saveExtension);
|
||||
}).fillX().margin(10f).minWidth(300f).height(70f).pad(4f).padRight(-4);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
|
||||
public class OreBlock extends Floor {
|
||||
protected Floor base;
|
||||
public Floor base;
|
||||
|
||||
public OreBlock(Item ore, Floor base){
|
||||
super("ore-" + ore.name + "-" + base.name);
|
||||
|
||||
@@ -253,7 +253,8 @@ public class PowerDistributor extends PowerBlock{
|
||||
}
|
||||
|
||||
protected boolean linkValid(Tile tile, Tile link){
|
||||
if(!(tile != link && link != null && link.block().hasPower)) return false;
|
||||
if(!(tile != link && link != null && link.block().hasPower)
|
||||
|| link.block() instanceof PowerGenerator) return false;
|
||||
|
||||
if(link.block() instanceof PowerDistributor){
|
||||
DistributorEntity oe = link.entity();
|
||||
|
||||
Reference in New Issue
Block a user