diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index 6d6b22c4c1..fd24040542 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -42,7 +42,7 @@ public class Mods implements Loadable{ private Array mods = new Array<>(); private ObjectMap, ModMeta> metas = new ObjectMap<>(); - private boolean requiresReload; + private boolean requiresReload, createdAtlas; public Mods(){ Events.on(ClientLoadEvent.class, e -> Core.app.post(this::checkWarnings)); @@ -152,7 +152,8 @@ public class Mods implements Loadable{ //get textures packed if(totalSprites > 0){ - Core.atlas = new TextureAtlas(Core.files.internal("sprites/sprites.atlas")); + if(!createdAtlas) Core.atlas = new TextureAtlas(Core.files.internal("sprites/sprites.atlas")); + createdAtlas = true; for(AtlasRegion region : Core.atlas.getRegions()){ PageType type = getPage(region); @@ -176,7 +177,6 @@ public class Mods implements Loadable{ }); } - //TODO !!!! fix the UI page here Core.atlas = packer.flush(filter, new TextureAtlas()); Core.atlas.setErrorRegion("error"); Log.debug("Total pages: {0}", Core.atlas.getTextures().size); @@ -422,6 +422,7 @@ public class Mods implements Loadable{ //epic memory leak //TODO make it less epic Core.atlas = new TextureAtlas(Core.files.internal("sprites/sprites.atlas")); + createdAtlas = true; mods.each(LoadedMod::dispose); mods.clear(); diff --git a/gradle.properties b/gradle.properties index 8c9218035a..06c53cec45 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=2f9e4392cd2a2db1d0af4f191d2799ac0b71ed10 +archash=ff62d39e0fa294117a885010b05b2b29412b4024