5
0

Compare commits

...

16 Commits

Author SHA1 Message Date
Actions
7647d77ab2 Release v0.10.0-rc.2 2025-03-01 17:01:11 +00:00
Actions
67648be8c7 Release v0.10.0-rc.1 2025-03-01 13:27:30 +00:00
Actions
a8872b1b13 Release v0.9.7 2025-02-10 11:21:14 +00:00
Actions
b3a5533659 Release v0.9.6 2025-02-07 15:08:30 +00:00
Actions
2cb0d3ff2d Release v0.9.5 2025-02-04 05:37:04 +00:00
Actions
d2199ca940 Release v0.9.4 2025-02-02 03:51:11 +00:00
Actions
62443bce8f Release v0.9.3 2025-01-30 09:00:50 +00:00
Actions
6bde20d3ce Release v0.9.2 2025-01-29 13:16:08 +00:00
Actions
f03fd6c657 Release v0.9.1 2025-01-26 12:47:18 +00:00
Actions
fd4561e1f3 Release v0.9.0 2025-01-25 15:50:04 +00:00
Actions
992785626d Release v0.9.0-rc.5 2025-01-15 11:34:31 +00:00
Actions
019050ab9b Release v0.9.0-rc.4 2025-01-13 02:54:53 +00:00
Actions
789b7c969e Release v0.9.0-rc.3 2025-01-12 05:57:00 +00:00
Actions
c9f803c9bc Release v0.9.0-rc.2 2025-01-10 15:20:05 +00:00
Actions
5a142bef6c Release v0.9.0-rc.1 2025-01-09 08:05:52 +00:00
Actions
b06fb94055 Release v0.8.20 2024-12-01 05:45:15 +00:00
19 changed files with 172 additions and 497 deletions

View File

