Crafting Table shift-ctrl tweaks added. Crafting table mouse wheel stack inc/dec added. Lang file en_en updated (issue #76). Fixed tree cutter progress reset (issue #77). Added Solar Panel energy cap export (issue #78). Build system json-lang sanatized added.

This commit is contained in:
stfwi 2020-01-10 07:49:58 +01:00
parent 11e985b8db
commit d4488df2b7
39 changed files with 1339 additions and 569 deletions

View file

@ -330,6 +330,28 @@
}
};
me.tasks.lang_json_text_replacements = function() {
var file_list = (function() {
var ls = [];
const dir = "./" + constants.local_assets_root() + "/lang";
if(fs.isdir(dir)) {
ls = ls.concat(fs.find(dir, '*.json'));
for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/");
}
ls.sort();
return ls;
})();
for(var file_i in file_list) {
var file = file_list[file_i];
var txt = fs.readfile(file);
if(txt===undefined) throw new Error("Failed to read '" + file + "'");
txt = txt.replace(/\\\\n/g,"\\n");
fs.writefile(file, txt);
}
};
me.stdtasks = {};
me.stdtasks["assets"] = function() {
me.tasks.map_regnames_blockstate_filenames();
@ -367,6 +389,10 @@
}
};
me.stdtasks["lang-json-fixes"] = function() {
me.tasks.lang_json_text_replacements();
}
Object.freeze(me);
Object.freeze(me.tasks);
Object.freeze(me.parsing);