mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-30 22:49:06 +07:00
Moved pref saving to specific locations
This commit is contained in:
@ -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)
|
||||
|
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user