extends Node func settle() -> void: for frame in 5: await get_tree().process_frame await RenderingServer.frame_post_draw func _ready() -> void: var profile: Dictionary = preload("res://scripts/planets/planet_profiles.gd").generate(777,1,"Dolina pod Górą") profile.temperature = 20 profile.oxygen = 95 profile.flora = 0 profile.difficulty = 0.0 var progress: Resource = GameState.captain.expedition assert(progress.begin_visit(profile)) progress.visit_seed = 200 var surface := Control.new() surface.set_script(preload("res://scripts/planets/surface_screen.gd")) surface.captain = GameState.captain surface.progress = progress add_child(surface) surface.set_process(false) surface.set_physics_process(false) var cave: Dictionary for poi in surface.world.data.pois: if poi.kind == "cave": cave = poi assert(cave.has("mountain_position")) assert(cave.position.distance_to(cave.mountain_position) == 86) surface.lander.position = cave.position+Vector2(0,100) surface.camera.position_smoothing_enabled = false surface.camera.position = cave.position+Vector2(100,0) surface.camera.force_update_scroll() surface.world.refresh_pois(cave.position) surface._surface_viewport.get_node("SurfaceAtmosphere").hide() await settle() get_viewport().get_texture().get_image().save_png("res://artifacts/cave_mountain_preview.png") var sheet := Image.create(1350,3250,false,Image.FORMAT_RGBA8) for row in 5: for stage in 3: surface._poi = {"kind":preload("res://scripts/planets/poi_presentation.gd").ORDER[row],"stage":stage,"complete":false} surface._show_poi() await settle() var rect: Rect2 = surface._dialog.get_global_rect() assert(rect.end.y <= get_viewport().get_visible_rect().size.y and rect.size.x <= 450) var art: TextureRect = surface._choices.get_child(0).get_child(0) assert(art.texture is AtlasTexture) var screenshot := get_viewport().get_texture().get_image() if row == 4 and stage == 0: screenshot.save_png("res://artifacts/cave_poi_window.png") var card := screenshot.get_region(Rect2i(rect)) card.convert(Image.FORMAT_RGBA8) card.resize(450,650,Image.INTERPOLATE_LANCZOS) sheet.blit_rect(card,Rect2i(0,0,450,650),Vector2i(stage*450,row*650)) sheet.save_png("res://artifacts/poi_stage_cards.png") get_window().size = Vector2i(800,600) await settle() surface._resize_surface_viewport() await settle() assert(surface._dialog.get_global_rect().end.y <= get_viewport().get_visible_rect().size.y) print("POI PRESENTATION PASS: 15 illustrated cards, compact layout, small-window scroll, mountain cave") get_tree().quit()