mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-20 21:08:42 +03:00
Cleanup
This commit is contained in:
parent
c12865eabc
commit
96f41b0cf3
@ -7,7 +7,6 @@ import arc.math.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.world.*;
|
||||
@ -26,10 +25,6 @@ public class MapRenderer implements Disposable{
|
||||
public MapRenderer(MapEditor editor){
|
||||
this.editor = editor;
|
||||
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){
|
||||
|
@ -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 -> {
|
||||
Pixmap pixmap = Core.atlas.getPixmap("error").crop();
|
||||
errorTexture = new Texture(pixmap);
|
||||
|
@ -86,18 +86,6 @@ public class Maps{
|
||||
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){
|
||||
((CustomLoader) Core.assets.getLoader(Content.class)).loaded = this::createAllPreviews;
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.content.TechTree.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.Objectives.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
@ -48,15 +47,6 @@ public class TechTreeDialog extends BaseDialog{
|
||||
|
||||
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(() -> {
|
||||
checkNodes(root);
|
||||
treeLayout();
|
||||
|
Loading…
Reference in New Issue
Block a user