Fixed mobile menu shader / Added 'old save' message for sectors
This commit is contained in:
@@ -56,6 +56,7 @@ public class Shaders{
|
||||
shader.setUniformf("u_resolution", Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
||||
shader.setUniformf("u_time", time += Gdx.graphics.getDeltaTime() * 60f);
|
||||
shader.setUniformf("u_uv", Draw.getBlankRegion().getU(), Draw.getBlankRegion().getV());
|
||||
shader.setUniformf("u_scl", Unit.dp.scl(1f));
|
||||
shader.setUniformf("u_uv2", Draw.getBlankRegion().getU2(), Draw.getBlankRegion().getV2());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.zip.InflaterInputStream;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class SaveIO{
|
||||
public static final IntArray breakingVersions = IntArray.with(47);
|
||||
public static final IntArray breakingVersions = IntArray.with(47, 48, 49, 50, 51, 52);
|
||||
public static final IntMap<SaveFileVersion> versions = new IntMap<>();
|
||||
public static final Array<SaveFileVersion> versionArray = Array.with(
|
||||
new Save16()
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.mindustry.maps.generation.WorldGenerator.GenResult;
|
||||
import io.anuke.mindustry.maps.missions.BattleMission;
|
||||
import io.anuke.mindustry.maps.missions.WaveMission;
|
||||
@@ -33,12 +34,19 @@ public class Sectors{
|
||||
}
|
||||
|
||||
public void playSector(Sector sector){
|
||||
if(sector.hasSave() && SaveIO.breakingVersions.contains(sector.getSave().getBuild())){
|
||||
sector.getSave().delete();
|
||||
ui.showInfo("$text.save.old");
|
||||
}
|
||||
|
||||
if(!sector.hasSave()){
|
||||
world.loadSector(sector);
|
||||
logic.play();
|
||||
sector.saveID = control.getSaves().addSave("sector-" + sector.packedPosition()).index;
|
||||
world.sectors().save();
|
||||
world.setSector(sector);
|
||||
}else if(SaveIO.breakingVersions.contains(sector.getSave().getBuild())){
|
||||
ui.showInfo("$text.save.old");
|
||||
}else try{
|
||||
sector.getSave().load();
|
||||
world.setSector(sector);
|
||||
|
||||
Reference in New Issue
Block a user