Unveränderter Ausgangsstand inklusive Masterprompt und Konzeptbildern unter assets/. .godot/ und docs/screenshots/ bleiben laut .gitignore unversioniert; letztere sind unter ../backups gesichert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.5 KiB
GDScript
58 lines
2.5 KiB
GDScript
extends Node
|
|
## Glasballiste from the real game camera: two upgraded g05 → g06 in a Glutpakt formation.
|
|
## Run: godot --path . res://tools/glass_field_review.tscn
|
|
var main: Node3D
|
|
var captures := "res://docs/screenshots/phase19"
|
|
func _ready() -> void:
|
|
call_deferred("run")
|
|
func shot(name: String) -> void:
|
|
for n: int in range(6): await get_tree().process_frame
|
|
await RenderingServer.frame_post_draw
|
|
get_viewport().get_texture().get_image().save_png(captures + "/" + name + ".png")
|
|
print("GLASS_FIELD_SHOT: ", name, " phase=", GameState.phase_name(), " size=", main.camera.size)
|
|
func upgrade_to_glass(cell: Vector2i) -> bool:
|
|
if not EconomyManager.apply_command(0, {"type": "build", "type_id": "g05", "cell": cell}).ok and cell != Vector2i(2, 4):
|
|
return false
|
|
for entry: Dictionary in EconomyManager.get_team(0).roster:
|
|
if entry.cell == cell and entry.type_id == "g05":
|
|
return EconomyManager.apply_command(0, {"type": "upgrade", "uid": entry.uid}).ok
|
|
return false
|
|
func run() -> void:
|
|
get_window().size = Vector2i(1600, 960)
|
|
Soundscape.enabled = false
|
|
GameState.select_faction(0, "glutpakt")
|
|
GameState.select_faction(1, "wurzelbund")
|
|
main = preload("res://scenes/main.tscn").instantiate()
|
|
add_child(main)
|
|
await get_tree().create_timer(.8).timeout
|
|
main.hud._overlay_action.pressed.emit()
|
|
await get_tree().process_frame
|
|
main.hud._starter_button.pressed.emit()
|
|
# Presentation capture only: extra gold for two upgrades, no balance values change.
|
|
EconomyManager.teams[0].gold += 500
|
|
var ok: bool = upgrade_to_glass(Vector2i(2, 4)) and upgrade_to_glass(Vector2i(4, 4))
|
|
var glass: int = EconomyManager.get_team(0).roster.filter(func(e: Dictionary) -> bool: return e.type_id == "g06").size()
|
|
print("GLASS_FIELD_ROSTER: ", glass, " Glasballisten")
|
|
if not ok or glass != 2:
|
|
printerr("GLASS_FIELD_FAIL: upgrade to g06 failed")
|
|
await Soundscape.quit_game(1)
|
|
return
|
|
await get_tree().create_timer(.6).timeout
|
|
await shot("field-build")
|
|
# Closer game-camera framing, same angle and projection as play.
|
|
main._manual_camera = true
|
|
main._focus = Vector3(-9.0, 0, 2.0)
|
|
main.camera.size = 13.0
|
|
main._place_camera()
|
|
await shot("field-build-close")
|
|
main._manual_camera = false
|
|
WaveManager.set_physics_process(true)
|
|
main.hud._pause_button.grab_focus()
|
|
var key := InputEventKey.new()
|
|
key.keycode = KEY_SPACE
|
|
key.pressed = true
|
|
get_viewport().push_input(key, true)
|
|
await get_tree().create_timer(4.5).timeout
|
|
await shot("field-combat")
|
|
print("GLASS_FIELD_PASS")
|
|
await Soundscape.quit_game()
|