Add space-time distorder vessel and fleet speed fader (#59)

GameState.fleet_speed_multiplier (1.0-3.0) is applied at the point of
use - Fleet's cruise anchor and Ship's own max_speed/acceleration -
rather than baked into stored stats, so a stat upgrade researched
mid-boost can't corrupt the base value and the fader takes effect
immediately with no re-apply step.

Ship.arrive_radius is scaled by the same multiplier: at higher speeds
each physics tick covers a proportionally larger step, and once that
step outgrows a fixed arrive_radius the ship can overshoot its
snap-to-target zone every tick while chasing a target that's now also
receding faster - visible as the fleet stretching apart under boost.
Scaling it preserves the same "snaps onto its slot" tightness at any
boost level that 1.0x already has.

SpeedFader.gd is a self-contained vertical drag control (TouchJoystick's
raw-touch idiom, not _gui_input) that writes straight to the autoload
rather than reporting a value for something else to apply. It also
resets the multiplier to 1.0 the instant fleet.has_capability("distorder")
goes false, so a fleet can never be left permanently boosted by a vessel
it no longer has.

VesselDistorderComponent carries no per-shot behaviour (energy drain
while boosted is #62) - its presence is what matters. Registered in
VesselDefinitions, wired into the crafter/hangar/ship-lab menus per
#57's note (5/5/6 -> 6/6/7 columns).
This commit is contained in:
Loïc Wisniewski 2026-08-16 17:59:04 +02:00
commit 116e0f97d3
14 changed files with 675 additions and 86 deletions

View file

@ -41,6 +41,8 @@ enum Icon {
# #58: LASER_VESSEL is the ship glyph, LASER_SHOT the action button -
# same two-icon split as GAS_BOMBER/GAS_BOMB above.
LASER_VESSEL, LASER_SHOT,
# #59: a warped ring reads as a space-time distortion rather than a hull.
DISTORDER_VESSEL,
}
# Size the glyphs were originally drawn against. Every glyph dimension is
@ -239,6 +241,8 @@ func _draw() -> void:
_draw_laser_vessel(center, pulse, s)
Icon.LASER_SHOT:
_draw_laser_shot(center, pulse, s)
Icon.DISTORDER_VESSEL:
_draw_distorder_vessel(center, pulse, s)
func _draw_close(center: Vector2, pulse: float, s: float) -> void:
@ -277,6 +281,18 @@ func _draw_carrier(center: Vector2, pulse: float, s: float) -> void:
NeonDraw.draw_glowing_polygon(self, hull, _active_color(), pulse, core_color)
func _draw_distorder_vessel(center: Vector2, pulse: float, s: float) -> void:
# A ring whose radius wobbles with angle instead of a plain circle -
# reads as warped space rather than a hull silhouette.
var points: PackedVector2Array = PackedVector2Array()
for i in range(17):
var a: float = TAU * float(i) / 16.0
var r: float = (10.0 + 3.0 * sin(a * 3.0)) * s
points.append(center + Vector2(cos(a), sin(a)) * r)
NeonDraw.draw_glowing_path(self, points, _active_color(), pulse, 0.8, core_color)
NeonDraw.draw_glowing_circle(self, center, 2.5 * s, _active_color(), pulse, core_color)
func _draw_laser_vessel(center: Vector2, pulse: float, s: float) -> void:
# A slim dart rather than the interceptor's plain triangle - the notch at
# the nose reads as a fixed forward-facing emitter, not a hull point.