extends RefCounted const MENU := preload("res://scripts/planets/freighter_menu.gd") const DATA := preload("res://scripts/planets/distant_expeditions.gd") static func build(screen: Control) -> void: var progress: Resource = screen.captain.expedition var section := MENU.card(screen._content) section.name = "DistantExpeditions" var art := TextureRect.new() art.texture = load("res://assets/planets/expedition_navigation.png") art.expand_mode = TextureRect.EXPAND_IGNORE_SIZE art.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_COVERED art.custom_minimum_size.y = 125 art.clip_contents = true section.add_child(art) MENU.label(section, "DALEKIE WYPRAWY / ARCHIWUM MAP", 16, Color("e9b4fc")) MENU.label(section, "Sektory poza znanymi szlakami. Podwójna liczba wrogów, jeden boss. Kryształy czasu z każdego wroga. Zwykli wrogowie: mapy i powerbanki po 15%. Boss zawsze zostawia dokładnie 1 mapę i 1 losowy orb.", 12) var fuel := MENU.label(section, "", 13, Color("95dce8")) fuel.name = "ExpeditionFuel" screen._economy_labels["expedition_fuel"] = fuel MENU.label(section, "Lot: poziom × 1000 deuteru. Powrót bezpłatny. Mapy pozostają w archiwum i pozwalają wracać do sektora.", 12, MENU.GOLD) if progress.distant_maps.is_empty(): MENU.label(section, "Archiwum jest puste. Szukaj pustelnika na planecie lub map w łupach z wypraw.", 12, MENU.MUTED) var maps: Array = progress.distant_maps.values() maps.sort_custom(func(a,b): return int(a.level) 0 refresh_status.call() progress.changed.connect(refresh_status) status.tree_exiting.connect(func(): if progress.changed.is_connected(refresh_status): progress.changed.disconnect(refresh_status) , CONNECT_ONE_SHOT)