Teach where research data comes from, and say so when it runs out
The scanner quest moves ahead of the gas burner and gains the hunt it exists for: a research lab world, which pays several times what an ordinary planet does and is the only reliable source of research data. Finding one is what the scanner is FOR, so the conquest record now remembers which kind of world was taken and a quest can ask for that kind. Bombers get a pair of quests after the transporters. That pulled the ship lab up with them - a vessel is unlocked AT the lab, so asking for a bomber before one exists would have been unfinishable, the same trap second_hull fell into. And both research screens now explain a shortfall instead of hiding it. The skill tree refused a doctrine in silence; the ship lab said "already queued or complete", which is not why it refused and sends the player to look at the wrong thing. Both open an explainer naming what was wanted, what is held, and where data actually comes from. #192's rule - a tool is taught immediately before the quest that needs it - now points at the scanner's FIRST use rather than its only one, with the world survey still required to follow it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
parent
aca04ad4cf
commit
8462099068
8 changed files with 327 additions and 26 deletions
|
|
@ -36,6 +36,10 @@ const HUD_ROW_GAP := 16.0
|
|||
@onready var station_menu: Control = get_node("../UI/StationMenu")
|
||||
# #220: what the fleet costs to keep, and the arithmetic behind it.
|
||||
@onready var upkeep_menu: Control = get_node("../UI/FleetUpkeepMenu")
|
||||
# Where research data comes from, shown when a player finds out they have
|
||||
# none - the tree used to refuse in silence and the lab used to blame the
|
||||
# queue.
|
||||
@onready var research_points_menu: Control = get_node("../UI/ResearchPointsMenu")
|
||||
@onready var scanner_menu: Control = get_node("../UI/ScannerMenu")
|
||||
|
||||
var pending_build_type: String = ""
|
||||
|
|
@ -116,7 +120,7 @@ func _seat_hud_columns() -> void:
|
|||
func _menu_is_open() -> bool:
|
||||
for menu in [build_menu, craft_menu, lab_menu, transfer_menu, hangar_menu,
|
||||
formation_menu, skill_menu, planning_menu, garrison_menu, scanner_menu,
|
||||
station_menu, upkeep_menu]:
|
||||
station_menu, upkeep_menu, research_points_menu]:
|
||||
if menu.visible:
|
||||
return true
|
||||
return false
|
||||
|
|
@ -491,6 +495,14 @@ func _on_unlock_requested(id: String) -> void:
|
|||
return
|
||||
var payment_position: Variant = research_building.get("position", null)
|
||||
if not GameState.unlock(id, payment_position):
|
||||
# A doctrine can be refused for several reasons, but only one of them
|
||||
# is invisible on the node itself: the price in ORE is written there,
|
||||
# the prerequisite is drawn as an unlit link, and research data is
|
||||
# just a number the player has never been told how to get.
|
||||
var points_short: int = GameState.skill_research_point_cost(id)
|
||||
if GameState.research_points < points_short:
|
||||
research_points_menu.open_for_shortfall(points_short,
|
||||
String(GameState.skill_node(id).get("name", "This doctrine")))
|
||||
skill_menu.refresh(id)
|
||||
return
|
||||
if int(GameState.skill_node(id).get("fleet_bonus", 0)) > 0:
|
||||
|
|
@ -616,6 +628,12 @@ func _on_lab_buy() -> void:
|
|||
return
|
||||
var selected: Dictionary = options[lab_choice]
|
||||
var id: String = String(selected.id)
|
||||
var lab_points: int = GameState.research_point_cost(id)
|
||||
if GameState.research_points < lab_points:
|
||||
# Checked BEFORE the queue call, which would otherwise refuse this
|
||||
# and report it as "already queued or complete" - which it is not.
|
||||
research_points_menu.open_for_shortfall(lab_points, String(selected.name))
|
||||
return
|
||||
if not GameState.queue_lab_research(lab_building_id, id):
|
||||
lab_menu.set_status("Research is already queued or complete")
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue