Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.io;
|
||||
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.mindustry.game.Rules;
|
||||
import io.anuke.mindustry.maps.Map;
|
||||
|
||||
@@ -13,8 +14,9 @@ public class SaveMeta{
|
||||
public Map map;
|
||||
public int wave;
|
||||
public Rules rules;
|
||||
public StringMap tags;
|
||||
|
||||
public SaveMeta(int version, long timestamp, long timePlayed, int build, String map, int wave, Rules rules){
|
||||
public SaveMeta(int version, long timestamp, long timePlayed, int build, String map, int wave, Rules rules, StringMap tags){
|
||||
this.version = version;
|
||||
this.build = build;
|
||||
this.timestamp = timestamp;
|
||||
@@ -22,5 +24,6 @@ public class SaveMeta{
|
||||
this.map = world.maps.all().find(m -> m.name().equals(map));
|
||||
this.wave = wave;
|
||||
this.rules = rules;
|
||||
this.tags = tags;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class SaveVersion extends SaveFileReader{
|
||||
public SaveMeta getMeta(DataInput stream) throws IOException{
|
||||
stream.readInt(); //length of data, doesn't matter here
|
||||
StringMap map = readStringMap(stream);
|
||||
return new SaveMeta(map.getInt("version"), map.getLong("saved"), map.getLong("playtime"), map.getInt("build"), map.get("mapname"), map.getInt("wave"), JsonIO.read(Rules.class, map.get("rules", "{}")));
|
||||
return new SaveMeta(map.getInt("version"), map.getLong("saved"), map.getLong("playtime"), map.getInt("build"), map.get("mapname"), map.getInt("wave"), JsonIO.read(Rules.class, map.get("rules", "{}")), map);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -109,8 +109,9 @@ public class MenuFragment extends Fragment{
|
||||
container.add(play);
|
||||
container.add(join);
|
||||
container.add(custom);
|
||||
if(ios) container.row();
|
||||
container.add(maps);
|
||||
container.row();
|
||||
if(!ios) container.row();
|
||||
|
||||
container.table(table -> {
|
||||
table.defaults().set(container.defaults());
|
||||
@@ -119,7 +120,7 @@ public class MenuFragment extends Fragment{
|
||||
table.add(tools);
|
||||
|
||||
if(Platform.instance.canDonate()) table.add(donate);
|
||||
table.add(exit);
|
||||
if(!ios) table.add(exit);
|
||||
}).colspan(4);
|
||||
}else{
|
||||
container.marginTop(0f);
|
||||
|
||||
Reference in New Issue
Block a user