mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-12 08:48:09 +07:00
Fixed #50 (somehow?), as well as GWT runtime errors
This commit is contained in:
@ -21,7 +21,7 @@ allprojects {
|
|||||||
appName = "Mindustry"
|
appName = "Mindustry"
|
||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = '7a567c6';
|
uCoreVersion = '49d8aecf9c';
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "https://raw.githubusercontent.com/gwtproject/gwt/master/distro-source/core/src/gwt-module.dtd">
|
|
||||||
<module>
|
<module>
|
||||||
<source path="io/anuke/mindustry" />
|
<source path="io/anuke/mindustry" />
|
||||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Tile" />
|
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Tile" />
|
||||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.io.Maps" />
|
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.io.Maps" />
|
||||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Map" />
|
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Map" />
|
||||||
|
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.game.EnemySpawn" />
|
||||||
|
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.io.SaveFileVersion" />
|
||||||
|
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.resource.Recipe" />
|
||||||
</module>
|
</module>
|
@ -58,7 +58,7 @@ public class Control extends Module{
|
|||||||
public final EntityGroup<Bullet> bulletGroup = Entities.addGroup(Bullet.class);
|
public final EntityGroup<Bullet> bulletGroup = Entities.addGroup(Bullet.class);
|
||||||
public final EntityGroup<Shield> shieldGroup = Entities.addGroup(Shield.class);
|
public final EntityGroup<Shield> shieldGroup = Entities.addGroup(Shield.class);
|
||||||
|
|
||||||
Array<io.anuke.mindustry.game.EnemySpawn> spawns;
|
Array<EnemySpawn> spawns;
|
||||||
int wave = 1;
|
int wave = 1;
|
||||||
int lastUpdated = -1;
|
int lastUpdated = -1;
|
||||||
float wavetime;
|
float wavetime;
|
||||||
@ -67,7 +67,7 @@ public class Control extends Module{
|
|||||||
GameMode mode = GameMode.waves;
|
GameMode mode = GameMode.waves;
|
||||||
|
|
||||||
Tile core;
|
Tile core;
|
||||||
Array<io.anuke.mindustry.game.SpawnPoint> spawnpoints = new Array<>();
|
Array<SpawnPoint> spawnpoints = new Array<>();
|
||||||
boolean shouldUpdateItems = false;
|
boolean shouldUpdateItems = false;
|
||||||
boolean wasPaused = false;
|
boolean wasPaused = false;
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ public class Control extends Module{
|
|||||||
);
|
);
|
||||||
|
|
||||||
for(int i = 0; i < Vars.saveSlots; i ++){
|
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 + "-name", "untitled");
|
||||||
Settings.defaults("save-" + i + "-data", "empty");
|
Settings.defaults("save-" + i + "-data", "empty");
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ public class Control extends Module{
|
|||||||
Settings.defaultList(
|
Settings.defaultList(
|
||||||
"ip", "localhost",
|
"ip", "localhost",
|
||||||
"port", Vars.port+"",
|
"port", Vars.port+"",
|
||||||
"name", Vars.android ? "player" : UCore.getProperty("user.name"),
|
"name", Vars.android || Vars.gwt ? "player" : UCore.getProperty("user.name"),
|
||||||
"servers", ""
|
"servers", ""
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -38,7 +38,8 @@ public class Save14 extends SaveFileVersion{
|
|||||||
public void read(DataInputStream stream) throws IOException {
|
public void read(DataInputStream stream) throws IOException {
|
||||||
|
|
||||||
int version = stream.readInt();
|
int version = stream.readInt();
|
||||||
/*long loadTime = */stream.readLong();
|
/*long loadTime = */
|
||||||
|
stream.readLong();
|
||||||
|
|
||||||
if(version != this.version){
|
if(version != this.version){
|
||||||
throw new RuntimeException("Save file version mismatch!");
|
throw new RuntimeException("Save file version mismatch!");
|
||||||
|
@ -142,6 +142,8 @@ public class LoadDialog extends FloatingDialog{
|
|||||||
|
|
||||||
slots.row();
|
slots.row();
|
||||||
|
|
||||||
|
if(Vars.gwt) return;
|
||||||
|
|
||||||
slots.addImageTextButton("$text.save.import", "icon-add", "clear", 14*3, () -> {
|
slots.addImageTextButton("$text.save.import", "icon-add", "clear", 14*3, () -> {
|
||||||
new FileChooser("$text.save.import", f -> f.extension().equals("mins"), true, file -> {
|
new FileChooser("$text.save.import", f -> f.extension().equals("mins"), true, file -> {
|
||||||
if(SaveIO.isSaveValid(file)){
|
if(SaveIO.isSaveValid(file)){
|
||||||
|
@ -55,13 +55,15 @@ public class PausedDialog extends FloatingDialog{
|
|||||||
|
|
||||||
content().row();
|
content().row();
|
||||||
|
|
||||||
content().addButton("$text.hostserver", () ->{
|
if(!Vars.gwt) {
|
||||||
if(Vars.world.getMap().custom){
|
content().addButton("$text.hostserver", () -> {
|
||||||
ui.showError("$text.nohost");
|
if (Vars.world.getMap().custom) {
|
||||||
}else {
|
ui.showError("$text.nohost");
|
||||||
ui.host.show();
|
} else {
|
||||||
}
|
ui.host.show();
|
||||||
}).disabled(b -> Net.active());
|
}
|
||||||
|
}).disabled(b -> Net.active());
|
||||||
|
}
|
||||||
|
|
||||||
content().row();
|
content().row();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user