Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/content/Blocks.java core/src/mindustry/net/CrashSender.java core/src/mindustry/ui/Links.java core/src/mindustry/ui/dialogs/SchematicsDialog.java core/src/mindustry/world/blocks/power/LightBlock.java gradle.properties
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package mindustry.io;
|
||||
|
||||
import arc.util.*;
|
||||
import arc.util.serialization.*;
|
||||
import arc.util.serialization.Json.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.maps.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
@@ -215,6 +217,12 @@ public class JsonIO{
|
||||
return item != null ? item : liquid;
|
||||
}
|
||||
});
|
||||
|
||||
//use short names for all filter types
|
||||
for(var filter : Maps.allFilterTypes){
|
||||
var i = filter.get();
|
||||
json.addClassTag(Strings.camelize(i.getClass().getSimpleName().replace("Filter", "")), i.getClass());
|
||||
}
|
||||
}
|
||||
|
||||
static class CustomJson extends Json{
|
||||
|
||||
@@ -69,7 +69,6 @@ public class SaveIO{
|
||||
getMeta(stream);
|
||||
return true;
|
||||
}catch(Throwable e){
|
||||
Log.err(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mindustry.io;
|
||||
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
@@ -501,6 +502,15 @@ public class TypeIO{
|
||||
return id == -1 ? null : content.item(id);
|
||||
}
|
||||
|
||||
//note that only the standard sound constants in Sounds are supported; modded sounds are not.
|
||||
public static void writeSound(Writes write, Sound sound){
|
||||
write.s(Sounds.getSoundId(sound));
|
||||
}
|
||||
|
||||
public static Sound readSound(Reads read){
|
||||
return Sounds.getSound(read.s());
|
||||
}
|
||||
|
||||
public static void writeWeather(Writes write, Weather item){
|
||||
write.s(item == null ? -1 : item.id);
|
||||
}
|
||||
@@ -633,7 +643,7 @@ public class TypeIO{
|
||||
}
|
||||
}
|
||||
|
||||
/** Representes a building that has not been resolved yet. */
|
||||
/** Represents a building that has not been resolved yet. */
|
||||
public static class BuildingBox{
|
||||
public int pos;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user