@ -1,417 +0,0 @@
/*
cjs.js begin, see <https://github.com/callstackexceed/cjs.js>
Copyright 2021 callstackexceed
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
(function () {
if (typeof require != "undefined") {
log("require already exist");
}
let coreModules = new Map([]);
let basePath = "plugins/";
let utilPath = {
normalize(path) {
let dirs = path.split("/");
if (dirs[dirs.length - 1] === "") {
dirs.pop();
}
let newDirs = dirs.reduce((newDirs, dir) => {
switch (dir) {
case ".":
/* no-op */
break;
case "..":
if (
newDirs.length === 0 ||
newDirs[newDirs.length - 1] == ".."
) {
newDirs.push("..");
} else {
newDirs.pop();
}
break;
default:
newDirs.push(dir);
break;
}
return newDirs;
}, []);
return newDirs.join("/");
},
join(...paths) {
let newPath = paths
.map((path) => {
return utilPath.normalize(path);
})
.join("/");
return utilPath.normalize(newPath);
},
dirname(path) {
return path.replace(/\/[^\/]+$/, "");
},
split(path) {
return path.split("/");
},
};
let currentModule = createModule("", null);
currentModule.path = basePath;
/*
** See https://nodejs.org/api/modules.html#modules_all_together
*/
function resolveID(id) {
let currentPath = (currentModule && currentModule.path) || basePath;
let requestPaths = [];
let result;
if (coreModules.has(id)) {
return coreModules.get(id);
}
if (id.startsWith("/")) {
result = loadAsFile(id);
if (result != undefined) {
return result;
}
result = loadAsDirectory(id);
if (result != undefined) {
return result;
}
throw new Error(`${id} not found`);
}
if (id.startsWith("./") || id.startsWith("../")) {
result = loadAsFile(utilPath.join(currentPath, id));
if (result != undefined) {
return result;
}
result = loadAsDirectory(utilPath.join(currentPath, id));
if (result != undefined) {
return result;
}
throw new Error(`${utilPath.join(currentPath, id)} not found`);
}
if (id.startsWith("#")) {
result = loadPackageImports(id, currentPath);
if (result != undefined) {
return result;
}
}
result = loadPackageSelf(id, currentPath);
if (result != undefined) {
return result;
}
result = loadNodeModules(id, currentPath);
if (result != undefined) {
return result;
}
throw new Error(
`${id} not found, required by ${currentModule && currentModule.id}`
);
function tryFile(path) {
if (path.startsWith("../")) {
throw new Error("cannot require file out of root dir");
}
path = path.replace(/^\//, "");
let cjsSelf = "plugins/cjs.js";
if (path === cjsSelf) {
throw new Error("cjs.js is trying to load itself");
}
requestPaths.push(path);
let content = file.readFrom(path);
if (content == undefined) {
return undefined;
}
if (path.endsWith(".mjs")) {
throw new Error(`ERROR: cannot require a ESM file ${path}`);
}
if (path.endsWith(".json")) {
throw new Error(`ERROR: cannot require a JSON file ${path}`);
}
return {
path,
content,
requestPaths,
};
}
function loadAsFile(id) {
let result;
result = tryFile(id);
if (result != undefined) {
return result;
}
result = tryFile(`${id}.js`);
if (result != undefined) {
return result;
}
result = tryFile(`${id}.cjs`);
if (result != undefined) {
return result;
}
result = tryFile(`${id}.json`);
if (result != undefined) {
throw new Error(`cannot require a JSON file ${id}.mjs`);
}
result = tryFile(`${id}.mjs`);
if (result != undefined) {
throw new Error(`cannot require a ESM file ${id}.mjs`);
}
return undefined;
}
function loadIndex(id) {
let result;
result = tryFile(utilPath.join(id, "index.js"));
if (result != undefined) {
return result;
}
result = tryFile(utilPath.join(id, "index.cjs"));
if (result != undefined) {
return result;
}
result = tryFile(utilPath.join(id, "index.json"));
if (result != undefined) {
throw new Error(`cannot require a JSON file ${id}.mjs`);
}
result = tryFile(utilPath.join(id, "index.mjs"));
if (result != undefined) {
throw new Error(`cannot require a ESM file ${id}.mjs`);
}
return undefined;
}
function loadAsDirectory(id) {
let package = file.readFrom(utilPath.join(id, "package.json"));
if (package != undefined) {
let result;
package = JSON.parse(package);
if (!package || !package.main) {
return loadIndex(id);
}
let m = utilPath.join(id, package.main);
result = loadAsFile(m);
if (result != undefined) {
return result;
}
result = loadIndex(m);
if (result != undefined) {
return result;
}
throw new Error(`${m} not found`);
}
return loadIndex(id);
}
function loadNodeModules(id, start) {
let dirs = node_modules_paths(start);
let result;
for (let dir of dirs) {
result = loadPackagExports(utilPath.join(dir, id));
if (result != undefined) {
return result;
}
result = loadAsFile(utilPath.join(dir, id));
if (result != undefined) {
return result;
}
result = loadAsDirectory(utilPath.join(dir, id));
if (result != undefined) {
return result;
}
}
return undefined;
}
function node_modules_paths(start) {
let parts = utilPath.split(start);
let dirs = [""];
for (let i = parts.length; i >= 0; --i) {
if (parts[i - 1] === "node_modules") {
continue;
}
let dir = utilPath.join(...parts.slice(0, i), "node_modules");
dirs.push(dir);
}
return dirs;
}
function loadPackageImports(id) {
//TODO
let package = file.readFrom(utilPath.join(id, "package.json"));
if (package == undefined) {
return undefined;
}
package = JSON.parse(package);
if (package && package.imports) {
throw new Error(`cannot resolve imports field of ${id}`);
}
return undefined;
}
function loadPackagExports(id) {
//TODO
let package = file.readFrom(utilPath.join(id, "package.json"));
if (package == undefined) {
return undefined;
}
package = JSON.parse(package);
if (package && package.exports) {
throw new Error(`cannot resolve exports field of ${id}`);
}
return undefined;
}
function loadPackageSelf(id) {
return undefined;
}
}
function createModule(id, parent) {
return {
children: [],
parent,
exports: {},
filename: id,
id,
isPreloading: false,
loaded: false,
path: utilPath.dirname(id),
paths: undefined,
require: cjsRequire,
};
}
function cjsRequire(id) {
let parrentModule = currentModule;
let { path, content } = resolveID(id);
if (cjsRequire.cache[path] !== undefined) {
let thisModule = cjsRequire.cache[path];
if (parrentModule && !parrentModule.children.includes(thisModule)) {
parrentModule.children.push(thisModule);
}
if (thisModule.loaded === false) {
//TODO
}
return thisModule.exports;
}
let moduleObject = createModule(path, parrentModule);
currentModule = moduleObject;
cjsRequire.cache[path] = moduleObject;
let code;
try {
code = new Function(
"exports",
"require",
"module",
"__filename",
"__dirname",
content
);
} catch (e) {
e.stack = e.stack.replace(
"at new Function (<anonymous>)",
`at Object.<anonymous> (${moduleObject.id})`
);
throw e;
}
Object.defineProperty(code, "name", {
value: `@file"${moduleObject.id}"`,
});
try {
code.apply(moduleObject, [
moduleObject.exports,
cjsRequire,
moduleObject,
path,
utilPath.dirname(path),
]);
} catch (e) {
e.stack = e.stack
.replace(
/at Object\.@file"([^"]*)" \(eval at cjsRequire \(:\d+:\d+\), <anonymous>:(\d+):(\d+)\)/g,
(match, fileName, line, col) => {
return `at Object.<anonymous> (${fileName}:${line - 2
}:${col})`;
}
)
.replace(
/at (\w*) \(eval at cjsRequire \(:\d+:\d+\), <anonymous>:(\d+):(\d+)\)/g,
(match, functionName, line, col) => {
return `at ${functionName} (${line - 2}:${col})`;
}
)
.replace(/ at cjsRequire \(<anonymous>:\d+:\d+\)\n/g, "");
throw e;
}
currentModule.loaded = true;
currentModule = parrentModule;
return moduleObject.exports;
}
cjsRequire.main = currentModule;
cjsRequire.cache = {
"": currentModule,
};
cjsRequire.resolve = function resolve(request) {
let obj = resolveID(request);
return obj && obj.path;
};
cjsRequire.resolve.paths = function paths(request) {
let obj = resolveID(request);
return obj && obj.requestPaths;
};
globalThis.require = cjsRequire;
})();
/*
cjs.js end
*/
globalThis.exports = {};
globalThis.module = { exports: {} };
/*
For Compatibility
*/
globalThis.file = File;
globalThis.lxl = ll;
DirectionAngle.prototype.valueOf = DirectionAngle.prototype.toFacing;
globalThis.LXL_Block = LLSE_Block;
globalThis.LXL_BlockEntity = LLSE_BlockEntity;
globalThis.LXL_Container = LLSE_Container;
globalThis.LXL_Device = LLSE_Device;
globalThis.LXL_Entity = LLSE_Entity;
globalThis.LXL_SimpleForm = LLSE_SimpleForm;
globalThis.LXL_CustomForm = LLSE_CustomForm;
globalThis.LXL_Item = LLSE_Item;
globalThis.LXL_Player = LLSE_Player;
globalThis.LXL_Objective = LLSE_Objective;
ll.export = ll.exports;
ll.import = ll.imports;

