Stil wählen, merken und fotografieren
F2 wechselt im Spiel den Stil und meldet ihn, --style=NAME wählt ihn beim Start, und das Spiel merkt sich die Wahl in den Einstellungen. Das Bildschirmfoto-Werkzeug nimmt Bilder in einem bestimmten Stil und von der Vitrine auf und zeigt eine zweite Figur mit Namen. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -452,3 +452,30 @@ func test_a_world_that_starts_takes_the_place_of_the_style_samples() -> void:
|
||||
check_eq(main.showcase.process_mode, Node.PROCESS_MODE_DISABLED, "and the samples take no input")
|
||||
check(not main.menu.visible, "the menu stays hidden")
|
||||
_clean_up([directory])
|
||||
|
||||
|
||||
func test_f2_switches_the_style_and_the_choice_is_kept() -> void:
|
||||
var directory := TestFiles.temporary_dir("style")
|
||||
var main := _start_main(directory)
|
||||
main.play(false)
|
||||
var first: StringName = main.art.style.key()
|
||||
_press(main, "next_style")
|
||||
var second: StringName = main.art.style.key()
|
||||
check(second != first, "another style")
|
||||
check_eq(main.hud.message(), tr("STYLE_SWITCHED") % tr(main.art.style.title_key()), "the player is told")
|
||||
_stop_main(main)
|
||||
|
||||
var later := _start_main(directory)
|
||||
check_eq(later.art.style.key(), second, "the next start draws in it again")
|
||||
_clean_up([directory])
|
||||
|
||||
|
||||
func test_the_command_line_chooses_the_style() -> void:
|
||||
var directory := TestFiles.temporary_dir("style-option")
|
||||
var main: Node = load("res://main.tscn").instantiate()
|
||||
main.storage_dir = directory
|
||||
main.command_line = PackedStringArray(["--style=pastel"])
|
||||
tree.root.add_child(main)
|
||||
_started.append(main)
|
||||
check_eq(main.art.style.key(), PastelStyle.KEY, "the style of the command line")
|
||||
_clean_up([directory])
|
||||
|
||||
Reference in New Issue
Block a user