This commit is contained in:
Anuken
2020-06-25 22:34:38 -04:00
parent c12865eabc
commit 96f41b0cf3
4 changed files with 0 additions and 33 deletions
@@ -7,7 +7,6 @@ import arc.math.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.game.EventType.*;
import mindustry.game.*; import mindustry.game.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.world.*; import mindustry.world.*;
@@ -26,10 +25,6 @@ public class MapRenderer implements Disposable{
public MapRenderer(MapEditor editor){ public MapRenderer(MapEditor editor){
this.editor = editor; this.editor = editor;
this.texture = Core.atlas.find("clear-editor").getTexture(); this.texture = Core.atlas.find("clear-editor").getTexture();
Events.on(ContentReloadEvent.class, e -> {
texture = Core.atlas.find("clear-editor").getTexture();
});
} }
public void resize(int width, int height){ public void resize(int width, int height){
-6
View File
@@ -69,12 +69,6 @@ public class Schematics implements Loadable{
} }
}); });
Events.on(ContentReloadEvent.class, event -> {
previews.each((schem, m) -> m.dispose());
previews.clear();
load();
});
Events.on(ClientLoadEvent.class, event -> { Events.on(ClientLoadEvent.class, event -> {
Pixmap pixmap = Core.atlas.getPixmap("error").crop(); Pixmap pixmap = Core.atlas.getPixmap("error").crop();
errorTexture = new Texture(pixmap); errorTexture = new Texture(pixmap);
-12
View File
@@ -86,18 +86,6 @@ public class Maps{
maps.sort(); maps.sort();
}); });
Events.on(ContentReloadEvent.class, event -> {
reload();
for(Map map : maps){
try{
map.texture = map.previewFile().exists() ? new Texture(map.previewFile()) : new Texture(MapIO.generatePreview(map));
readCache(map);
}catch(Exception e){
e.printStackTrace();
}
}
});
if(Core.assets != null){ if(Core.assets != null){
((CustomLoader) Core.assets.getLoader(Content.class)).loaded = this::createAllPreviews; ((CustomLoader) Core.assets.getLoader(Content.class)).loaded = this::createAllPreviews;
} }
@@ -18,7 +18,6 @@ import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.content.TechTree.*; import mindustry.content.TechTree.*;
import mindustry.game.EventType.*;
import mindustry.game.Objectives.*; import mindustry.game.Objectives.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
@@ -48,15 +47,6 @@ public class TechTreeDialog extends BaseDialog{
shouldPause = true; shouldPause = true;
Events.on(ContentReloadEvent.class, e -> {
nodes.clear();
root = new TechTreeNode(TechTree.root, null);
checkNodes(root);
treeLayout();
stack.getChildren().get(0).remove();
stack.addChildAt(0, view = new View());
});
shown(() -> { shown(() -> {
checkNodes(root); checkNodes(root);
treeLayout(); treeLayout();