Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
简述
LMPK是一组脚本的集合,可用Zip或目录形式表述。
加载规则
与普通脚本载入方式相同,当加载文件符合以下条件时,该文件会被解析为LMPK脚本包
zip
或lmpk
后缀结尾的zip包其他情况下,文件会被解析为单个lua脚本文件
LMPK格式说明
LMPK可以是一个目录或zip文件,且其必须包含一个名为
manifest.json
的清单文件,以json形式表示。以下是manifest.json
的一个示例其中,
main
字段指定了入口文件,当脚本包被加载后,该入口文件首先会被执行。header
字段取代了普通脚本开头的头部信息,脚本头部的信息将被忽略,字段与原脚本头部字段相同。入口文件可使用
require
等方式加载脚本包内其他模块,lm
将从manifest.json
所在目录进行路径搜寻。