29 lines
1 KiB
GDScript3
29 lines
1 KiB
GDScript3
|
|
extends Node2D
|
||
|
|
|
||
|
|
# Preview scene - NOT run by run_tests.sh (underscore prefix). Opens the
|
||
|
|
# mothership's research tree with one branch already bought and a node
|
||
|
|
# selected, so the laid-out tree, its state colours and the detail panel can
|
||
|
|
# all be checked in one render.
|
||
|
|
#
|
||
|
|
# bash tests/screenshot.sh res://tests/_skill_menu_preview.tscn out.png 30 720x1280
|
||
|
|
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
GameState.buildings.clear()
|
||
|
|
GameState.extractors.clear()
|
||
|
|
GameState.reset_progression()
|
||
|
|
GameState.rocks = 60
|
||
|
|
# One branch researched, so the render shows all three node states at
|
||
|
|
# once: done, reachable, and still locked further out.
|
||
|
|
GameState.unlock("shipyards")
|
||
|
|
GameState.unlock("coordination")
|
||
|
|
|
||
|
|
var main: Node = load("res://Main.tscn").instantiate()
|
||
|
|
add_child(main)
|
||
|
|
main.get_node("AsteroidField").set_process(false)
|
||
|
|
main.get_node("EnemySpawner").set_process(false)
|
||
|
|
|
||
|
|
var controller: Node = main.get_node("BuildController")
|
||
|
|
controller.skill_menu.visible = true
|
||
|
|
controller.skill_tree.selected_id = "wing"
|
||
|
|
controller._refresh_skill_menu("wing")
|