feat: add wooden fish play template

This commit is contained in:
2026-05-21 23:34:07 +08:00
parent ef09a23c35
commit 5b0f9f3763
121 changed files with 11580 additions and 159 deletions

View File

@@ -192,6 +192,7 @@ fn seed_creation_entry_config_if_missing(ctx: &ReducerContext) {
},
);
migrate_baby_object_match_entry_from_old_coming_soon_default(ctx, now);
migrate_wooden_fish_entry_from_old_puzzle_image_default(ctx, now);
}
fn migrate_visual_novel_entry_from_old_visible_default(ctx: &ReducerContext, now: Timestamp) {
@@ -296,6 +297,34 @@ fn migrate_baby_object_match_entry_from_old_coming_soon_default(
});
}
fn migrate_wooden_fish_entry_from_old_puzzle_image_default(ctx: &ReducerContext, now: Timestamp) {
let id = "wooden-fish".to_string();
let Some(row) = ctx.db.creation_entry_type_config().id().find(&id) else {
return;
};
// 中文注释:只替换敲木鱼旧默认入口图,不覆盖后台手动设置过的其它展示信息。
let still_old_puzzle_image_default = row.title == "敲木鱼"
&& row.subtitle == "点击祈福轻玩法"
&& row.badge == "可创建"
&& row.image_src == "/creation-type-references/puzzle.webp"
&& row.visible
&& row.open
&& row.sort_order == 47;
if !still_old_puzzle_image_default {
return;
}
ctx.db
.creation_entry_type_config()
.id()
.update(CreationEntryTypeConfig {
image_src: "/wooden-fish/default-hit-object.png".to_string(),
updated_at: now,
..row
});
}
fn default_creation_entry_type_configs(now: Timestamp) -> Vec<CreationEntryTypeConfig> {
module_runtime::default_creation_entry_type_snapshots(now.to_micros_since_unix_epoch())
.into_iter()