feat: add visible flag for works

This commit is contained in:
kdletters
2026-05-27 19:30:10 +08:00
parent a7bba70ca5
commit 8e96c8a67c
29 changed files with 198 additions and 12 deletions

View File

@@ -1257,6 +1257,10 @@ fn normalize_migration_row(table_name: &str, value: &serde_json::Value) -> serde
}
if table_name == "puzzle_work_profile" {
if let Some(object) = next_value.as_object_mut() {
// ???????????????????????????????
object
.entry("visible".to_string())
.or_insert_with(|| serde_json::Value::Bool(true));
// 中文注释:拼图公开互动计数晚于基础作品表加入,旧迁移包按 0 兼容。
object
.entry("play_count".to_string())
@@ -1294,8 +1298,26 @@ fn normalize_migration_row(table_name: &str, value: &serde_json::Value) -> serde
.or_insert(fallback_description);
}
}
if matches!(
table_name,
"jump_hop_work_profile"
| "square_hole_work_profile"
| "visual_novel_work_profile"
| "bark_battle_published_config"
) {
if let Some(object) = next_value.as_object_mut() {
// ???????????????????????????????
object
.entry("visible".to_string())
.or_insert_with(|| serde_json::Value::Bool(true));
}
}
if table_name == "match3d_work_profile" {
if let Some(object) = next_value.as_object_mut() {
// ???????????????????????????????
object
.entry("visible".to_string())
.or_insert_with(|| serde_json::Value::Bool(true));
// 中文注释:抓大鹅生成素材字段晚于基础作品表加入,旧迁移包按未生成素材兼容。
object
.entry("generated_item_assets_json".to_string())
@@ -1304,6 +1326,10 @@ fn normalize_migration_row(table_name: &str, value: &serde_json::Value) -> serde
}
if table_name == "wooden_fish_work_profile" {
if let Some(object) = next_value.as_object_mut() {
// ???????????????????????????????
object
.entry("visible".to_string())
.or_insert_with(|| serde_json::Value::Bool(true));
// 中文注释:敲木鱼背景环境图晚于首版作品表加入,旧迁移包按未生成背景兼容。
object
.entry("background_asset_json".to_string())