feat: multi-package loading with base framework support
- Add RuntimeOptions.basePackages for loading framework packages before game package - Add ScriptEngine.loadPackages() for multi-package module merging - LuaDardoScriptEngine merges modules from all packages, game overrides framework - PackageActivationController loads base packages first, then game package - GamePackageManifest parses optional 'base' field - Update docs: README, quick-start, lua-package-format, architecture - Update all test mocks with loadPackages() implementation
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
class RuntimeOptions {
|
||||
const RuntimeOptions({this.runtimeLuaRoot = defaultRuntimeLuaRoot});
|
||||
const RuntimeOptions({
|
||||
this.runtimeLuaRoot = defaultRuntimeLuaRoot,
|
||||
this.basePackages = const [],
|
||||
});
|
||||
|
||||
static const defaultRuntimeLuaRoot = 'assets/runtime/lua';
|
||||
|
||||
final String runtimeLuaRoot;
|
||||
|
||||
// 框架包 gameId 列表,按顺序先于游戏包加载。
|
||||
// 后加载的同名模块覆盖先加载的。
|
||||
final List<String> basePackages;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user