Fixed sprites in wrong atlas
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 173 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 779 B |
Binary file not shown.
|
Before Width: | Height: | Size: 296 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -80,7 +80,7 @@ public class Generators{
|
|||||||
//theoretically this might not finish in time, but I doubt that will ever happen
|
//theoretically this might not finish in time, but I doubt that will ever happen
|
||||||
mainExecutor.submit(() -> {
|
mainExecutor.submit(() -> {
|
||||||
try{
|
try{
|
||||||
ImageTileGenerator.generate(basePath, block.name + (variants <= 1 ? "" : "-" + (variant+1)), new Fi("../../../assets-raw/sprites_out/blocks/environment/" + (block.name + (variants <= 1 ? "" : "-" + (variant+1)))));
|
ImageTileGenerator.generate(basePath, block.name + (variants <= 1 ? "" : "-" + (variant+1)), new Fi("../../../assets-raw/sprites_out/blocks/environment"));
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
Log.err("Failed to autotile: " + block.name, e);
|
Log.err("Failed to autotile: " + block.name, e);
|
||||||
}finally{
|
}finally{
|
||||||
@@ -514,7 +514,7 @@ public class Generators{
|
|||||||
Pixmap container = new Pixmap(base.width + 10, base.height + 10);
|
Pixmap container = new Pixmap(base.width + 10, base.height + 10);
|
||||||
container.draw(base, 5, 5, true);
|
container.draw(base, 5, 5, true);
|
||||||
|
|
||||||
replace("sector-" + item.name, container.outline(Pal.darkerGray, 5));
|
replace("../ui/sector-" + item.name, "sector-" + item.name, container.outline(Pal.darkerGray, 5));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ public class ImagePacker{
|
|||||||
//makes PNG loading slightly faster
|
//makes PNG loading slightly faster
|
||||||
ArcNativesLoader.load();
|
ArcNativesLoader.load();
|
||||||
|
|
||||||
|
fixSubdirectory("blocks/environment/character-overlay");
|
||||||
|
|
||||||
Core.settings = new MockSettings();
|
Core.settings = new MockSettings();
|
||||||
Log.logger = new NoopLogHandler();
|
Log.logger = new NoopLogHandler();
|
||||||
Vars.content = new ContentLoader();
|
Vars.content = new ContentLoader();
|
||||||
@@ -200,6 +202,15 @@ public class ImagePacker{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void fixSubdirectory(String dir){
|
||||||
|
Fi folder = Fi.get("../../../assets-raw/sprites_out/" + dir);
|
||||||
|
Fi parent = folder.parent();
|
||||||
|
folder.walk(fi -> {
|
||||||
|
fi.moveTo(parent.child(fi.name()));
|
||||||
|
});
|
||||||
|
folder.delete();
|
||||||
|
}
|
||||||
|
|
||||||
static String texname(UnlockableContent c){
|
static String texname(UnlockableContent c){
|
||||||
return c.getContentType() + "-" + c.name + "-ui";
|
return c.getContentType() + "-" + c.name + "-ui";
|
||||||
}
|
}
|
||||||
@@ -251,7 +262,11 @@ public class ImagePacker{
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void replace(String name, Pixmap image){
|
static void replace(String name, Pixmap image){
|
||||||
Fi.get(name + ".png").writePng(image);
|
replace(name, name, image);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void replace(String path, String name, Pixmap image){
|
||||||
|
Fi.get(path + ".png").writePng(image);
|
||||||
((GenRegion)Core.atlas.find(name)).path.delete();
|
((GenRegion)Core.atlas.find(name)).path.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user