diff --git a/art/backgrounds/wuchao_night_granary.png b/art/backgrounds/wuchao_night_granary.png new file mode 100644 index 0000000..23aec40 Binary files /dev/null and b/art/backgrounds/wuchao_night_granary.png differ diff --git a/data/scenarios/013_wuchao_raid.json b/data/scenarios/013_wuchao_raid.json index fd69e73..5a2216e 100644 --- a/data/scenarios/013_wuchao_raid.json +++ b/data/scenarios/013_wuchao_raid.json @@ -128,6 +128,7 @@ "map": { "width": 17, "height": 11, + "background": "res://art/backgrounds/wuchao_night_granary.png", "terrain": [ "GGGGGHHGGGGGGGGGG", "GGFFGHHGGGFFGGGGG", diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index c16d478..2d6e61b 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -3,6 +3,8 @@ extends SceneTree const BattleStateScript := preload("res://scripts/core/battle_state.gd") const BattleSceneScript := preload("res://scripts/scenes/battle_scene.gd") +const WUCHAO_BACKGROUND_PATH := "res://art/backgrounds/wuchao_night_granary.png" + func _init() -> void: var failures: Array[String] = [] @@ -45,6 +47,7 @@ func _check_battle_visual_data(failures: Array[String]) -> void: failures.append("001 shop should expose merchant lines") _check_image_path(failures, state.get_map_background_path(), "001 map background") + _check_wuchao_background_data(failures) for unit_id in ["cao_cao", "xiahou_dun", "yellow_turban_1", "yellow_turban_2", "yellow_turban_3"]: var unit := state.get_unit(unit_id) if unit.is_empty(): @@ -85,6 +88,18 @@ func _check_battle_visual_data(failures: Array[String]) -> void: _check_alpha_cutout_path(failures, icon_path, "item %s icon cutout" % item_id) +func _check_wuchao_background_data(failures: Array[String]) -> void: + var state = BattleStateScript.new() + if not state.load_battle("res://data/scenarios/013_wuchao_raid.json"): + failures.append("could not load Wuchao raid for background") + return + var background_path := state.get_map_background_path() + if background_path != WUCHAO_BACKGROUND_PATH: + failures.append("013 Wuchao should use its night granary background: %s" % background_path) + return + _check_image_path(failures, background_path, "013 Wuchao map background") + + func _check_scene_texture_loading(failures: Array[String]) -> void: var scene = BattleSceneScript.new() if not scene.state.load_battle("res://data/scenarios/001_yellow_turbans.json"): @@ -121,6 +136,17 @@ func _check_scene_texture_loading(failures: Array[String]) -> void: failures.append("camp conversation button text should preview supply effect") scene.free() + var wuchao_scene = BattleSceneScript.new() + if not wuchao_scene.state.load_battle("res://data/scenarios/013_wuchao_raid.json"): + failures.append("could not load Wuchao scene state") + wuchao_scene.free() + return + if wuchao_scene.state.get_map_background_path() == BattleSceneScript.DEFAULT_BATTLE_BACKGROUND_PATH: + failures.append("Wuchao scene should not rely on the default battlefield background") + if wuchao_scene._current_battle_background_texture() == null: + failures.append("battle scene should load Wuchao night granary background texture") + wuchao_scene.free() + func _check_hud_focus_text(failures: Array[String]) -> void: var scene = BattleSceneScript.new()