- 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
15 lines
385 B
Dart
15 lines
385 B
Dart
class RuntimeOptions {
|
|
const RuntimeOptions({
|
|
this.runtimeLuaRoot = defaultRuntimeLuaRoot,
|
|
this.basePackages = const [],
|
|
});
|
|
|
|
static const defaultRuntimeLuaRoot = 'assets/runtime/lua';
|
|
|
|
final String runtimeLuaRoot;
|
|
|
|
// 框架包 gameId 列表,按顺序先于游戏包加载。
|
|
// 后加载的同名模块覆盖先加载的。
|
|
final List<String> basePackages;
|
|
}
|