diff options
Diffstat (limited to 'modding/parser.js')
-rw-r--r-- | modding/parser.js | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/modding/parser.js b/modding/parser.js index 26f5320..2c39055 100644 --- a/modding/parser.js +++ b/modding/parser.js @@ -26,7 +26,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": no kartik.ini or kartik.yml file found" } ) @@ -37,13 +37,13 @@ for (index in list) { item = list[index]; parts = item.split("."); - if (parts.length < 2 || parts[0].length > 5 || item.length > 49 || parts.length > 5 || !/^[a-zA-Z0-9.]*$/gm.test(item)) { + if (parts.length < 2 || parts[0].length > 5 || item.length > 49 || parts.length > 7 || !/^[a-zA-Z0-9.]*$/gm.test(item)) { unload(list, item); if (parts.length < 2) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid package name: not enough parts" } ) @@ -52,7 +52,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid package name: tld too long" } ) @@ -61,16 +61,16 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid package name: too long" } ) } - if (parts.length > 5) { + if (parts.length > 7) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid package name: too many parts" } ) @@ -79,7 +79,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid package name: invalid format" } ) @@ -95,7 +95,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": both kartik.ini and kartik.yml found" } ) @@ -114,7 +114,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": ini parser error" } ) @@ -128,7 +128,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": yaml parser error" } ) @@ -149,7 +149,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid root section: " + r } ) @@ -163,7 +163,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid meta section: " + r } ) @@ -175,7 +175,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": meta sections incomplete" } ) @@ -190,7 +190,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid property: " + r } ) @@ -202,7 +202,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": properties incomplete" } ) @@ -218,7 +218,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": mod made for another version of Kartik" } ) @@ -229,7 +229,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": invalid game version" } ) @@ -248,7 +248,7 @@ for (index in list) { dialog.showMessageBoxSync( { type: "error", - title: "Illegal Instruction", + title: "KMP Mod Loader", message: "On package " + item + ": block " + hook + " required by hook " + hookn + " not found" } ) @@ -270,6 +270,7 @@ for (index in list) { mod["_Path"] = homedir + "/.kartik/mods/" + item; + console.log(" * KMP hook: " + item + "$" + hookn) require('./hooks')(mod, hookn, hook); } } |