25 lines
959 B
GDScript3
25 lines
959 B
GDScript3
|
|
extends Node2D
|
||
|
|
|
||
|
|
# Preview, not a test. The ship lab's upgrade screen (#5), so its layout can
|
||
|
|
# be checked on a real viewport - headless draws no pixels.
|
||
|
|
#
|
||
|
|
# bash tests/screenshot.sh res://tests/_lab_menu_preview.tscn /tmp/lab.png 20 720x1280
|
||
|
|
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
GameState.buildings.clear()
|
||
|
|
GameState.extractors.clear()
|
||
|
|
GameState.transporters.clear()
|
||
|
|
GameState.reset_progression()
|
||
|
|
GameState.rocks = 240
|
||
|
|
GameState.unlocked = ["shipyards", "vessel_science"]
|
||
|
|
var main: Node = load("res://Main.tscn").instantiate()
|
||
|
|
add_child(main)
|
||
|
|
main.get_node("BuildingField").place(GameState.BUILDING_SHIP_LAB, Vector2(400.0, 0.0))
|
||
|
|
# A level already bought, so the list shows both a researched and an
|
||
|
|
# unresearched line rather than a uniform page of zeroes.
|
||
|
|
GameState.vessel_levels["int_damage"] = 1
|
||
|
|
var bc: Node = main.get_node("BuildController")
|
||
|
|
main.get_node("UI/LabMenu").visible = true
|
||
|
|
bc.lab_vessel = GameState.VESSEL_INTERCEPTOR
|
||
|
|
bc._refresh_lab()
|