extends SceneTree const GuildView = preload("res://entry/views/guild_page_view.gd") func _initialize() -> void: call_deferred("_run") func _run() -> void: var out := OS.get_environment("ABG_EVIDENCE_DIR") if out.is_empty(): push_error("requires ABG_EVIDENCE_DIR") quit(1) return DirAccess.make_dir_recursive_absolute(out) root.size = Vector2(844, 390) var view := GuildView.new() view.name = "GuildVisualProbeView" view.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) view.configure_presentation({"safe_area": 24, "text_scale": 1.0, "locale": "zh_CN"}) root.add_child(view) view.render({"ok": true, "locale": "zh_CN", "company": {"owned_count": 2, "coin": 38, "display_recruits": []}, "destinations": {}, "recruits": [], "notice": ""}) # Guild has animated world layers; use a bounded frame settle instead of waiting # on frame_post_draw, which can remain unresolved in headless compatibility mode. for _i in range(3): await process_frame var viewport_texture := root.get_viewport().get_texture() if viewport_texture != null: var image := viewport_texture.get_image() if image != null: image.save_png(out.path_join("guild-844x390-zh_CN-final.png")) print("ABG_M53_GUILD_VISUAL_PROBE_OK") quit(0)