v1.1.0-b1 commit: E-Furnace fixed (issue #97). 1.14/1.15: Sheet Metal Slab Slices added, Config handling unified, Dense Grid Sand textures tweaked.

This commit is contained in:
stfwi 2020-05-27 20:11:53 +02:00
parent 2805e59d26
commit 7cf182652b
261 changed files with 1161 additions and 902 deletions

View file

@ -197,7 +197,7 @@
for(var name in output_data) output_data[name] = output_data[name].trim() + "\n";
for(var name in output_data) {
fs.writefile("./src/main/resources/assets/engineersdecor/lang/" + name + ".lang", output_data[name]);
fs.writefile("./src/main/resources/assets/"+ constants.mod_registry_name() +"/lang/" + name + ".lang", output_data[name]);
}
};

View file

@ -364,7 +364,7 @@
const html = "<pre>\n" + (hist.replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;")) + "\n</pre>";
fs.writefile("dist/" + modid + "-" + version + ".html", html);
};
stdtasks["sanatize"] = function() {
stdtasks["sanitize"] = function() {
me.sanatizing.remove_trailing_whitespaces(['java','json','lang']);
me.sanatizing.tabs_to_spaces(['java','lang']);
me.sanatizing.lang_json_newline_fixes();
@ -419,14 +419,17 @@
const liblang = include( (me.parsing.version_data().minecraft == "1.12.2") ? ("../meta/lib/liblang.1.12.js") : ("../meta/lib/liblang.1.13.js"))(constants);
liblang.sync_languages();
};
stdtasks["install"] = function() {
};
stdtasks["start-server"] = function() {
};
/**
* Task main
*/
me.run = function(tasks, args, no_std_tasks, rel_root_path) {
if(rel_root_path===undefined) rel_root_path = "..";
if(!fs.chdir(fs.dirname(fs.realpath(sys.script)))) throw new Error("Failed to switch to mod source directory.");
if(!fs.isdir(rel_root_path+"/.git")) throw new Error("Missing git repository in parent directory of mod source.");
me.run = function(tasks, args, no_std_tasks) {
const root_dir = fs.realpath(fs.dirname(sys.script)+"/../..");
if(!fs.isdir(root_dir+"/.git")) throw new Error("Missing git repository in parent directory of mod source.");
if(!no_std_tasks) {
for(var key in stdtasks) {
if(tasks[key]===undefined) tasks[key] = stdtasks[key];
@ -441,7 +444,12 @@
alert("No task '" + task_name + "' defined.");
exit(1);
} else {
tasks[task_name](task_args);
const pwd = fs.cwd();
try {
tasks[task_name](task_args);
} finally {
fs.chdir(pwd);
}
}
};

83
meta/lib/tasks.js Normal file
View file

@ -0,0 +1,83 @@
#!/usr/bin/djs
"use strict";
const root_dir = fs.realpath(fs.dirname(sys.script)+"/../..");
const constants = include(fs.dirname(fs.realpath(sys.script)) + "/constants.js")();
const libtask = include(fs.dirname(fs.realpath(sys.script)) + "/libtask.js")(constants);
const modid = constants.mod_registry_name();
var tasks = {};
tasks["combined-update-json"] = function() {
const update_json = {
homepage: constants.project_download_inet_page(),
promos: {}
};
var update_json_src = [];
fs.find(root_dir + "/1.12/meta/", "update*.json", function(path){ update_json_src.push(JSON.parse(fs.readfile(path))); });
fs.find(root_dir + "/1.14/meta/", "update*.json", function(path){ update_json_src.push(JSON.parse(fs.readfile(path))); });
fs.find(root_dir + "/1.15/meta/", "update*.json", function(path){ update_json_src.push(JSON.parse(fs.readfile(path))); });
for(var i in update_json_src) {
const version_update_json = update_json_src[i];
for(var key in version_update_json) {
if(key=="homepage") {
continue;
} else if(key=="promos") {
for(var prkey in version_update_json.promos) {
update_json.promos[prkey] = version_update_json.promos[prkey];
}
} else {
update_json[key] = version_update_json[key];
}
}
}
update_json_src = undefined;
fs.mkdir(root_dir + "/meta");
fs.writefile(root_dir + "/meta/update.json", JSON.stringify(update_json, null, 2));
};
tasks["sync-main-repository"] = function() {
// step-by-step-verbose operations, as the code bases and copy data are different.
if((!fs.chdir(fs.dirname(fs.realpath(sys.script))+"/../..")) || (!fs.isdir(".git"))) throw new Error("Failed to switch to mod source directory.");
if(sys.shell("git remote -v") != "") throw new Error("Dev repository has a remote set.");
if(main_repo_local == "") throw new Error("Main repository (real) path not found.");
const test_repo_local = fs.cwd();
const main_repo_local = fs.realpath("../"+ constants.mod_registry_name() + "-github");
if(main_repo_local == fs.realpath(test_repo_local)) throw new Error("This is already the main repository");
const cd_dev = function(subdir) {
if((!fs.chdir(test_repo_local)) || (!fs.isdir(".git"))) throw new Error("Failed to switch to mod source directory.");
if((subdir!==undefined) && (!fs.chdir(subdir))) throw new Error("Failed to change to '" + subdir + "' of the test repository.");
}
const cd_main = function(subdir) {
if((!fs.chdir(main_repo_local)) || (!fs.isdir(".git"))) throw new Error("Failed to switch to main repository directory.");
if(fs.cwd().search("-github") < 0) throw new Error("Main repository is missing the '*-github' tag in the path name.");
if((subdir!==undefined) && (!fs.chdir(subdir))) throw new Error("Failed to change to '" + subdir + "' of the main repository.");
};
cd_main();
sys.shell("rm -rf documentation meta");
sys.shell("rm -f .gitignore credits.md license Makefile readme.md tasks.js");
cd_main("1.12"); sys.shell("rm -rf meta gradle src");
cd_main("1.14"); sys.shell("rm -rf meta gradle src");
cd_main("1.15"); sys.shell("rm -rf meta gradle src");
cd_dev();
sys.shell("cp -f .gitignore credits.md license Makefile readme.md tasks.js \"" + main_repo_local + "/\"")
sys.shell("cp -r documentation meta \"" + main_repo_local + "/\"")
{
cd_dev("1.12");
sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js.* \"" + main_repo_local + "/1.12/\"")
sys.shell("cp -r gradle meta src \"" + main_repo_local + "/1.12/\"")
}
{
cd_dev("1.14");
sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js \"" + main_repo_local + "/1.14/\"")
sys.shell("cp -r gradle meta src \"" + main_repo_local + "/1.14/\"")
}
{
cd_dev("1.15");
sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js \"" + main_repo_local + "/1.15/\"")
sys.shell("cp -r gradle meta src \"" + main_repo_local + "/1.15/\"")
}
cd_main();
print("Main repository changes:");
print(sys.shell("git status -s"))
};
libtask.run(tasks, sys.args);

