Bugfixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package io.anuke.mindustry.editor;
|
||||
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.collection.IntSet;
|
||||
import io.anuke.arc.collection.IntSet.IntSetIterator;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
@@ -10,6 +10,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.graphics.IndexedRenderer;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
@@ -29,7 +30,11 @@ public class MapRenderer implements Disposable{
|
||||
|
||||
public MapRenderer(MapEditor editor){
|
||||
this.editor = editor;
|
||||
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){
|
||||
|
||||
@@ -15,6 +15,7 @@ import io.anuke.arc.util.*;
|
||||
import io.anuke.arc.util.io.*;
|
||||
import io.anuke.arc.util.serialization.*;
|
||||
import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.plugin.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
@@ -154,6 +155,7 @@ public class Mods implements Loadable{
|
||||
mod.file.delete();
|
||||
}
|
||||
loaded.remove(mod);
|
||||
disabled.remove(mod);
|
||||
requiresReload = true;
|
||||
}
|
||||
|
||||
@@ -244,7 +246,9 @@ public class Mods implements Loadable{
|
||||
/** Reloads all mod content. How does this even work? I refuse to believe that it functions correctly.*/
|
||||
public void reloadContent(){
|
||||
//epic memory leak
|
||||
//TODO make it less epic
|
||||
Core.atlas = new TextureAtlas(Core.files.internal("sprites/sprites.atlas"));
|
||||
|
||||
loaded.clear();
|
||||
disabled.clear();
|
||||
load();
|
||||
@@ -263,6 +267,8 @@ public class Mods implements Loadable{
|
||||
content.loadColors();
|
||||
data.load();
|
||||
requiresReload = false;
|
||||
|
||||
Events.fire(new ContentReloadEvent());
|
||||
}
|
||||
|
||||
/** Creates all the content found in mod files. */
|
||||
|
||||
Reference in New Issue
Block a user