Sharpen upgrades, mark the convoy's destination, and give the world sound

#204 the Beam Collimator widens the beam instead of adding range to one that
already crosses the screen; beam width becomes a per-shot vessel stat.
#205 the Energy Propulser gains three upgrades - dash recharge, dash reach,
and boosted-cruise drain - which turns three constants into vessel stats.
#206 three further doctrines carry the fleet from ten to twenty.
#207 the prologue's World Ship gets a marker, through the scanner's own
guidance arrow rather than a second one.
#208 #210 #213 #214 four new synthesised sounds: the breach opening, cargo
reaching the hold, a rock breaking, and a gas bomb blooming.
#215 building health bars are larger, plated and framed.

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-05 12:16:17 +02:00
commit 78836882af
33 changed files with 716 additions and 52 deletions

View file

@ -17,11 +17,22 @@ var building_type: String:
# #99: drawn only once the structure has actually been hit. A full bar over
# every building would be permanent clutter saying nothing, and the fleet
# would be flying over a field of meters in peacetime.
const HEALTH_BAR_WIDTH: float = 74.0
const HEALTH_BAR_HEIGHT: float = 7.0
const HEALTH_BAR_OFFSET: float = -78.0
const HEALTH_FULL_COLOR: Color = Color(0.45, 0.9, 0.55)
const HEALTH_HURT_COLOR: Color = Color(1.0, 0.35, 0.25)
# #215 made it bigger and brighter. It stays a DAMAGE-ONLY bar: the reason
# above still holds, and a field of full meters in peacetime is clutter, not
# visibility. What was actually hard to see was the bar when it was there -
# 74x7 of muted colour against a lit structure, at the zoom the game is
# usually played at.
const HEALTH_BAR_WIDTH: float = 104.0
const HEALTH_BAR_HEIGHT: float = 14.0
const HEALTH_BAR_OFFSET: float = -88.0
# The dark plate the bar sits on, drawn past its edges so the meter reads
# against the structure's own glow instead of competing with it.
const HEALTH_BAR_PAD: float = 3.0
const HEALTH_FULL_COLOR: Color = Color(0.5, 1.0, 0.55)
const HEALTH_HURT_COLOR: Color = Color(1.0, 0.28, 0.2)
const HEALTH_PLATE_COLOR: Color = Color(0.02, 0.02, 0.06, 0.92)
const HEALTH_FRAME_COLOR: Color = Color(0.85, 0.96, 1.0, 0.95)
const HEALTH_FRAME_WIDTH: float = 2.0
var _drawn_health: float = 1.0
@ -63,12 +74,23 @@ func _draw() -> void:
var health: float = health_fraction()
var left: float = -HEALTH_BAR_WIDTH * 0.5
var top: float = HEALTH_BAR_OFFSET
var fill_color: Color = HEALTH_HURT_COLOR.lerp(HEALTH_FULL_COLOR, health)
draw_rect(Rect2(left - HEALTH_BAR_PAD, top - HEALTH_BAR_PAD,
HEALTH_BAR_WIDTH + HEALTH_BAR_PAD * 2.0,
HEALTH_BAR_HEIGHT + HEALTH_BAR_PAD * 2.0), HEALTH_PLATE_COLOR)
# The empty part is not left blank: a dim wash of the fill colour shows
# how much has GONE, which is the thing being reported.
draw_rect(Rect2(left, top, HEALTH_BAR_WIDTH, HEALTH_BAR_HEIGHT),
Color(0.02, 0.02, 0.06, 0.85))
Color(fill_color.r, fill_color.g, fill_color.b, 0.16))
draw_rect(Rect2(left, top, HEALTH_BAR_WIDTH * health, HEALTH_BAR_HEIGHT),
HEALTH_HURT_COLOR.lerp(HEALTH_FULL_COLOR, health))
fill_color)
# A bright square cap on the fill's leading edge, so the level itself has
# an edge to catch rather than only the colour changing.
if health > 0.001:
draw_rect(Rect2(left + HEALTH_BAR_WIDTH * health - HEALTH_FRAME_WIDTH,
top, HEALTH_FRAME_WIDTH, HEALTH_BAR_HEIGHT), HEALTH_FRAME_COLOR)
draw_rect(Rect2(left, top, HEALTH_BAR_WIDTH, HEALTH_BAR_HEIGHT),
Color(0.55, 0.78, 0.86, 0.55), false, 1.0)
HEALTH_FRAME_COLOR, false, HEALTH_FRAME_WIDTH)
func available_actions() -> PackedStringArray: