Turn dev mode into sandbox menu
This commit is contained in:
parent
68985316e5
commit
c325501999
19 changed files with 651 additions and 54 deletions
28
tests/_dev_menu_preview.gd
Normal file
28
tests/_dev_menu_preview.gd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
extends Node2D
|
||||
|
||||
# Visual-only phone preview for the editor sandbox panel. It builds only the
|
||||
# fleet and the menu; loading Main also schedules infinite-world population,
|
||||
# which is wasted behind this opaque panel and painfully slow in softpipe.
|
||||
#
|
||||
# bash tests/screenshot.sh res://tests/_dev_menu_preview.tscn /tmp/dev_menu.png 4 720x1280
|
||||
|
||||
const FLEET = preload("res://vessels/Fleet.gd")
|
||||
const DEV_MENU = preload("res://ui/menus/DevMenu.tscn")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
GameState.start_dev_game()
|
||||
GameState.dev_unlock_all_skills()
|
||||
var fleet: Node = FLEET.new()
|
||||
add_child(fleet)
|
||||
fleet.spawn_ships(4, Vector2.ZERO, PackedStringArray([
|
||||
GameState.VESSEL_INTERCEPTOR,
|
||||
GameState.VESSEL_SHIELD,
|
||||
GameState.VESSEL_GAS_BOMBER,
|
||||
GameState.VESSEL_LASER,
|
||||
]))
|
||||
var layer := CanvasLayer.new()
|
||||
add_child(layer)
|
||||
var menu: Control = DEV_MENU.instantiate()
|
||||
layer.add_child(menu)
|
||||
menu.open_for(fleet)
|
||||
Loading…
Reference in a new issue