diff --git a/README.md b/README.md deleted file mode 100644 index acd9557..0000000 --- a/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# legacy-script-engine-quickjs - -A plugin engine for running LLSE plugins on LeviLamina - -## Install - -```sh -lip install gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs -``` - -## Usage - -1. Put LLSE plugins directly in `/path/to/bedrock_dedicated_server/plugins/`。 - -2. Run the server, then the plugins will be migrated to LeviLamina plugin manifest automatically. - -3. To load them, you need to restart the server. - -For more information, please refer to [the documentation](https://lse.liteldev.com). - -## Contributing - -If you have any questions, please open an issue to discuss it. - -PRs are welcome. - -## License - -GPL-3.0-only © LiteLDev diff --git a/legacy-script-engine-quickjs/baselib/BaseLib.js b/legacy-script-engine-quickjs/baselib/BaseLib.js new file mode 100644 index 0000000..a7dbc56 Binary files /dev/null and b/legacy-script-engine-quickjs/baselib/BaseLib.js differ diff --git a/legacy-script-engine-quickjs/baselib/BaseLib.lua b/legacy-script-engine-quickjs/baselib/BaseLib.lua new file mode 100644 index 0000000..816c47e --- /dev/null +++ b/legacy-script-engine-quickjs/baselib/BaseLib.lua @@ -0,0 +1,24 @@ +-- --------------------- +-- For require +-- --------------------- +package.path = "plugins/lib/?.lua;" .. package.path + + +-- --------------------- +-- For Compatibility +-- --------------------- +file = File +lxl = ll; +-- DirectionAngle.valueOf = DirectionAngle.toFacing +LXL_Block = LLSE_Block +LXL_BlockEntity = LLSE_BlockEntity +LXL_Container = LLSE_Container +LXL_Device = LLSE_Device +LXL_Entity = LLSE_Entity +LXL_SimpleForm = LLSE_SimpleForm +LXL_CustomForm = LLSE_CustomForm +LXL_Item = LLSE_Item +LXL_Player = LLSE_Player +LXL_Objective = LLSE_Objective +ll.export = ll.exports +ll.import = ll.imports diff --git a/legacy-script-engine-quickjs/baselib/BaseLib.py b/legacy-script-engine-quickjs/baselib/BaseLib.py new file mode 100644 index 0000000..4421d1f --- /dev/null +++ b/legacy-script-engine-quickjs/baselib/BaseLib.py @@ -0,0 +1,20 @@ +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) diff --git a/legacy-script-engine-quickjs/lang/de.json b/legacy-script-engine-quickjs/lang/de.json new file mode 100644 index 0000000..7b07881 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/de.json differ diff --git a/legacy-script-engine-quickjs/lang/en.json b/legacy-script-engine-quickjs/lang/en.json new file mode 100644 index 0000000..aa586b5 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/en.json differ diff --git a/legacy-script-engine-quickjs/lang/fr.json b/legacy-script-engine-quickjs/lang/fr.json new file mode 100644 index 0000000..342ee51 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/fr.json differ diff --git a/legacy-script-engine-quickjs/lang/id.json b/legacy-script-engine-quickjs/lang/id.json new file mode 100644 index 0000000..aa93ca6 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/id.json differ diff --git a/legacy-script-engine-quickjs/lang/it.json b/legacy-script-engine-quickjs/lang/it.json new file mode 100644 index 0000000..32239a0 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/it.json differ diff --git a/legacy-script-engine-quickjs/lang/ja.json b/legacy-script-engine-quickjs/lang/ja.json new file mode 100644 index 0000000..ef5be1b Binary files /dev/null and b/legacy-script-engine-quickjs/lang/ja.json differ diff --git a/legacy-script-engine-quickjs/lang/ko.json b/legacy-script-engine-quickjs/lang/ko.json new file mode 100644 index 0000000..d04fd43 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/ko.json differ diff --git a/legacy-script-engine-quickjs/lang/pt_BR.json b/legacy-script-engine-quickjs/lang/pt_BR.json new file mode 100644 index 0000000..196cbec Binary files /dev/null and b/legacy-script-engine-quickjs/lang/pt_BR.json differ diff --git a/legacy-script-engine-quickjs/lang/ru.json b/legacy-script-engine-quickjs/lang/ru.json new file mode 100644 index 0000000..575a1b1 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/ru.json differ diff --git a/legacy-script-engine-quickjs/lang/th.json b/legacy-script-engine-quickjs/lang/th.json new file mode 100644 index 0000000..afb04b2 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/th.json differ diff --git a/legacy-script-engine-quickjs/lang/tr.json b/legacy-script-engine-quickjs/lang/tr.json new file mode 100644 index 0000000..d7272c0 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/tr.json differ diff --git a/legacy-script-engine-quickjs/lang/vi.json b/legacy-script-engine-quickjs/lang/vi.json new file mode 100644 index 0000000..c5f6698 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/vi.json differ diff --git a/legacy-script-engine-quickjs/lang/zh_CN.json b/legacy-script-engine-quickjs/lang/zh_CN.json new file mode 100644 index 0000000..d440aef Binary files /dev/null and b/legacy-script-engine-quickjs/lang/zh_CN.json differ diff --git a/legacy-script-engine-quickjs/lang/zh_TW.json b/legacy-script-engine-quickjs/lang/zh_TW.json new file mode 100644 index 0000000..54ad6e1 Binary files /dev/null and b/legacy-script-engine-quickjs/lang/zh_TW.json differ diff --git a/legacy-script-engine-quickjs/legacy-script-engine-quickjs.dll b/legacy-script-engine-quickjs/legacy-script-engine-quickjs.dll new file mode 100644 index 0000000..d83309c Binary files /dev/null and b/legacy-script-engine-quickjs/legacy-script-engine-quickjs.dll differ diff --git a/legacy-script-engine-quickjs/manifest.json b/legacy-script-engine-quickjs/manifest.json new file mode 100644 index 0000000..6b53094 --- /dev/null +++ b/legacy-script-engine-quickjs/manifest.json @@ -0,0 +1,19 @@ +{ + "name": "legacy-script-engine-quickjs", + "entry": "legacy-script-engine-quickjs.dll", + "type": "native", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "version": "0.7.12", + "dependencies": [ + { + "name": "LegacyMoney" + }, + { + "name": "LegacyParticleAPI" + }, + { + "name": "LegacyRemoteCall" + } + ] +} diff --git a/tooth.json b/tooth.json new file mode 100644 index 0000000..7b2eb3f --- /dev/null +++ b/tooth.json @@ -0,0 +1,30 @@ +{ + "format_version": 2, + "tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs", + "version": "0.7.12", + "info": { + "name": "LegacyScriptEngine with QuickJs backend", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "tags": [ + "levilamina", + "plugin-engine" + ] + }, + "dependencies": { + "github.com/LiteLDev/LegacyRemoteCall": "0.7.x", + "github.com/LiteLDev/LegacyParticleAPI": "0.7.x", + "github.com/LiteLDev/LegacyMoney": "0.7.x" + }, + "prerequisites": { + "github.com/LiteLDev/LeviLamina": "0.12.x" + }, + "files": { + "place": [ + { + "src": "legacy-script-engine-quickjs/*", + "dest": "plugins/legacy-script-engine-quickjs/" + } + ] + } +}