From 2cc2a367b6f83615775505054cb28e783ef47ff5 Mon Sep 17 00:00:00 2001 From: Blank038 Date: Tue, 21 Jul 2026 20:24:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(debug):=20=E4=BF=9D=E6=8C=81=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8A=A0=E5=85=A5=E5=AD=98=E6=A1=A3=E7=9A=84=E5=8C=85?= =?UTF-8?q?=E6=BF=80=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 生成 dev_config 时写入本次调试会话的全部包 UUID,确保自动进入世界后内置调试包和用户包仍处于启用状态。 --- src/debug/level.rs | 4 +++- src/debug/mod.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/debug/level.rs b/src/debug/level.rs index 64d3e5f..a62108d 100644 --- a/src/debug/level.rs +++ b/src/debug/level.rs @@ -41,7 +41,7 @@ pub fn prepare_world(config: &DebugConfig, linked_packs: &[PackInfo]) -> Result< write_world_pack_manifests(config, linked_packs) } -pub fn write_dev_config(config: &DebugConfig) -> Result { +pub fn write_dev_config(config: &DebugConfig, linked_packs: &[PackInfo]) -> Result { let world_dir = world_dir(config); fs::create_dir_all(&world_dir)?; @@ -53,9 +53,11 @@ pub fn write_dev_config(config: &DebugConfig) -> Result { .to_string_lossy() .replace('\\', "/"); + let vip_using_mod: Vec<&str> = linked_packs.iter().map(|pack| pack.uuid.as_str()).collect(); let mut dev_config = json!({ "world_info": { "level_id": config.world_folder_name }, "room_info": {}, + "vip_using_mod": vip_using_mod, "player_info": { "urs": "", "user_id": 0, diff --git a/src/debug/mod.rs b/src/debug/mod.rs index 49ebdfd..81b8a94 100644 --- a/src/debug/mod.rs +++ b/src/debug/mod.rs @@ -40,7 +40,7 @@ pub fn run(project_dir: &Path, new_world: bool) -> Result<()> { } let config_arg = if config.auto_join_game_effective() && !config::env_is_subprocess_mode() { - Some(level::write_dev_config(&config)?) + Some(level::write_dev_config(&config, &linked_packs)?) } else { None };