#110: a dev-mode button that puts a wave on the board now
Waves are on a fifty-second clock, which makes anything that happens during one - the alert, the pathing, buildings taking damage, an outpost garrison earning its keep - slow to look at even once. It skips the warning as well as the peace: the point of the button is to see the wave, and waiting out a nine-second alert every time would make it useless as a tool. Gated on dev mode, the same gate the main menu already uses for the map editor, so it does not exist in a shipped build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
0c48b5e739
commit
f9ed46746d
3 changed files with 388 additions and 0 deletions
28
ui/DevWaveButton.gd
Normal file
28
ui/DevWaveButton.gd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
extends Control
|
||||
|
||||
# #110: a dev-only button that puts a wave on the board now.
|
||||
#
|
||||
# Waves are otherwise on a fifty-second clock, which makes anything that
|
||||
# happens during one - the alert, the pathing, buildings taking damage, an
|
||||
# outpost garrison actually earning its keep - slow to look at even once.
|
||||
#
|
||||
# Dev mode is the same gate the main menu already uses for the map editor:
|
||||
# these are tools for building the game, and a player who installed a build
|
||||
# has no use for them. The button does not exist outside it.
|
||||
|
||||
@onready var button: IconButton = get_node("Button")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
button.pressed.connect(_on_pressed)
|
||||
visible = false
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
var show_it: bool = GameState.dev_mode and not GameState.intro_active
|
||||
if show_it != visible:
|
||||
visible = show_it
|
||||
|
||||
|
||||
func _on_pressed() -> void:
|
||||
GameState.force_wave_now()
|
||||
Loading…
Reference in a new issue