Implement #77, #78 and #79

#77 - the Distorder becomes the Energy Propulser. Renamed everywhere the
player reads it, reskinned to match: a symmetric hull flaring into an engine
skirt instead of the lopsided warped lump, an engine bell with a thrust plume
instead of the wobbling ring glyph, and energy's own yellow instead of purple,
since energy is what it burns. The internal id stays "distorder" - it is the
capability string, the unlock key and the component scene name, and renaming
the wiring would be a large mechanical change with no player-visible effect.

Its speed ceiling now grows with the LOGARITHM of how many fly. Each one used
to add a flat 1.0, so a fleet that could afford six simply drove at six times
cruise and the vessel stopped being a choice. Base-2 makes the rule one
sentence - every doubling adds another 1.0 - and leaves two propulsers worth
exactly what they were worth before, so nothing already built is devalued.

#78 - a gas burner can be paused. It converts gas the player may want for
bombs into energy they may not need yet, and the only way to stop it was to
demolish it. The action is data-driven like every other: the visual's
ActionProvider lists "pause", and any converter can adopt it. Pause is the
burner's PRIMARY action, so it is one tap rather than a menu; the button shows
what it will DO, bars while running and a play triangle while stopped; and the
building itself goes visibly cold, because a paused building that looked
identical to a running one would be a setting to remember rather than see.
Conversion progress is left where it was rather than reset, so switching off
and on again does not discard a part-finished unit.

#79 - picking something up says so. A "+N" with the resource's own mark rises
and fades where it happened. Built from the SAME glyph the resource tables and
transfer rows use, so a material added to the catalog later cannot end up with
one mark in the HUD and a different one in the world. A pickup a full hold
REFUSES raises nothing.

Two Godot traps cost real time here and are now written down where the next
person will hit them:

  - a `#` comment inside a .tres [resource] block is not a comment. It parses
    as part of the preceding value and silently blanks the property after it.
    One in DistorderVesselDefinition.tres left definition_id empty, which
    surfaced as "<blank> did not resolve its definition" in a test far from
    the edit. The note lives in VesselDefinition.gd now.
  - a global class_name is not reliably resolvable, INCLUDING a script's own
    inside its own static function. ResourcePickupVFX.new() failed to compile
    when reached through a preview scene, taking Rock and the gas vents with
    it. It has no class_name now and constructs itself by path.

Suite 114/114.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Loïc Wisniewski 2026-08-21 17:38:30 +02:00
commit 54287d27ea
14 changed files with 648 additions and 41 deletions

14
Rock.gd
View file

@ -16,6 +16,13 @@ extends Area2D
signal collected
# By path, not by its `ResourcePickupVFX` global name: a bare class-name
# reference needs the global class cache already warm, which it is not when
# this script is reached indirectly - loading Main.tscn from inside a preview
# scene made it a hard parse error. Same workaround PlanetSetups and
# PlanetSetupEditor already use.
const RESOURCE_PICKUP_VFX = preload("res://ResourcePickupVFX.gd")
# Seconds before an uncollected rock disappears. 0 means never, which is what
# hand-placed surface rocks use - a planet surface is bounded and authored, so
# nothing accumulates. Ore dropped by a shot asteroid sets a real lifetime,
@ -98,8 +105,13 @@ func _on_area_entered(area: Area2D) -> void:
# spendable once the fleet has flown it back to the mothership.
# #56: the hold has a finite total_capacity now - a full fleet must
# leave the rock behind rather than despawning it for nothing.
if GameState.collect_cargo(1) <= 0:
var taken: int = GameState.collect_cargo(1)
if taken <= 0:
return
# #79: say what was picked up, where it was picked up. Parented to the
# root rather than to this node, which is about to be freed.
RESOURCE_PICKUP_VFX.spawn(get_tree().root, global_position,
GameState.RESOURCE_ORE, taken)
collected.emit()
queue_free()