Closes Anuken/Mindustry-Suggestions/issues/5742
This commit is contained in:
@@ -2,9 +2,6 @@ package mindustry.io.versions;
|
||||
|
||||
import arc.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.ui.dialogs.JoinDialog.*;
|
||||
|
||||
import java.io.*;
|
||||
@@ -50,35 +47,4 @@ public class LegacyIO{
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
public static void readResearch(){
|
||||
try{
|
||||
byte[] bytes = Core.settings.getBytes("unlocks");
|
||||
DataInputStream stream = new DataInputStream(new ByteArrayInputStream(bytes));
|
||||
|
||||
int length = stream.readInt();
|
||||
if(length > 0){
|
||||
stream.readUTF(); //name of key type
|
||||
stream.readUTF(); //name of value type
|
||||
|
||||
//each element is an array list
|
||||
for(int i = 0; i < length; i++){
|
||||
ContentType type = ContentType.all[stream.readInt()];
|
||||
int arrLength = stream.readInt();
|
||||
if(arrLength > 0){
|
||||
stream.readUTF(); //type of contents (String)
|
||||
for(int j = 0; j < arrLength; j++){
|
||||
String name = stream.readUTF();
|
||||
Content out = Vars.content.getByName(type, name);
|
||||
if(out instanceof UnlockableContent u){
|
||||
u.quietUnlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
Log.err(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user