Moved pref saving to specific locations

This commit is contained in:
Anuken
2020-07-02 10:20:16 -04:00
parent 5f6c71b9d3
commit fd2deb0a82
15 changed files with 53 additions and 10 deletions

View File

@ -357,7 +357,7 @@ task pack(dependsOn: classes){
//antialias everything except UI elements
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
if(file.isDirectory() || (file.toString().replace("\\", "/").contains("/ui/") && file.toString().startsWith("icon-"))) return
if(file.isDirectory() || (file.toString().replace("\\", "/").contains("/ui/") && file.toString().startsWith("icon-")) || file.toString().contains(".9.png")) return
executor.submit{
antialias(file.file)

View File

@ -23,10 +23,33 @@ import mindustry.world.blocks.legacy.*;
import static mindustry.Vars.*;
public class Generators{
//used for changing colors in the UI - testing only
static final IntIntMap paletteMap = IntIntMap.with(
//empty for now
0x454545ff, 0x00000000,//0x32394bff,
0x00000099, 0x00000000//0x000000ff
);
public static void generate(){
ObjectMap<Block, Image> gens = new ObjectMap<>();
if(!paletteMap.isEmpty()){
ImagePacker.generate("uipalette", () -> {
Fi.get("../ui").walk(fi -> {
if(!fi.extEquals("png")) return;
Pixmap pix = new Pixmap(fi);
pix.setBlending(Pixmap.Blending.sourceOver);
pix.each((x, y) -> {
int value = pix.getPixel(x, y);
pix.draw(x, y, paletteMap.get(value, value));
});
fi.writePNG(pix);
});
});
}
ImagePacker.generate("splashes", () -> {
ArcNativesLoader.load();