Improve draft BGM loops
This commit is contained in:
@@ -45,8 +45,8 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
|
||||
failures.append("title screen should start with an audible menu BGM stream")
|
||||
elif scene.bgm_player.volume_db < -12.0:
|
||||
failures.append("title menu BGM should be loud enough to hear by default: %.1fdb" % scene.bgm_player.volume_db)
|
||||
if scene._bgm_stream_for("battle") == null:
|
||||
failures.append("battle BGM stream should load before combat starts")
|
||||
_check_bgm_stream_quality(failures, scene._bgm_stream_for("menu"), "menu", 20.0)
|
||||
_check_bgm_stream_quality(failures, scene._bgm_stream_for("battle"), "battle", 16.0)
|
||||
for sfx_key in [
|
||||
"ui_click",
|
||||
"menu_confirm",
|
||||
@@ -407,6 +407,15 @@ func _check_title_menu_button_art(failures: Array[String], button: Button, expec
|
||||
failures.append("%s should describe its command through a tooltip" % context)
|
||||
|
||||
|
||||
func _check_bgm_stream_quality(failures: Array[String], stream: AudioStream, label: String, minimum_length: float) -> void:
|
||||
if stream == null:
|
||||
failures.append("%s BGM stream should load before playback" % label)
|
||||
return
|
||||
var length := stream.get_length()
|
||||
if length < minimum_length:
|
||||
failures.append("%s BGM should be a substantial loop, got %.2fs expected %.2fs+" % [label, length, minimum_length])
|
||||
|
||||
|
||||
func _backup_user_file(path: String) -> Dictionary:
|
||||
if not FileAccess.file_exists(path):
|
||||
return {"exists": false, "text": ""}
|
||||
|
||||
Reference in New Issue
Block a user