Find the planet setups in an exported build

The registry scanned res://PlanetSetups for names ending ".tres". An export
does not ship those: text resources are converted to binary and the pack
carries "<name>.tres.remap", which ResourceLoader follows when asked for the
original path. So the scan found nothing in the web build, every planet drew
no setup, and since #211 the setup IS the garrison - every world in the
deployed game was deserted, with nothing logged to say why. Confirmed by
reading index.pck, which holds rocky_default.tres.remap and no .tres.

The suite runs from source, where the bug cannot occur, so the name
resolution is its own function and tested against the exact strings the pack
contains.

Also: the planning centre listed transporters and repair drones but
set_vessel_target() still refused anything not fleet-eligible, so both rows
had buttons that did nothing - the worst shape a refusal can take. Listing
and setting read the same rule now, and a standing order is only offered to
a crafter that can actually take it.

And two quests close the chain: the tentacle world, which the scanner will
not offer until the story hands it over, and the Warden itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
Loïc Wisniewski 2026-09-07 13:55:41 +02:00
commit df4d5e35f9
6 changed files with 179 additions and 8 deletions

View file

@ -1005,13 +1005,29 @@ func reset_new_game() -> void:
reset_formation()
# The chain has to have SENT the player after it. The tentacle world is a
# destination the story hands over, not something to find while scanning for
# ore - so the scanner carries its signature without offering it until the
# quest that names it is live.
#
# The four survey signatures are still required. They are implied by the
# chain reaching that quest, but the rule is about what the SCANNER has
# learned, and it should read that way whatever order the two arrive in.
func scanner_can_find_boss() -> bool:
if not quest_reached("tentacles"):
return false
for definition_id in SCANNER_SURVEY_TYPES:
if not visited_planet_kinds.has(definition_id):
return false
return true
# Has the chain arrived at this quest - handed it out, or gone past it?
func quest_reached(quest_id: String) -> bool:
var at: int = QUESTS.index_of(quest_id)
return at >= 0 and quest_index >= at
func scanner_available_planet_types() -> PackedStringArray:
var available: PackedStringArray = SCANNER_SURVEY_TYPES.duplicate()
if scanner_can_find_boss():
@ -2217,7 +2233,11 @@ func vessel_target(vessel_type: String) -> int:
func set_vessel_target(vessel_type: String, count: int) -> int:
if not vessel_is_fleet_eligible(vessel_type):
# Plannable means CRAFTABLE, not fleet-eligible. #221 listed the support
# craft in the planning centre and left this guard reading the old rule,
# so those two rows appeared with buttons that silently did nothing -
# the worst shape a refusal can take.
if not planned_vessel_types().has(vessel_type):
return 0
var final_count: int = maxi(count, 0)
if final_count == 0:
@ -2360,7 +2380,10 @@ func _advance_planning() -> void:
return
for vessel_type in vessel_targets:
var type_id: String = String(vessel_type)
if not vessel_is_unlocked(type_id):
# Not merely unlocked: orderable. A standing order for a transporter
# with no hub standing would be re-offered to a crafter every pass
# and refused every time.
if not vessel_can_be_crafted(type_id):
continue
var missing: int = vessel_shortfall(type_id)
if missing <= 0:
@ -3986,6 +4009,9 @@ func quest_progress(quest: Dictionary) -> Vector2i:
QUESTS.GOAL_PLANET_VISITS:
var visits: int = int(goal.get("count", 1))
return Vector2i(mini(visited_planets.size(), visits), visits)
QUESTS.GOAL_WORLD_VISITED:
var kind: String = String(goal.get("definition", ""))
return Vector2i(1 if visited_planet_kinds.has(kind) else 0, 1)
QUESTS.GOAL_PLANET_KINDS:
var kinds: int = int(goal.get("count", 1))
return Vector2i(mini(visited_planet_kinds.size(), kinds), kinds)