Code cleanup

This commit is contained in:
Anuken
2018-10-06 11:56:39 -04:00
parent 0ce226d0c9
commit fd107ab5b8
48 changed files with 94 additions and 195 deletions

View File

@@ -14,14 +14,14 @@ def textureFolder = "../core/assets-raw/sprites/generated/"
task swapColors(){
doLast{
if (project.hasProperty("colors")) {
def carr = new File(getProperty("colors")).text.split("\n");
def carr = new File(getProperty("colors")).text.split("\n")
def map = [:]
def swaps = 0
carr.each {str -> map[Color.argb8888(Color.valueOf(str.split("=")[0]))] = Color.argb8888(Color.valueOf(str.split("=")[1]))}
def tmpc = new Color()
fileTree(dir: '../core/assets-raw/sprites', include: "**/*.png").visit { file ->
if(file.isDirectory()) return;
if(file.isDirectory()) return
swaps ++
def img = ImageIO.read(file.file)
@@ -39,7 +39,7 @@ task swapColors(){
}
println "Swapped $swaps images."
}else{
throw new InvalidUserDataException("No replacement colors specified. Use -Pcolors=\"<path to color file>\"");
throw new InvalidUserDataException("No replacement colors specified. Use -Pcolors=\"<path to color file>\"")
}
}
}