Removed all reflection

This commit is contained in:
Anuken 2018-09-09 21:44:10 -04:00
parent 65f911909b
commit 6ef2256bf2
6 changed files with 19 additions and 13 deletions

View file

@ -27,7 +27,7 @@ allprojects {
appName = 'Mindustry'
gdxVersion = '1.9.8'
roboVMVersion = '2.3.0'
uCoreVersion = '7fafee20b6bf5615e009d2be20d1c1331d1e66c1'
uCoreVersion = '484d62ff4bfe109c6af654f612debdb5ca27df76'
getVersionString = {
String buildVersion = getBuildVersion()

View file

@ -404,7 +404,7 @@ mode.freebuild.description=limited resources and no timer for waves.
content.item.name=Items
content.liquid.name=Liquids
content.unit-type.name=Units
content.unit.name=Units
content.recipe.name=Blocks
content.mech.name=Mechs

View file

@ -2,32 +2,32 @@
Font: {
default-font: {
file: square.fnt,
markupEnabled: true,
markup: true,
scale: 0.5
},
default-font-chat: {
file: square.fnt,
markupEnabled: false,
markup: false,
scale: 0.5
},
korean: {
file: korean.fnt,
markupEnabled: true,
markup: true,
scale: 0.5
},
trad-chinese: {
file: trad_chinese.fnt,
markupEnabled: true,
markup: true,
scale: 0.5
},
simp-chinese: {
file: simp_chinese.fnt,
markupEnabled: true,
markup: true,
scale: 0.5
},
title: {
file: title.fnt,
markupEnabled: true,
markup: true,
scale: 2
}
},

View file

@ -16,6 +16,10 @@ public class ContentDatabase{
private ObjectMap<ContentType, ObjectSet<String>> unlocked = new ObjectMap<>();
/** Whether unlockables have changed since the last save.*/
private boolean dirty;
static{
Settings.setSerializer(ContentType.class, (stream, t) -> stream.writeInt(t.ordinal()), stream -> ContentType.values()[stream.readInt()]);
}
/** Returns whether or not this piece of content is unlocked yet.*/
public boolean isUnlocked(UnlockableContent content){

View file

@ -1,7 +1,7 @@
package io.anuke.mindustry.io;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Json;
import com.badlogic.gdx.utils.JsonReader;
import com.badlogic.gdx.utils.JsonValue;
import io.anuke.mindustry.net.Net;
import io.anuke.ucore.function.Consumer;
@ -12,16 +12,19 @@ public class Changelogs{
public static void getChangelog(Consumer<Array<VersionInfo>> success, Consumer<Throwable> fail){
Net.http(releasesURL, "GET", result -> {
Json j = new Json();
Array<JsonValue> list = j.fromJson(Array.class, result);
JsonReader reader = new JsonReader();
JsonValue value = reader.parse(result).child;
Array<VersionInfo> out = new Array<>();
for(JsonValue value : list){
while(value != null){
String name = value.getString("name");
String description = value.getString("body").replace("\r", "");
int id = value.getInt("id");
int build = Integer.parseInt(value.getString("tag_name").substring(1));
out.add(new VersionInfo(name, description, id, build, value.getString("published_at")));
value = value.next;
}
success.accept(out);
}, fail);
}

View file

@ -17,7 +17,6 @@ import io.anuke.mindustry.net.Packets.Connect;
import io.anuke.mindustry.net.Packets.Disconnect;
import io.anuke.mindustry.net.Packets.StreamBegin;
import io.anuke.mindustry.net.Packets.StreamChunk;
import io.anuke.ucore.UCore;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Log;
import net.jpountz.lz4.LZ4Compressor;