View file

@ -2,13 +2,14 @@
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"promos": {
"1.12.2-recommended": "1.0.20",
"1.12.2-latest": "1.0.20",
"1.12.2-latest": "1.1.0-b1",
"1.14.4-recommended": "",
"1.14.4-latest": "1.0.20-b7",
"1.14.4-latest": "1.1.0-b1",
"1.15.2-recommended": "",
"1.15.2-latest": "1.0.20-b7"
"1.15.2-latest": "1.1.0-b1"
},
"1.12.2": {
"1.1.0-b1": "[F] Fixed Electrical Furnace speed sanitizing bug (issue #97, thx therobotmenace).\n[M] Changed Labeled Crate Nesting to circumvent server crashing in combination with the Sponge mod.",
"1.0.20": "[R] Release based on v1.0.20-b6. Release-to-release changes: * Manual back ported. * Steel Mesh Fence Gate back ported. * E-Furnace speed selection switch back ported. * Labeled Crate back ported. * Minor bug fixes, compatibility changes.",
"1.0.20-b6": "[F] Implemented compat related to issue #91.",
"1.0.20-b5": "[A] Back-ported Patchouli based Manual (you need to install Vazkii_'s Patchouli, too).\n[A] Back-ported Steel Mesh Fence Gate.\n[M] Minor back-porting compatibility refractoring.",
@ -96,6 +97,7 @@
"1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table."
},
"1.14.4": {
"1.1.0-b1": "[F] Fixed Electrical Furnace speed sanitizing bug (issue #97, thx therobotmenace).\n[A] Sheet Metal Slab Slices added (only available if IE is installed).\n[M] Config options extended/updated.\n[M] Dense Grit Sand textures altered to get slightly more visible structure from distance.",
"1.0.20-b7": "[A] Dense Grit Sand added.\n[!] Variant Slab compatibility fix. *This may alter placed slabs of this mod, data fixers don't work yet unfortunately*.",
"1.0.20-b6": "[M] Slab Slice placement improved.\n[M] Quite some naming/refractoring under the hood.",
"1.0.20-b5": "[A] Electrical Furnace can draw in smelting input items from an adjacent inventory when a Hopper is placed in the auxiliary slot.\n[M] Wrapped Labeled Crate label slot to prevent sorting mods from altering the label.",
@ -150,6 +152,7 @@
"1.0.7-b3": "[A] Initial 1.14.2 port of decorative blocks."
},
"1.15.2": {
"1.1.0-b1": "[F] Fixed Electrical Furnace speed sanitizing bug (issue #97, thx therobotmenace).\n[A] IE Sheet Metal Slab Slices added (only available if IE is installed).\n[M] Config options extended/updated.\n[M] GUI models updated to circumvent too dark representations.\n[M] Dense Grit Sand textures altered to get slightly more visible structure from distance.",
"1.0.20-b7": "[A] Dense Grit Sand added.\n[!] Variant Slab compatibility fix. *This may alter placed slabs of this mod, data fixers don't work yet unfortunately*.",
"1.0.20-b6": "[M] Slab Slice placement improved.\n[M] Quite some naming/refractoring under the hood.",
"1.0.20-b5": "[A] Electrical Furnace can draw in smelting input items from an adjacent inventory when a Hopper is placed in the auxiliary slot.\n[M] Wrapped Labeled Crate label slot to prevent sorting mods from altering the label.",