Fixed #50 (somehow?), as well as GWT runtime errors
This commit is contained in:
@@ -58,7 +58,7 @@ public class Control extends Module{
|
||||
public final EntityGroup<Bullet> bulletGroup = Entities.addGroup(Bullet.class);
|
||||
public final EntityGroup<Shield> shieldGroup = Entities.addGroup(Shield.class);
|
||||
|
||||
Array<io.anuke.mindustry.game.EnemySpawn> spawns;
|
||||
Array<EnemySpawn> spawns;
|
||||
int wave = 1;
|
||||
int lastUpdated = -1;
|
||||
float wavetime;
|
||||
@@ -67,7 +67,7 @@ public class Control extends Module{
|
||||
GameMode mode = GameMode.waves;
|
||||
|
||||
Tile core;
|
||||
Array<io.anuke.mindustry.game.SpawnPoint> spawnpoints = new Array<>();
|
||||
Array<SpawnPoint> spawnpoints = new Array<>();
|
||||
boolean shouldUpdateItems = false;
|
||||
boolean wasPaused = false;
|
||||
|
||||
@@ -191,7 +191,7 @@ public class Control extends Module{
|
||||
);
|
||||
|
||||
for(int i = 0; i < Vars.saveSlots; i ++){
|
||||
Settings.defaults("save-" + i + "-autosave", true);
|
||||
Settings.defaults("save-" + i + "-autosave", !Vars.gwt);
|
||||
Settings.defaults("save-" + i + "-name", "untitled");
|
||||
Settings.defaults("save-" + i + "-data", "empty");
|
||||
}
|
||||
@@ -199,7 +199,7 @@ public class Control extends Module{
|
||||
Settings.defaultList(
|
||||
"ip", "localhost",
|
||||
"port", Vars.port+"",
|
||||
"name", Vars.android ? "player" : UCore.getProperty("user.name"),
|
||||
"name", Vars.android || Vars.gwt ? "player" : UCore.getProperty("user.name"),
|
||||
"servers", ""
|
||||
);
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ public class Save14 extends SaveFileVersion{
|
||||
public void read(DataInputStream stream) throws IOException {
|
||||
|
||||
int version = stream.readInt();
|
||||
/*long loadTime = */stream.readLong();
|
||||
/*long loadTime = */
|
||||
stream.readLong();
|
||||
|
||||
if(version != this.version){
|
||||
throw new RuntimeException("Save file version mismatch!");
|
||||
|
||||
@@ -142,6 +142,8 @@ public class LoadDialog extends FloatingDialog{
|
||||
|
||||
slots.row();
|
||||
|
||||
if(Vars.gwt) return;
|
||||
|
||||
slots.addImageTextButton("$text.save.import", "icon-add", "clear", 14*3, () -> {
|
||||
new FileChooser("$text.save.import", f -> f.extension().equals("mins"), true, file -> {
|
||||
if(SaveIO.isSaveValid(file)){
|
||||
|
||||
@@ -55,13 +55,15 @@ public class PausedDialog extends FloatingDialog{
|
||||
|
||||
content().row();
|
||||
|
||||
content().addButton("$text.hostserver", () ->{
|
||||
if(Vars.world.getMap().custom){
|
||||
ui.showError("$text.nohost");
|
||||
}else {
|
||||
ui.host.show();
|
||||
}
|
||||
}).disabled(b -> Net.active());
|
||||
if(!Vars.gwt) {
|
||||
content().addButton("$text.hostserver", () -> {
|
||||
if (Vars.world.getMap().custom) {
|
||||
ui.showError("$text.nohost");
|
||||
} else {
|
||||
ui.host.show();
|
||||
}
|
||||
}).disabled(b -> Net.active());
|
||||
}
|
||||
|
||||
content().row();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user