#166-#173: plainer words, a point to shoot at, and a catalog that says when it is broken
Eight tickets. The last one is the interesting one. #166 - PLAINER DIALOG. Every spoken line rewritten: the nine prologue lines and all twenty quest brief/done pairs. Mostly splitting em-dash subclauses into sentences and dropping the literary register ("hulls" -> "ships", "That is our hands back" -> "That frees us for other work"). Same meaning, same voice. #167 - NOTHING ANNOUNCED TWICE. Quests carry an `important` flag; seven of the twenty have it, and they are the search for the World Ship. A quest handed out with its goal ALREADY met is now credited in silence unless it is one of those - no brief, no answer, both signals still fired and the index still moved, so it appears ticked in the objectives panel. The chain used to stop the game to set a task the player had already done, then stop it again to congratulate them on it. #168 - THE KEYBOARD CAN ANSWER A DIALOG. The rule the ticket asks for (still arriving, show it all; already whole, move on) was already the rule for a click since #149, but a key press reached the banner and did nothing - and this game is played with WASD and a mouse. Touch, click and key now go through one door. Modifiers alone and auto-repeat echoes are not presses. #169 - A LOADING SCREEN. A press raises a cover, and the load happens after it has been on screen for a frame, so the wait is something the player is watching. Deliberately still a blocking load: load_threaded_request() comes back FAILED for these scenes, reporting text-parse errors that load() does not produce, because the global class names and preloads they reach each other through are not resolvable off the loading thread. A progress bar is not worth a menu that sometimes refuses to start the game, and the web build ships with thread support off anyway. Further presses while loading are ignored - on the web a button fires on PRESS, so an impatient double tap costs nothing to make and used to build the world twice. #170 - THE PICTURE BEFORE THE CAPTION. The prologue's first line was up before the scene had finished arriving, so the game opened STOPPED (#128) over a convoy nobody had seen yet. It flies for three seconds first. #171 - THE CONTROLS FOLLOW WHAT IS BEING HELD. is_touchscreen_available() asks whether a touch COULD arrive, and in a browser that is yes on any laptop whose panel reports touch support - so the web build put thumb sticks over a screen being played with a mouse, and switched mouse aiming off on the machine it exists for. The reading is now the last input actually used, it lives in GameState so the sticks and the guns cannot disagree, and it is two-way: nothing can strand a tablet, because the gesture that needs the controls is the gesture that brings them back. A touch suppresses mouse evidence for a second, so the click Godot manufactures out of a tap is not mistaken for a mouse. #172 - AIM AT A PLACE. Every gun was handed the same direction, so a fleet firing at something threw a sheet of parallel bolts past either side of it and only the middle hull could hit - worse the wider the formation. Guns now take a POINT and each hull works out its own heading to it, so the fleet's fire converges. The mouse already had a place and was flattening it into a bearing; a pushed stick names the point at the guns' reach along it, so touch loses nothing. The assist (#89) still bends a shot onto an enemy, now per hull and around that hull's own heading. The aim guide stops at the point and marks it. #173 - AND THE ONE THAT EXPLAINS ITSELF. "In the web export version the fleet can not store any resources" is not a web bug. It is the third time the Godot editor's .tres writer has quietly dropped a property it thought was default-valued: InterceptorVesselDefinition losing `capabilities` leaves cargo_capacity at 20 and takes away the "cargo" claim that fleet_cargo_capacity() actually gates on, so the hold is zero and nothing can be mined or carried. That is the symptom, word for word. test_definitions_intact caught it in the suite. What it could not do is catch it in a BUILD - an export is taken from the working tree at whatever moment the editor last touched it, which is exactly when the damage is done and exactly where nobody is running tests. The checks move to core/CatalogCheck.gd and now run at startup in every build as well as in the test, from the same function. On the web push_error lands in the on-page log web_shell.html mirrors, which is the only error a phone can read. The tree is intact today, so a fresh export should restore the hold. The point of the change is that the next time it is not, the build says so. Full suite green at 154/154. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139MmxRAJSUe1j77kftAWv3
This commit is contained in:
parent
3fcc26c8bc
commit
0fad1dd155
24 changed files with 1372 additions and 286 deletions
129
core/CatalogCheck.gd
Normal file
129
core/CatalogCheck.gd
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
class_name CatalogCheck
|
||||
extends RefCounted
|
||||
|
||||
# Forgejo #173: "in the web export version the fleet can not store any
|
||||
# resources."
|
||||
#
|
||||
# That symptom has a history in this project, and it is not a web bug. Opening
|
||||
# the project in the Godot editor re-saves .tres files, and the editor's
|
||||
# writer DROPS properties it considers default-valued. An empty-looking
|
||||
# PackedStringArray is the usual casualty, and it has now cost this project
|
||||
# three times:
|
||||
#
|
||||
# GasBurnerBuildingDefinition lost `capabilities` and `collected_outputs`,
|
||||
# which took the burner's whole conversion with it.
|
||||
#
|
||||
# InterceptorVesselDefinition lost `capabilities`, `hull_points`,
|
||||
# `build_time`, `icon` and `glow_color`. The starting vessel kept its
|
||||
# cargo_capacity of 20 and stopped claiming the "cargo" capability, which
|
||||
# is the one thing fleet_cargo_capacity() gates on - so the hold was zero
|
||||
# and nothing could be mined or carried.
|
||||
#
|
||||
# The second one is #173, word for word. A build exported from a tree in that
|
||||
# state has a fleet that cannot store any resources, and NOTHING SAYS SO: the
|
||||
# resource still loads, it is just quietly less than it was.
|
||||
#
|
||||
# test_definitions_intact caught it in the suite. What it could not do is
|
||||
# catch it in a build, and an export is taken from the working tree at
|
||||
# whatever moment the editor last touched it - which is exactly when the
|
||||
# damage is done and exactly where nobody is running tests.
|
||||
#
|
||||
# So the same check now runs at STARTUP, in every build (see GameState._ready)
|
||||
# and in the test, from this one function. On the web its push_error lands in
|
||||
# the on-page error log that web_shell.html mirrors from the console, which is
|
||||
# the only place a phone can read an error at all. A player still cannot mine,
|
||||
# but the reason is on the screen instead of being reasoned about for an
|
||||
# evening.
|
||||
#
|
||||
# It asserts the SHAPE of the catalog rather than any one value: every
|
||||
# definition must carry the things that make it what it is, and two facts that
|
||||
# have to agree - a hold and the capability that admits to it - must agree.
|
||||
|
||||
|
||||
# Everything wrong with the catalog, in the order found. Empty is the healthy
|
||||
# answer, which is what both callers check.
|
||||
static func faults() -> PackedStringArray:
|
||||
var found: PackedStringArray = PackedStringArray()
|
||||
_check_vessels(found)
|
||||
_check_buildings(found)
|
||||
return found
|
||||
|
||||
|
||||
# get() answers null for a property a definition's script never declared, and
|
||||
# null has no is_empty(). These keep a missing field from looking like an empty
|
||||
# one - and from taking the rest of the sweep down with it.
|
||||
static func _text(definition: Resource, field: String) -> String:
|
||||
var value: Variant = definition.get(field)
|
||||
return "" if value == null else str(value)
|
||||
|
||||
|
||||
static func _list(definition: Resource, field: String) -> Array:
|
||||
var value: Variant = definition.get(field)
|
||||
if value == null:
|
||||
return []
|
||||
return Array(value.keys() if value is Dictionary else value)
|
||||
|
||||
|
||||
static func _check_vessels(found: PackedStringArray) -> void:
|
||||
for definition in VesselDefinitions.all():
|
||||
var id: String = String(definition.definition_id)
|
||||
# --- whole ------------------------------------------------------
|
||||
if String(definition.display_name).strip_edges() == "":
|
||||
found.append("vessel %s has no display name" % id)
|
||||
if definition.base_stats.is_empty():
|
||||
found.append("vessel %s has no stats at all" % id)
|
||||
# Only the hulls that actually join the fleet: a repair drone is a
|
||||
# logistics unit driven by GameState, with nothing bolted to it.
|
||||
if definition.fleet_eligible and definition.component_scenes.is_empty():
|
||||
found.append("vessel %s flies in the fleet with no components - an empty hull" % id)
|
||||
if definition.hull_points.is_empty():
|
||||
found.append("vessel %s has no hull points - it would draw as the fallback triangle" % id)
|
||||
# --- cargo: the #173 case ---------------------------------------
|
||||
# The hold and the capability are two recordings of one fact, and
|
||||
# fleet_cargo_capacity() reads only the second. They must agree.
|
||||
var carries: bool = float(definition.base_stats.get("cargo_capacity", 0.0)) > 0.0
|
||||
var claims: bool = "cargo" in definition.capabilities
|
||||
if carries != claims:
|
||||
found.append("vessel %s: cargo_capacity %s but capabilities %s - a hold nothing can fill, or the reverse" \
|
||||
% [id, definition.base_stats.get("cargo_capacity", 0.0), definition.capabilities])
|
||||
if "weapon" in definition.capabilities \
|
||||
and float(definition.base_stats.get("fire_range", 0.0)) <= 0.0:
|
||||
found.append("vessel %s claims a weapon and has no range" % id)
|
||||
|
||||
|
||||
static func _check_buildings(found: PackedStringArray) -> void:
|
||||
for definition in BuildingDefinitions.all():
|
||||
var id: String = String(definition.definition_id)
|
||||
# --- whole ------------------------------------------------------
|
||||
if String(definition.display_name).strip_edges() == "":
|
||||
found.append("building %s has no display name" % id)
|
||||
if String(definition.description).strip_edges() == "":
|
||||
found.append("building %s has no description - its info popup would be blank" % id)
|
||||
if int(definition.cost) <= 0:
|
||||
found.append("building %s is free" % id)
|
||||
if int(definition.max_hp) <= 0:
|
||||
found.append("building %s has no hit points" % id)
|
||||
# Space-placed structures only: an extractor is a marker on a planet
|
||||
# rather than a thing standing in the world, and has no scene.
|
||||
if definition.placement_mode == "space" and definition.visual_scene == null:
|
||||
found.append("building %s stands in space with nothing to draw" % id)
|
||||
for field in ["menu_button_name", "menu_label_name", "menu_cost_name"]:
|
||||
if str(definition.get(field)).strip_edges() == "":
|
||||
found.append("building %s has no %s - the build menu could not place it" % [id, field])
|
||||
if definition.capabilities.is_empty():
|
||||
found.append("building %s declares no capabilities - it would do nothing at all" % id)
|
||||
# --- converters -------------------------------------------------
|
||||
# These live on the LOGISTICS profile, a sub-resource of the
|
||||
# definition, not on the definition itself. Asking the definition for
|
||||
# them answers null and the whole check quietly never fires - which is
|
||||
# how the first draft of this passed while the gas burner sat there
|
||||
# with its collected_outputs missing.
|
||||
var logistics: Resource = definition.logistics
|
||||
if logistics == null or _text(logistics, "conversion_input") == "":
|
||||
continue
|
||||
if _text(logistics, "conversion_output") == "":
|
||||
found.append("building %s converts something into nothing" % id)
|
||||
if _list(logistics, "collected_outputs").is_empty():
|
||||
found.append("building %s converts but lists no collected outputs - what it makes would never be fetched" % id)
|
||||
if _list(logistics, "input_buffers").is_empty():
|
||||
found.append("building %s converts with no input buffer" % id)
|
||||
1
core/CatalogCheck.gd.uid
Normal file
1
core/CatalogCheck.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bk64c5fpvnc57
|
||||
|
|
@ -10,6 +10,7 @@ const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd")
|
|||
# works around.
|
||||
const WORLD_GEN = preload("res://world/WorldGen.gd")
|
||||
const QUESTS = preload("res://core/Quests.gd")
|
||||
const CATALOG_CHECK = preload("res://core/CatalogCheck.gd")
|
||||
|
||||
|
||||
# Autoload singleton - the one thing that survives change_scene_to_file()
|
||||
|
|
@ -38,6 +39,10 @@ var fleet_position: Vector2 = Vector2.ZERO
|
|||
# is also what makes "then the game starts" cost nothing - the director stops
|
||||
# steering and there is nothing left to load.
|
||||
var intro_active: bool = false
|
||||
# #173: what the startup catalog check found, if anything. Empty in a healthy
|
||||
# build; see CatalogCheck for why a build can be unhealthy without anything
|
||||
# else noticing.
|
||||
var catalog_faults: PackedStringArray = PackedStringArray()
|
||||
# #124: the breach takes the wheel. Movement input is ignored while this is
|
||||
# set, so the fleet goes where the script sends it rather than fighting the
|
||||
# player for the last few seconds of the prologue.
|
||||
|
|
@ -47,6 +52,57 @@ var intro_locks_movement: bool = false
|
|||
# explicit override rather than a fake doctrine, so nothing about the
|
||||
# player's own progression has to be bent to fit a cutscene.
|
||||
var intro_fleet_size: int = 0
|
||||
|
||||
# --- what the player is actually holding (#171) -----------------------------
|
||||
#
|
||||
# "The web export should auto detect keyboard mouse or screen and remove the
|
||||
# touch screen controls if not needed."
|
||||
#
|
||||
# DisplayServer.is_touchscreen_available() is the wrong question in a browser
|
||||
# and always was. It answers "could a touch arrive", and a desktop browser on
|
||||
# a laptop with a touch-capable panel - or one that merely reports
|
||||
# navigator.maxTouchPoints - says yes. So the thumb sticks and the pivot pair
|
||||
# sat over a screen being played with a mouse, and mouse aiming, which the
|
||||
# same query gates, was switched off on the machine it exists for.
|
||||
#
|
||||
# The right question is what the player LAST actually used, which is a fact
|
||||
# rather than a capability, and it is asked here rather than in a controller
|
||||
# because two of them need the same answer: GameController shows or hides the
|
||||
# on-screen controls, and MouseCombatController decides whether a click fires.
|
||||
# One answer, so they can never disagree.
|
||||
#
|
||||
# The catch is that Godot can manufacture the other kind of event from each
|
||||
# one - the pointing/emulate_* settings in project.godot turn taps into clicks
|
||||
# and clicks into taps. Taken at face value a phone would look like it had a
|
||||
# mouse the instant a finger touched the glass. So a touch SUPPRESSES mouse
|
||||
# evidence for a moment afterwards: a manufactured click always follows its
|
||||
# touch within the same frame, well inside the window, while a player who
|
||||
# genuinely puts a finger down and then reaches for the mouse takes far longer
|
||||
# than this to do it. Correct whether that emulation is on or off - with it
|
||||
# off there is simply nothing for the window to suppress.
|
||||
const POINTER_TOUCH_GRACE_MSEC: int = 1000
|
||||
# Seeded from the display's own answer so the very first frame is sensible on
|
||||
# a phone, and immediately overwritten by the first real input either way.
|
||||
var pointer_is_touch: bool = DisplayServer.is_touchscreen_available()
|
||||
# When a touch was last seen, in engine milliseconds. -1 for never. Public so
|
||||
# a test can age it out rather than sleeping for a second.
|
||||
var last_touch_msec: int = -1
|
||||
|
||||
|
||||
func note_touch_input() -> void:
|
||||
last_touch_msec = Time.get_ticks_msec()
|
||||
pointer_is_touch = true
|
||||
|
||||
|
||||
# A mouse or a key. Ignored while a touch is still recent, because that is
|
||||
# what a manufactured event looks like.
|
||||
func note_pointer_input() -> void:
|
||||
if last_touch_msec >= 0 \
|
||||
and Time.get_ticks_msec() - last_touch_msec < POINTER_TOUCH_GRACE_MSEC:
|
||||
return
|
||||
pointer_is_touch = false
|
||||
|
||||
|
||||
var return_world_position: Vector2 = Vector2.ZERO
|
||||
var return_camera_zoom: float = 1.0
|
||||
|
||||
|
|
@ -3084,6 +3140,23 @@ var visited_planets: Dictionary = {}
|
|||
var visited_planet_kinds: Dictionary = {}
|
||||
|
||||
|
||||
# #173: the catalog is checked once, here, in every build - not only in the
|
||||
# test suite. The editor can quietly strip a property out of a .tres between
|
||||
# the last test run and the export, and the shipped result is a game that
|
||||
# looks fine and cannot mine. push_error rather than a crash: the game is
|
||||
# still playable in whatever way survived, and on the web these lines reach
|
||||
# the on-page log web_shell.html mirrors from the console, which is the only
|
||||
# error a phone can read.
|
||||
func _ready() -> void:
|
||||
catalog_faults = CATALOG_CHECK.faults()
|
||||
if catalog_faults.is_empty():
|
||||
return
|
||||
push_error("The definition catalog is damaged - see core/CatalogCheck.gd. %d fault(s):" \
|
||||
% catalog_faults.size())
|
||||
for fault in catalog_faults:
|
||||
push_error(" catalog: %s" % fault)
|
||||
|
||||
|
||||
func reset_quests(armed: bool = false) -> void:
|
||||
quests_armed = armed
|
||||
quest_index = 0
|
||||
|
|
@ -3194,17 +3267,37 @@ func take_quest_messages() -> Array:
|
|||
|
||||
# Ends the current quest whether or not its goal was met. The chain's only
|
||||
# way forward, used by _advance_quests below and by the tests.
|
||||
func complete_active_quest() -> bool:
|
||||
#
|
||||
# #167: `announce` is what a SKIPPED quest turns off. The index still moves
|
||||
# and quest_completed still fires - the quest is credited exactly as if it
|
||||
# had been played - but nothing is queued for the banner to read out.
|
||||
func complete_active_quest(announce: bool = true) -> bool:
|
||||
var quest: Dictionary = active_quest()
|
||||
if quest.is_empty():
|
||||
return false
|
||||
say_quest_line(String(quest.get("done", "")))
|
||||
if announce:
|
||||
say_quest_line(String(quest.get("done", "")))
|
||||
quest_index += 1
|
||||
quest_announced = false
|
||||
quest_completed.emit(String(quest.id))
|
||||
return true
|
||||
|
||||
|
||||
# #167: a quest handed out with its goal already met, credited in silence.
|
||||
#
|
||||
# Both signals still fire, in the order they would have fired in had it been
|
||||
# played, so anything watching the chain sees an ordinary start-then-finish
|
||||
# rather than a quest that was never begun. What it does NOT do is speak:
|
||||
# neither the brief nor the answer reaches quest_messages, so the game is
|
||||
# never stopped twice to be told about something already done.
|
||||
func skip_active_quest() -> bool:
|
||||
var quest: Dictionary = active_quest()
|
||||
if quest.is_empty():
|
||||
return false
|
||||
quest_started.emit(String(quest.id))
|
||||
return complete_active_quest(false)
|
||||
|
||||
|
||||
func _advance_quests() -> void:
|
||||
# The prologue is already talking, and the fleet in it is not the
|
||||
# player's. The chain starts when the prologue hands over.
|
||||
|
|
@ -3212,6 +3305,21 @@ func _advance_quests() -> void:
|
|||
return
|
||||
var quest: Dictionary = active_quest()
|
||||
if not quest_announced:
|
||||
# #167: the chain hands out teaching quests, and by the time some of
|
||||
# them come up the player has already done the thing - the extractor
|
||||
# is down, the hangar is crewed. Announcing one of those stops the
|
||||
# game to explain a task, then stops it again to congratulate them
|
||||
# on a task they never did. So an unimportant quest whose goal is
|
||||
# already met is banked without a word (see Quests.is_important);
|
||||
# it still shows up as done in the objectives panel, which is where
|
||||
# the player looks for what they have been credited with.
|
||||
if quest_goal_met(quest) and not QUESTS.is_important(quest):
|
||||
skip_active_quest()
|
||||
# One a frame. Several already-met quests in a row are cleared
|
||||
# over the next few frames rather than in a loop here, which
|
||||
# keeps this function's shape - one step per call - and keeps a
|
||||
# malformed chain from spinning inside a single tick.
|
||||
return
|
||||
quest_announced = true
|
||||
say_quest_line(String(quest.get("brief", "")))
|
||||
quest_started.emit(String(quest.id))
|
||||
|
|
|
|||
107
core/Quests.gd
107
core/Quests.gd
|
|
@ -51,14 +51,31 @@ const GOAL_BANKED: String = "banked"
|
|||
# that fills it.
|
||||
const GOAL_GARRISONED: String = "garrisoned"
|
||||
|
||||
# #167: which quests carry the STORY, marked `"important": true` below.
|
||||
#
|
||||
# Most of the chain is teaching: bank some ore, place a crafter, open the
|
||||
# hangar. A teaching quest handed to a player who has already done the thing
|
||||
# has nothing to teach, and stopping the game twice to say so - once for the
|
||||
# brief, once for the answer - is two dialogs about nothing. Those are
|
||||
# skipped (GameState._advance_quests); they still land in the DONE list, so
|
||||
# the player sees they were credited rather than lost.
|
||||
#
|
||||
# The ones marked here are different. They are the search for the World Ship
|
||||
# - the wreck we start in, the call that gets no answer, the first world, the
|
||||
# ground somebody else was already holding, the survey, the trail - and their
|
||||
# lines are the plot rather than instructions. Those are read out whether the
|
||||
# goal was already met or not, because skipping one drops a piece of the
|
||||
# story on the floor.
|
||||
|
||||
const CHAIN: Array = [
|
||||
{
|
||||
"id": "first_ore",
|
||||
"title": "SALVAGE",
|
||||
"objective": "Break asteroids for 5 ore",
|
||||
"goal": {"kind": GOAL_RESOURCE, "resource": "ore", "amount": 5},
|
||||
"brief": "Hull intact. Reactor holding. Everything else we had is on the other side of that hole. There is ore in the rocks out here - break some, and we can start again.",
|
||||
"done": "Five ore in the hold. It is not much. It is a beginning.",
|
||||
"brief": "The hull holds. The reactor runs. Everything else we had is on the far side of that hole. These rocks carry ore. Break some, and we can start again.",
|
||||
"done": "Five ore in the hold. It is not much, but it is a start.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
# #142: the gap this fills was a real one. "Collect 5 ore" was
|
||||
|
|
@ -69,26 +86,28 @@ const CHAIN: Array = [
|
|||
"title": "THE PILE",
|
||||
"objective": "Break asteroids for 20 ore",
|
||||
"goal": {"kind": GOAL_RESOURCE, "resource": "ore", "amount": 20},
|
||||
"brief": "Now do that four times over. Nothing permanent gets built out of five ore, and there is nothing else out here to spend it on yet.",
|
||||
"done": "Twenty in the hold. That is a foundation.",
|
||||
"brief": "Now do that four more times. Five ore builds nothing, and there is nothing else out here to spend it on yet.",
|
||||
"done": "Twenty in the hold. Now we can build something.",
|
||||
},
|
||||
{
|
||||
"id": "mothership",
|
||||
"title": "A PLACE TO STAND",
|
||||
"objective": "Build the mothership",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "mothership"},
|
||||
"brief": "A hull is not a base. Build the mothership - it is the only thing in the plans with a transmitter big enough to call the World Ship.",
|
||||
"brief": "A ship is not a base. Build the mothership. It carries the only transmitter big enough to call the World Ship.",
|
||||
# The hinge of the whole chain (#129): the answer to "we built the
|
||||
# transmitter" is that the transmitter was never the problem.
|
||||
"done": "Mothership online. Calling the World Ship. Calling. Nothing comes back - and the array is not at fault. Wherever the breach put us, it is further out than that signal will ever carry. We find their trail ourselves, or we do not find them.",
|
||||
"done": "The mothership is online. Calling the World Ship. Calling. Nothing comes back, and the transmitter is not at fault. The breach threw us further out than any signal of ours will carry. So we find their trail ourselves, or we never find them.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
"id": "chart",
|
||||
"title": "DEAD RECKONING",
|
||||
"objective": "Chart 30 sectors",
|
||||
"goal": {"kind": GOAL_EXPLORE, "sectors": 30},
|
||||
"brief": "So we search. Fly, and let the map fill in behind us - whatever is left of their course is somewhere in it.",
|
||||
"done": "Thirty sectors charted. No sign of the World Ship, but the sky behind us is no longer blank.",
|
||||
"brief": "So we search. Fly, and the map fills in behind us. Their course is somewhere in it.",
|
||||
"done": "Thirty sectors charted. No sign of the World Ship, but the map behind us is no longer blank.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
# #141: its own step, and the first time the chain sends anyone into
|
||||
|
|
@ -99,42 +118,44 @@ const CHAIN: Array = [
|
|||
"title": "SHIPYARDS",
|
||||
"objective": "Research the Shipyards doctrine",
|
||||
"goal": {"kind": GOAL_RESEARCH, "node": "shipyards"},
|
||||
"brief": "One hull will not chart a sky, and we cannot build what we have not remembered how to build. The mothership holds the archive - go aboard it and research Shipyards.",
|
||||
"done": "Shipyard plans recovered. Everything else worth having is in that archive too.",
|
||||
"brief": "One ship cannot chart a whole sky, and we have forgotten how to build more. The mothership holds the archive. Go aboard and research Shipyards.",
|
||||
"done": "Shipyard plans recovered. There is more in that archive, if we go back for it.",
|
||||
},
|
||||
{
|
||||
"id": "crafter",
|
||||
"title": "A YARD OF OUR OWN",
|
||||
"objective": "Build a ship crafter",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "ship_crafter"},
|
||||
"brief": "Now put a ship crafter down. Ore goes in, vessels come out - it is the only way this fleet grows past the one hull that came through the breach.",
|
||||
"done": "The yard is live. We can build our own now.",
|
||||
"brief": "Now build a ship crafter. Ore goes in, ships come out. It is the only way this fleet grows past the one hull that came through the breach.",
|
||||
"done": "The yard is running. We can build our own ships now.",
|
||||
},
|
||||
{
|
||||
"id": "second_hull",
|
||||
"title": "A SECOND HULL",
|
||||
"objective": "Fly two vessels at once",
|
||||
"goal": {"kind": GOAL_FLEET_VESSEL, "vessel": "interceptor", "count": 2},
|
||||
"brief": "Order an interceptor at the yard and crew it. Two guns is not a fleet, but it is twice what we flew out of the breach with.",
|
||||
"done": "Two hulls in formation. It has been a while since this ship flew with company.",
|
||||
"brief": "Order an interceptor at the yard and crew it. Two ships is not a fleet, but it is twice what we flew out of the breach with.",
|
||||
"done": "Two ships in formation. It has been a long time since we flew with company.",
|
||||
},
|
||||
{
|
||||
"id": "planetfall",
|
||||
"title": "PLANETFALL",
|
||||
"objective": "Land on a planet",
|
||||
"goal": {"kind": GOAL_PLANET_VISITS, "count": 1},
|
||||
"brief": "There are worlds out here. Bring the fleet in close to one and take it down - there is more on a surface than there is in all this dark.",
|
||||
"done": "Down on solid ground. Whatever else this place is, it is somewhere.",
|
||||
"brief": "There are worlds out here. Fly the fleet close to one and land on it. A surface holds more than all this empty dark.",
|
||||
"done": "We are down on solid ground. Whatever else this place is, it is somewhere.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
"id": "conquest",
|
||||
"title": "GROUND HELD",
|
||||
"objective": "Take every capture point on one planet",
|
||||
"goal": {"kind": GOAL_CONQUERED, "count": 1},
|
||||
"brief": "Something got to this surface before us and it is still holding it. Take every point on the planet - what we pull out of their positions is worth more than the ore is.",
|
||||
"brief": "Something reached this surface before us, and it is still holding it. Take every capture point on the planet. What we pull out of their camps is worth more than the ore.",
|
||||
# Says out loud where research points come from, because nothing
|
||||
# else in the game does.
|
||||
"done": "Planet secured. Their equipment reads out as research data - the first we have had. Every doctrine worth having is going to cost some.",
|
||||
"done": "The planet is ours. Their machines gave us research data, the first we have had. Every doctrine worth having will cost some.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
# #156: the extractor is the first thing the chain asks for that
|
||||
|
|
@ -145,47 +166,47 @@ const CHAIN: Array = [
|
|||
"title": "THE HOLD IS SMALL",
|
||||
"objective": "Bank 60 ore at the mothership",
|
||||
"goal": {"kind": GOAL_BANKED, "resource": "ore", "amount": 60},
|
||||
"brief": "Every hull out here carries twenty and no more, and we are going to need more than twenty. Fly what we have back to the mothership and unload it - what is stored there is not carried by anyone.",
|
||||
"done": "Sixty banked. The hold empties, the vault does not - that is the difference, and everything from here on depends on it.",
|
||||
"brief": "Each ship carries twenty units and no more, and we are going to need more than twenty. Fly what we have back to the mothership and unload it. What is stored there stays there.",
|
||||
"done": "Sixty in the vault. A hold empties on the next trip out. A vault does not. Everything from here on depends on that.",
|
||||
},
|
||||
{
|
||||
"id": "extractor",
|
||||
"title": "STANDING MINE",
|
||||
"objective": "Build an extractor on a planet",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "extractor"},
|
||||
"brief": "Research Logistics and put an extractor down on a surface. It keeps digging whether we are standing over it or not.",
|
||||
"done": "The extractor is cutting. Ore will be there when we come back for it.",
|
||||
"brief": "Research Logistics, then place an extractor on a planet. It keeps digging whether we are standing over it or not.",
|
||||
"done": "The extractor is digging. The ore will be waiting when we come back for it.",
|
||||
},
|
||||
{
|
||||
"id": "gas",
|
||||
"title": "THE HEAVY AIR",
|
||||
"objective": "Bring back 25 gas",
|
||||
"goal": {"kind": GOAL_RESOURCE, "resource": "gas", "amount": 25},
|
||||
"brief": "The banded worlds are full of gas, and gas is the only thing out here that burns. Take the fleet into one and fill the tanks.",
|
||||
"done": "Twenty-five units of gas aboard. Now we need something that can burn it.",
|
||||
"brief": "The striped worlds are full of gas, and gas is the only thing out here that burns. Take the fleet into one and fill the tanks.",
|
||||
"done": "Twenty-five gas aboard. Now we need something that can burn it.",
|
||||
},
|
||||
{
|
||||
"id": "hub",
|
||||
"title": "FREIGHT",
|
||||
"objective": "Build a transport hub",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "transport_hub"},
|
||||
"brief": "Carrying every load by hand does not scale. Research Freight Handling and build a hub - its transporters run the routes without us.",
|
||||
"done": "The hub is running its own traffic. That is our hands back.",
|
||||
"brief": "Hauling every load ourselves is slow. Research Freight Handling and build a transport hub. Its transporters fly the routes without us.",
|
||||
"done": "The hub runs its own traffic now. That frees us for other work.",
|
||||
},
|
||||
{
|
||||
"id": "burner",
|
||||
"title": "POWER",
|
||||
"objective": "Build a gas burner",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "gas_burner"},
|
||||
"brief": "Research Power Systems and build a gas burner. Gas in, energy out - and energy is what the better weapons run on.",
|
||||
"done": "The burner is lit. There is power on this fleet for the first time since the breach.",
|
||||
"brief": "Research Power Systems and build a gas burner. Gas in, energy out. The better weapons run on energy.",
|
||||
"done": "The burner is lit. This fleet has power again for the first time since the breach.",
|
||||
},
|
||||
{
|
||||
"id": "lab",
|
||||
"title": "SHIP SCIENCE",
|
||||
"objective": "Build a ship lab",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "ship_lab"},
|
||||
"brief": "Research Vessel Science and build a ship lab. Every hull we fly can be made better there, and there are hulls in the archive we have never built.",
|
||||
"brief": "Research Vessel Science and build a ship lab. It makes the ships we fly better, and it opens designs we have never built.",
|
||||
"done": "The lab is open.",
|
||||
},
|
||||
{
|
||||
|
|
@ -193,40 +214,42 @@ const CHAIN: Array = [
|
|||
"title": "A NEW HULL",
|
||||
"objective": "Unlock the shield vessel",
|
||||
"goal": {"kind": GOAL_VESSEL_UNLOCKED, "vessel": "shield"},
|
||||
"brief": "The archive has a shield hull in it. Unlock it at the lab - the fleet has been taking every hit on the paint so far.",
|
||||
"done": "Shield hull unlocked. There is more than one design in that archive.",
|
||||
"brief": "The archive holds a shield ship. Unlock it at the lab. So far the fleet has taken every hit on bare hull.",
|
||||
"done": "The shield ship is unlocked. There is more than one design in that archive.",
|
||||
},
|
||||
{
|
||||
"id": "outpost",
|
||||
"title": "FORWARD BASES",
|
||||
"objective": "Build an outpost",
|
||||
"goal": {"kind": GOAL_BUILDING, "building": "outpost"},
|
||||
"brief": "We cannot be everywhere. Research Forward Bases and build an outpost - vessels stationed there hold ground we are not standing on.",
|
||||
"done": "The outpost is crewed. That is one place we no longer have to fly back to.",
|
||||
"brief": "We cannot be everywhere at once. Research Forward Bases and build an outpost. Ships stationed there hold ground we are not standing on.",
|
||||
"done": "The outpost is up. That is one place we no longer have to fly back to.",
|
||||
},
|
||||
{
|
||||
"id": "garrison",
|
||||
"title": "STANDING WATCH",
|
||||
"objective": "Station a vessel at the outpost",
|
||||
"goal": {"kind": GOAL_GARRISONED, "count": 1},
|
||||
"brief": "An empty outpost is a building. Open its hangar and station a vessel there - it holds that ground whether we are there or not.",
|
||||
"done": "The outpost has a crew. It watches that approach now, and we do not have to.",
|
||||
"brief": "An empty outpost is only a building. Open its hangar and station a ship there. It will hold that ground whether we are there or not.",
|
||||
"done": "The outpost has a crew. It watches that approach now, so we do not have to.",
|
||||
},
|
||||
{
|
||||
"id": "worlds",
|
||||
"title": "THE SURVEY",
|
||||
"objective": "Land on three different kinds of world",
|
||||
"goal": {"kind": GOAL_PLANET_KINDS, "count": 3},
|
||||
"brief": "Rock, gas, and whatever else is out here. Set down on three different kinds of world - if the World Ship passed this way, it passed something.",
|
||||
"done": "Three kinds of world surveyed. Every one of them empty of anything that came through with us.",
|
||||
"brief": "Rock, gas, and whatever else is out here. Land on three different kinds of world. If the World Ship came this way, it passed something.",
|
||||
"done": "Three kinds of world surveyed. Not one of them holds any sign of the convoy.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
"id": "trail",
|
||||
"title": "THE TRAIL",
|
||||
"objective": "Chart 150 sectors",
|
||||
"goal": {"kind": GOAL_EXPLORE, "sectors": 150},
|
||||
"brief": "Then we widen it. A hundred and fifty sectors, and every one of them looked at properly. They are out there.",
|
||||
"done": "A hundred and fifty sectors charted, and no trail. The search does not stop because the list ran out.",
|
||||
"brief": "Then we search wider. A hundred and fifty sectors, and every one of them looked at properly. They are out there somewhere.",
|
||||
"done": "A hundred and fifty sectors charted, and still no trail. The search does not stop just because the list ran out.",
|
||||
"important": true,
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -241,6 +264,12 @@ static func at(index: int) -> Dictionary:
|
|||
return CHAIN[index]
|
||||
|
||||
|
||||
# #167: whether a quest's lines are the story rather than instructions. Only
|
||||
# these are said when the goal was already met the moment it was handed out.
|
||||
static func is_important(quest: Dictionary) -> bool:
|
||||
return bool(quest.get("important", false))
|
||||
|
||||
|
||||
static func by_id(id: String) -> Dictionary:
|
||||
for quest in CHAIN:
|
||||
if String(quest.id) == id:
|
||||
|
|
|
|||
Loading…
Reference in a new issue