Complete lab, quest, garrison, and energy tickets
This commit is contained in:
parent
d413d1da9f
commit
0f7edff15a
20 changed files with 238 additions and 45 deletions
|
|
@ -1,7 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
# Preview, not a test - the ship lab at the real 720x1280 viewport, with a
|
||||
# vessel selected and its upgrades listed.
|
||||
# vessel selected, its upgrades listed, and active research in progress.
|
||||
#
|
||||
# bash tests/screenshot.sh res://tests/_lab_menu_preview.tscn /tmp/lab.png 25 720x1280
|
||||
|
||||
|
|
@ -13,10 +13,21 @@ func _ready() -> void:
|
|||
GameState.bank_inventory.set_amount(GameState.RESOURCE_ORE, 310)
|
||||
GameState.fleet_inventory.set_amount(GameState.RESOURCE_ORE, 47)
|
||||
GameState.research_points = 4
|
||||
GameState.build_time_scale = 1.0
|
||||
var lab_id: int = GameState.add_building(GameState.BUILDING_SHIP_LAB,
|
||||
Vector2.ZERO)
|
||||
GameState.queue_lab_research(lab_id, "int_rate")
|
||||
GameState.deposit_resource_to_building(lab_id, GameState.RESOURCE_ORE,
|
||||
GameState.upgrade_cost("int_rate"))
|
||||
GameState.call("_advance_lab_research", GameState.lab_research_time() * 0.42)
|
||||
# Freeze the model so a slow software-rendered capture cannot finish the
|
||||
# research before it takes the frame this preview exists to show.
|
||||
GameState.set_process(false)
|
||||
var main: Node = load("res://world/Main.tscn").instantiate()
|
||||
add_child(main)
|
||||
main.get_node("EnemySpawner").set_process(false)
|
||||
main.get_node("AsteroidField").set_process(false)
|
||||
var build: Node = main.get_node("BuildController")
|
||||
build.lab_menu.visible = true
|
||||
build.lab_building_id = lab_id
|
||||
build.lab_menu.open_for(lab_id)
|
||||
build._refresh_lab()
|
||||
|
|
|
|||
Loading…
Reference in a new issue