feat: add puzzle clear template runtime
This commit is contained in:
@@ -131,6 +131,20 @@ pub fn default_creation_entry_type_snapshots(
|
||||
20,
|
||||
updated_at_micros,
|
||||
),
|
||||
build_default_creation_entry_type_snapshot(
|
||||
"puzzle-clear",
|
||||
"拼消消",
|
||||
"拼接消除玩法",
|
||||
"可创建",
|
||||
"/creation-type-references/puzzle.webp",
|
||||
true,
|
||||
true,
|
||||
46,
|
||||
"recommended",
|
||||
"热门推荐",
|
||||
20,
|
||||
updated_at_micros,
|
||||
),
|
||||
build_default_creation_entry_type_snapshot(
|
||||
"wooden-fish",
|
||||
"敲木鱼",
|
||||
|
||||
@@ -293,6 +293,22 @@ mod tests {
|
||||
assert_eq!(wooden_fish.image_src, "/wooden-fish/default-hit-object.png");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_creation_entry_types_include_puzzle_clear() {
|
||||
let configs = default_creation_entry_type_snapshots(1);
|
||||
let puzzle_clear = configs
|
||||
.iter()
|
||||
.find(|item| item.id == "puzzle-clear")
|
||||
.expect("puzzle-clear creation entry should be seeded");
|
||||
|
||||
assert_eq!(puzzle_clear.title, "拼消消");
|
||||
assert!(puzzle_clear.visible);
|
||||
assert!(puzzle_clear.open);
|
||||
assert_eq!(puzzle_clear.badge, "可创建");
|
||||
assert_eq!(puzzle_clear.sort_order, 46);
|
||||
assert_eq!(puzzle_clear.category_id, "recommended");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn normalized_clamps_music_volume_into_valid_range() {
|
||||
let low = RuntimeSettings::normalized(-1.0, RuntimePlatformTheme::Light);
|
||||
|
||||
Reference in New Issue
Block a user