refactor(core): 统一参数命名 - worldId/sceneId 改为 worldName/sceneName (#225)

* refactor(core): 统一参数命名 - worldId/sceneId 改为 worldName/sceneName

* test(core): 更新测试用例以匹配新的错误消息

* refactor(core): 提高代码覆盖率 - 添加参数验证和测试
This commit is contained in:
YHH
2025-11-15 00:20:17 +08:00
committed by GitHub
parent af49870084
commit eac660b1a0
6 changed files with 116 additions and 84 deletions

View File

@@ -275,7 +275,7 @@ export class DebugPlugin implements IPlugin, IService {
* @param filter - 查询过滤器
*/
public queryEntities(filter: {
sceneId?: string;
sceneName?: string;
tag?: number;
name?: string;
hasComponent?: string;
@@ -289,7 +289,7 @@ export class DebugPlugin implements IPlugin, IService {
for (const world of worlds) {
for (const scene of world.getAllScenes()) {
if (filter.sceneId && scene.name !== filter.sceneId) {
if (filter.sceneName && scene.name !== filter.sceneName) {
continue;
}