View File

@ -1,20 +0,0 @@
def _llse_python_base_lib_handle(event):
def wrapper(func):
__builtins__.mc.listen(event, func)
return func
return wrapper
def _llse_python_base_lib_command_handle(self, func=None):
def wrapper(func):
self.setCallback(func)
return func
if func:
return wrapper(func)
return wrapper
setattr(__builtins__, "handle", _llse_python_base_lib_handle)
setattr(__builtins__.LLSE_Command, "handle", _llse_python_base_lib_command_handle)

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip erfolgreich abgeschlossen."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Laufzeitbefehl {} existiert bereits, Änderungen werden außer setOverload nicht angewendet!",
"Failed to initialize file mapping": "Fehler beim Initialisieren der Dateizuordnung",
"Failed to initialize map file": "Fehler beim Initialisieren der Kartendatei",
"Command {} failed to execute, is the plugin unloaded?": "Befehl {} konnte nicht ausgeführt werden, wird das Plugin entladen?",
"Could not find {} in registered commands": {
"": "Konnte {} in registrierten Befehlen nicht finden."
},
"Event {} not found!": "Event {} nicht gefunden!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip finished successfully."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip terminé avec succès."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "La commande d'exécution {} existe déjà, les modifications ne seront pas appliquées sauf pour setOverload !",
"Failed to initialize file mapping": "Impossible d'initialiser le mappage du fichier",
"Failed to initialize map file": "Impossible d'initialiser le fichier de carte",
"Command {} failed to execute, is the plugin unloaded?": "La commande {} n'a pas réussi à s'exécuter, le plugin est-il déchargé ?",
"Could not find {} in registered commands": {
"": "Impossible de trouver {} dans les commandes enregistrées."
},
"Event {} not found!": "Événement {} introuvable !"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip selesai secara sukses."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip finito con successo."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Il comando Runtime {} esiste già, le modifiche non saranno applicate tranne per setOverload!",
"Failed to initialize file mapping": "Impossibile inizializzare la mappatura dei file",
"Failed to initialize map file": "Impossibile inizializzare il file mappa",
"Command {} failed to execute, is the plugin unloaded?": "L'esecuzione del comando {} non è riuscita, il plugin è stato scaricato?",
"Could not find {} in registered commands": {
"": "Impossibile trovare {} nei comandi registrati."
},
"Event {} not found!": "Evento {} non trovato!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "ピップは正常に終了しました。"
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "ランタイムコマンド {} が既に存在します。変更は setOverload 以外は適用されません。",
"Failed to initialize file mapping": "ファイルマッピングの初期化に失敗しました",
"Failed to initialize map file": "マップファイルの初期化に失敗しました",
"Command {} failed to execute, is the plugin unloaded?": "コマンド {} の実行に失敗しました。プラグインがアンロードされていますか?",
"Could not find {} in registered commands": {
"": "登録されたコマンドで {} が見つかりませんでした。"
},
"Event {} not found!": "イベント {} が見つかりません!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "pip가 성공적으로 실행됐습니다"
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip concluído com sucesso."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Comando de execução {} já existe, as alterações não serão aplicadas exceto para setOverload!",
"Failed to initialize file mapping": "Falha ao inicializar o mapeamento de arquivos",
"Failed to initialize map file": "Falha ao inicializar arquivo de mapa",
"Command {} failed to execute, is the plugin unloaded?": "Comando {} falha ao executar, o plugin está descarregado?",
"Could not find {} in registered commands": {
"": "Não foi possível encontrar {} nos comandos registrados."
},
"Event {} not found!": "Evento {} não encontrado!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip успешно выполнено."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Команда Runtime {} уже существует, изменения не будут работать, кроме setOverload!",
"Failed to initialize file mapping": "Не удалось инициализировать сопоставление файлов",
"Failed to initialize map file": "Не удалось инициализировать файл карты",
"Command {} failed to execute, is the plugin unloaded?": "Не удалось выполнить команду {}, не загружен ли плагин?",
"Could not find {} in registered commands": {
"": "Не удалось найти {} в зарегистрированных командах."
},
"Event {} not found!": "Событие {} не найдено!"
}

