Skip to content
Snippets Groups Projects
Commit e9273c8a authored by aimozg's avatar aimozg
Browse files

* Added missing necktie gray sprite

parent 91414b50
No related branches found
No related tags found
1 merge request!778Canvas debugger update
......@@ -41,13 +41,16 @@ function desaturate(image, params=[2,1,1,1,1]) {
* Convert one file, and save result with "_gray" suffix
* @param path Relative path to PNG file
* @param params Processing params: [r_factor, g_factor, b_factor, scale, gamma]
* @param skipexisting Do nothing if "_gray" file exists (does not check contents)
*/
function desaturateFile(path, params=[2,1,1,1,1]) {
function desaturateFile(path, params=[2,1,1,1,1],skipexisting=true) {
let newname = path.replace(".png","_gray.png");
if (skipexisting && fs.existsSync(path)) return;
let data = fs.readFileSync(path);
let png = PNG.sync.read(data);
desaturate(png,params);
data = PNG.sync.write(png, {colorType:4});
fs.writeFileSync(path.replace(".png","_gray.png"), data)
fs.writeFileSync(newname, data)
}
/**
......@@ -147,6 +150,11 @@ function processSlot(setupfile,imgdir,varname,hasIntegrity) {
files.push(file + "_down");
}
}
if (varname === "setup.clothes.neck") {
for (let file of ifiles) {
files.push(file + "_nocollar");
}
}
if (json.breast_img === 1) {
for (let i = 0; i <= 5; i++) {
files.push("" + i);
......
img/clothes/neck/tie/full_nocollar_gray.png

924 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment