Merge; internal changes
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -333,8 +333,8 @@ public class ContentParser{
|
||||
}
|
||||
|
||||
private void readBundle(ContentType type, String name, JsonValue value){
|
||||
UnlockableContent cont = Vars.content.getByName(type, name) instanceof UnlockableContent ?
|
||||
Vars.content.getByName(type, name) : null;
|
||||
UnlockableContent cont = locate(type, name) instanceof UnlockableContent ?
|
||||
locate(type, name) : null;
|
||||
|
||||
String entryName = cont == null ? type + "." + currentMod.name + "-" + name + "." : type + "." + cont.name + ".";
|
||||
I18NBundle bundle = Core.bundle;
|
||||
|
||||
19
core/src/mindustry/mod/ModListing.java
Normal file
19
core/src/mindustry/mod/ModListing.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package mindustry.mod;
|
||||
|
||||
/** Mod listing as a data class. */
|
||||
public class ModListing{
|
||||
public String repo, name, author, lastUpdated, description;
|
||||
public int stars;
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "ModListing{" +
|
||||
"repo='" + repo + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", author='" + author + '\'' +
|
||||
", lastUpdated='" + lastUpdated + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", stars=" + stars +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -512,10 +512,8 @@ public class Mods implements Loadable{
|
||||
for(ContentType type : ContentType.all){
|
||||
Fi folder = contentRoot.child(type.name().toLowerCase() + "s");
|
||||
if(folder.exists()){
|
||||
for(Fi file : folder.list()){
|
||||
if(file.extension().equals("json") || file.extension().equals("hjson")){
|
||||
runs.add(new LoadRun(type, file, mod));
|
||||
}
|
||||
for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){
|
||||
runs.add(new LoadRun(type, file, mod));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ public class Scripts implements Disposable{
|
||||
context.setClassShutter(type -> (ClassAccess.allowedClassNames.contains(type) || type.startsWith("$Proxy") ||
|
||||
type.startsWith("adapter") || type.contains("PrintStream") ||
|
||||
type.startsWith("mindustry")) && !type.equals("mindustry.mod.ClassAccess"));
|
||||
|
||||
context.getWrapFactory().setJavaPrimitiveWrap(false);
|
||||
|
||||
scope = new ImporterTopLevel(context);
|
||||
wrapper = Core.files.internal("scripts/wrapper.js").readString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user