View File

@ -35,7 +35,7 @@
}
},
"Error occurred": {
" Exit code: {code}": "Error occurred. Exit code: {code}"
" Exit code: {code}": "เกิดข้อผิดพลาด โค้ด: {code}"
},
"Executing \"pip install\" for plugin {name}": {
"": {
@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip finished successfully."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip başarıyla tamamlandı."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip kết thúc thành công."
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip 命令成功完成"
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "运行时命令 {} 已经存在,除 setOverload 外的更改将不会被应用!",
"Failed to initialize file mapping": "初始化文件映射失败",
"Failed to initialize map file": "初始化映射文件失败",
"Command {} failed to execute, is the plugin unloaded?": "命令 {} 执行失败,是否已卸载该插件?",
"Could not find {} in registered commands": {
"": "在已注册的命令中找不到 {} 。"
},
"Event {} not found!": "找不到事件 {} "
}

View File

@ -46,5 +46,13 @@
},
"Pip finished successfully": {
"": "Pip 命令已成功完成"
}
},
"Runtime command {} already exists, changes will not beapplied except for setOverload!": "Runtime command {} already exists, changes will not beapplied except for setOverload!",
"Failed to initialize file mapping": "Failed to initialize file mapping",
"Failed to initialize map file": "Failed to initialize map file",
"Command {} failed to execute, is the plugin unloaded?": "Command {} failed to execute, is the plugin unloaded?",
"Could not find {} in registered commands": {
"": "Could not find {} in registered commands."
},
"Event {} not found!": "Event {} not found!"
}

View File

@ -1,10 +1,10 @@
{
"name": "legacy-script-engine-lua",
"entry": "legacy-script-engine-lua.dll",
"version": "0.10.0",
"type": "native",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
"author": "LiteLDev",
"version": "0.8.19",
"dependencies": [
{
"name": "LegacyMoney"

View File

@ -1,23 +1,23 @@
{
"format_version": 2,
"tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-lua",
"version": "0.8.19",
"version": "0.10.0-rc.2",
"info": {
"name": "LegacyScriptEngine with Lua backend",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
"author": "LiteLDev",
"tags": [
"levilamina",
"platform:levilamina",
"plugin-engine"
]
},
"dependencies": {
"github.com/LiteLDev/LegacyRemoteCall": "0.8.x",
"github.com/LiteLDev/LegacyParticleAPI": "0.8.x",
"github.com/LiteLDev/LegacyMoney": "0.8.x"
"github.com/LiteLDev/LegacyRemoteCall": "0.10.x",
"github.com/LiteLDev/LegacyParticleAPI": "0.10.x",
"github.com/LiteLDev/LegacyMoney": "0.10.x"
},
"prerequisites": {
"github.com/LiteLDev/LeviLamina": ">=0.13.4 <0.14.0"
"github.com/LiteLDev/LeviLamina": "1.1.x"
},
"files": {
"place": [