why does this work
This commit is contained in:
@@ -221,18 +221,26 @@ public class Mods implements Loadable{
|
||||
}
|
||||
}
|
||||
|
||||
/** Reloads all mod content.*/
|
||||
/** Reloads all mod content. How does this even work? I refuse to believe that it functions correctly.*/
|
||||
public void reloadContent(){
|
||||
//epic memory leak
|
||||
Core.atlas = new TextureAtlas(Core.files.internal("sprites/sprites.atlas"));
|
||||
Tex.load();
|
||||
Tex.loadStyles();
|
||||
Styles.load();
|
||||
loaded.clear();
|
||||
disabled.clear();
|
||||
load();
|
||||
buildFiles();
|
||||
Musics.dispose();
|
||||
Sounds.dispose();
|
||||
Musics.load();
|
||||
Sounds.load();
|
||||
Core.assets.finishLoading();
|
||||
content.clear();
|
||||
content.createContent();
|
||||
loadAsync();
|
||||
loadSync();
|
||||
buildFiles();
|
||||
content.init();
|
||||
content.load();
|
||||
content.loadColors();
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.mod.Mods.*;
|
||||
@@ -36,6 +37,8 @@ public class ModsDialog extends FloatingDialog{
|
||||
void setup(){
|
||||
cont.clear();
|
||||
cont.defaults().width(520f).pad(4);
|
||||
cont.add("$mod.reloadrequired").visible(mods::requiresReload).center().get().setAlignment(Align.center);
|
||||
cont.row();
|
||||
if(!(mods.all().isEmpty() && mods.disabled().isEmpty())){
|
||||
cont.pane(table -> {
|
||||
table.margin(10f).top();
|
||||
|
||||
Reference in New Issue
Block a user