Skip to content

Commit 889a635

Browse files
committed
docs: add warning for NativeAPI
chore: pre-release 0.8.3
1 parent 04d3b6c commit 889a635

14 files changed

+52
-20
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.8.3] - 2024-07-14
9+
10+
### Fixed
11+
12+
- Fix Entity::hurt [#152]
13+
- Fix trident consumption for onSpawnProjectile [#143]
14+
815
## [0.8.2] - 2024-07-12
916

1017
### Fixed
@@ -443,8 +450,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
443450
[#130]: https://github.com/LiteLDev/LegacyScriptEngine/issues/130
444451
[#134]: https://github.com/LiteLDev/LegacyScriptEngine/issues/134
445452
[#137]: https://github.com/LiteLDev/LegacyScriptEngine/issues/137
453+
[#143]: https://github.com/LiteLDev/LegacyScriptEngine/issues/143
446454
[#145]: https://github.com/LiteLDev/LegacyScriptEngine/issues/145
455+
[#152]: https://github.com/LiteLDev/LegacyScriptEngine/issues/152
447456

457+
[0.8.3]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.8.2...v0.8.3
448458
[0.8.2]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.8.1...v0.8.2
449459
[0.8.1]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.8.0...v0.8.1
450460
[0.8.0]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.7.12...v0.8.0

docs/apis/NativeAPI/NativeFunction.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# NativeFunction
22

3+
!!! warning
4+
NativeAPI has broken, don't use it in production environment
5+
36
This API set contains two types: `NativeFunction` and `NativeHook`, where `NativeHook` is a specialized implementation that only contains `call` and `address` properties.
47

58
### Symbol get function

docs/apis/NativeAPI/NativeFunction.zh.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# NativeFunction原生函数
22

3+
!!! warning
4+
NativeAPI已损坏,请勿在生产环境中使用
5+
36
此API集包含如下两种类型`NativeFunction``NativeHook`,其中`NativeHook`为特化的实现,只包含`call`,`address`两个属性
47

58
### Symbol获得函数

docs/apis/NativeAPI/NativePointer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# NativePointer
22

3+
!!! warning
4+
NativeAPI has broken, don't use it in production environment
5+
36
This API is designed to help developers manipulate native pointers
47

58
> Due to the x64 calling convention, any object (size>8) is passed by reference. To learn more details, please refer to [msdoc: x64 calling convention](https://docs.microsoft.com/cpp/build/x64-calling-convention)

docs/apis/NativeAPI/NativePointer.zh.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# NativePointer原生指针
22

3+
!!! warning
4+
NativeAPI已损坏,请勿在生产环境中使用
5+
36
此API旨在帮助开发者操作原生指针
47

58
> 由于x64调用约定,任何对象(size>8)均以引用方式传递,欲要了解更多相关细节,请参考[msdoc: x64 calling convention](https://docs.microsoft.com/cpp/build/x64-calling-convention)

docs/apis/NativeAPI/Summary.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# 脚本层原生接口(FFI
1+
# Script layer native interface (FFI)
22

3-
通过在脚本层提供FFI(Foreign Function Interface)相关接口,有助于简化小型修复插件的开发过程,并通过脚本引擎获得较为稳定的ABI,便于在多个版本之间共享插件
3+
!!! warning
4+
NativeAPI has broken, don't use it in production environment
45

5-
> 此类API只适用于对非性能敏感的工作流程,对调用者拥有对原生语言较为透彻及准确的理解,否则极容易带来意外的情况。
6-
> 若需要高性能底层接口,请使用原生语言。
7-
> 由于FFI接口规范仍然在设计当中,接口等相关信息可能在没有通知的情况下随时改变。
6+
By providing FFI (Foreign Function Interface) related interfaces in the script layer, it helps to simplify the development process of small repair plugins, and obtain a more stable ABI through the script engine, which is convenient for sharing plugins across multiple versions
7+
8+
> This kind of API is only suitable for workflows that are not performance sensitive, and the caller has a thorough and accurate understanding of the native language, otherwise it is very easy to cause unexpected situations.
9+
> If you need high-performance low-level interfaces, please use native languages.
10+
> Since the FFI interface specification is still under design, the interface and related information may change at any time without notice.

docs/apis/NativeAPI/Summary.zh.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# Script layer native interface (FFI)
1+
# 脚本层原生接口(FFI
22

3-
By providing FFI (Foreign Function Interface) related interfaces in the script layer, it helps to simplify the development process of small repair plugins, and obtain a more stable ABI through the script engine, which is convenient for sharing plugins across multiple versions
3+
!!! warning
4+
NativeAPI已损坏,请勿在生产环境中使用
45

5-
> This kind of API is only suitable for workflows that are not performance sensitive, and the caller has a thorough and accurate understanding of the native language, otherwise it is very easy to cause unexpected situations.
6-
> If you need high-performance low-level interfaces, please use native languages.
7-
> Since the FFI interface specification is still under design, the interface and related information may change at any time without notice.
6+
通过在脚本层提供FFI(Foreign Function Interface)相关接口,有助于简化小型修复插件的开发过程,并通过脚本引擎获得较为稳定的ABI,便于在多个版本之间共享插件
7+
8+
> 此类API只适用于对非性能敏感的工作流程,对调用者拥有对原生语言较为透彻及准确的理解,否则极容易带来意外的情况。
9+
> 若需要高性能底层接口,请使用原生语言。
10+
> 由于FFI接口规范仍然在设计当中,接口等相关信息可能在没有通知的情况下随时改变。

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "native",
55
"description": "A plugin engine for running LLSE plugins on LeviLamina",
66
"author": "LiteLDev",
7-
"version": "0.8.2",
7+
"version": "0.8.3",
88
"dependencies": [
99
{
1010
"name": "LegacyMoney"

src/legacy/api/NativeAPI.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ Concurrency::concurrent_unordered_map<std::string, NativeFunction> NativeFunctio
2424
return Local<Value>(); \
2525
}
2626

27-
Local<Value> NativeFunction::callNativeFunction(DCCallVM* vm, NativeFunction* funcSymbol, const Arguments& args) {
27+
Local<Value> NativeFunction::callNativeFunction(
28+
DCCallVM* vm,
29+
NativeFunction* funcSymbol,
30+
const Arguments& args
31+
) { // It breaks sometime
2832
if (args.size() < funcSymbol->mParams.size()) {
2933
lse::getSelfPluginInstance().getLogger().error("Too Few arguments!");
3034
lse::getSelfPluginInstance().getLogger().error("In Component: NativeCall");
@@ -522,7 +526,7 @@ Local<Value> ScriptNativeFunction::hook(const Arguments& args) {
522526
hookSymbol->mNativeCallback,
523527
reinterpret_cast<ll::memory::FuncPtr*>(hookOriginl),
524528
ll::memory::HookPriority::Normal
525-
);
529+
); // It's broken
526530
hookSymbol->mFunction = hookOriginl;
527531
return scriptResult;
528532
}

tooth.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"format_version": 2,
33
"tooth": "github.com/LiteLDev/LegacyScriptEngine",
4-
"version": "0.8.2",
4+
"version": "0.8.3",
55
"info": {
66
"name": "LegacyScriptEngine",
77
"description": "A plugin engine for running LLSE plugins on LeviLamina",
@@ -12,7 +12,7 @@
1212
]
1313
},
1414
"dependencies": {
15-
"gitea.litebds.com/LiteLDev/legacy-script-engine-lua": "0.8.2",
16-
"gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs": "0.8.2"
15+
"gitea.litebds.com/LiteLDev/legacy-script-engine-lua": "0.8.3",
16+
"gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs": "0.8.3"
1717
}
1818
}

0 commit comments

Comments
 (0)