aboutsummaryrefslogtreecommitdiff
path: root/tools/tscn-to-bsn
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-09 01:39:05 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-09 01:39:54 +0800
commit2a6320e39485fb494b827d14d9e76895fa4f58b2 (patch)
treeb3ea4fda9c3349f4c590e297dde2d19688991549 /tools/tscn-to-bsn
parent85bca704b6c807b14df4ad6d71f70ae961290495 (diff)
chore: rename build-cache command to build-uid-indexHEADmaster
Diffstat (limited to 'tools/tscn-to-bsn')
-rw-r--r--tools/tscn-to-bsn/src/cmd/cmd_build_uid_index.rs (renamed from tools/tscn-to-bsn/src/cmd/cmd_build_cache.rs)8
-rw-r--r--tools/tscn-to-bsn/src/cmd/mod.rs11
-rw-r--r--tools/tscn-to-bsn/src/helps/help.txt4
3 files changed, 9 insertions, 14 deletions
diff --git a/tools/tscn-to-bsn/src/cmd/cmd_build_cache.rs b/tools/tscn-to-bsn/src/cmd/cmd_build_uid_index.rs
index 660caf1..e93392b 100644
--- a/tools/tscn-to-bsn/src/cmd/cmd_build_cache.rs
+++ b/tools/tscn-to-bsn/src/cmd/cmd_build_uid_index.rs
@@ -23,8 +23,8 @@ pub struct ResultCacheBuilt {
len: usize,
}
-#[command(node = "build-cache", routeify)]
-pub fn build_cache(proj: &ResGodotProjectDirectory) -> Next {
+#[command(node = "build-uid-index", routeify)]
+pub fn build_uid_index(proj: &ResGodotProjectDirectory) -> Next {
let Some(ref dir) = proj.dir else {
return ErrorGodotProjectNotFound::default().into();
};
@@ -32,8 +32,8 @@ pub fn build_cache(proj: &ResGodotProjectDirectory) -> Next {
// 1. Scan uid → res:// paths
let map = scan_project(dir)?;
- // 2. Write .godot/tscn2bsn.cache.json
- let cache_path = dir.join(".godot").join("tscn2bsn.cache.json");
+ // 2. Write .godot/tscn2bsn.uid-idx.json
+ let cache_path = dir.join(".godot").join("tscn2bsn.uid-idx.json");
if let Some(parent) = cache_path.parent() {
std::fs::create_dir_all(parent)?;
}
diff --git a/tools/tscn-to-bsn/src/cmd/mod.rs b/tools/tscn-to-bsn/src/cmd/mod.rs
index 7d71273..a393940 100644
--- a/tools/tscn-to-bsn/src/cmd/mod.rs
+++ b/tools/tscn-to-bsn/src/cmd/mod.rs
@@ -1,15 +1,12 @@
use mingling::{Program, macros::program_setup};
-use crate::{
- ThisProgram,
- cmd::{cmd_ast::CMDAst, cmd_build_cache::CMDBuildCache},
-};
+use crate::ThisProgram;
pub mod cmd_ast;
-pub mod cmd_build_cache;
+pub mod cmd_build_uid_index;
#[program_setup]
pub fn commands_setup(p: &mut Program<ThisProgram>) {
- p.with_dispatcher(CMDAst);
- p.with_dispatcher(CMDBuildCache);
+ p.with_dispatcher(cmd_ast::CMDAst);
+ p.with_dispatcher(cmd_build_uid_index::CMDBuildUidIndex);
}
diff --git a/tools/tscn-to-bsn/src/helps/help.txt b/tools/tscn-to-bsn/src/helps/help.txt
index 99ed118..4eed086 100644
--- a/tools/tscn-to-bsn/src/helps/help.txt
+++ b/tools/tscn-to-bsn/src/helps/help.txt
@@ -9,6 +9,4 @@ Flags:
Commands:
ast <TSCN_FILE> Analyze the AST of a *.tscn file, output as JSON
-
- build-cache Collect information about the current
- project and build a cache for analysis.
+ build-uid-index Build the uid index for the current Godot project