refactor(*): DRY up arena scenes, game modes, and HUD instruments

Arenas inherit from a new arena_base.tscn instead of restating ~40 shared
lines each; only sky/ambient/glow/tint/decoration vary, exposed via new
Arena exports since nested Environment properties aren't overridable
through scene inheritance. Bot construction and score-keeping move onto
GameMode, shared by match and spectate modes while preserving their
differing GameSettings-override behavior and the HUD's score-row
duck-typing. HUD instruments share a HudInstrument base for the
smoothing-weight calc and angle-lerp helper. Also dedupes
MAIN_MENU_SCENE_PATH into ScenePaths and documents why DIFFICULTIES
tiers share one checkpoint.
This commit is contained in:
Josh Creek
2026-08-04 15:07:33 +01:00
parent b285d012dc
commit 08a0f74391
18 changed files with 203 additions and 268 deletions
+2 -4
View File
@@ -1,5 +1,5 @@
class_name HudGauge
extends Control
extends HudInstrument
# Generic bar gauge (vertical or horizontal) with a short label and numeric
# readout — used for speed, altitude, and thrust. A dumb display fed by
@@ -9,8 +9,6 @@ const BG_COLOR := Color(0.05, 0.07, 0.11, 0.55)
const FRAME_COLOR := Color(0.5, 0.85, 1.0, 0.7)
const TEXT_COLOR := Color(0.85, 0.92, 1.0, 0.9)
const SMOOTHING := 12.0
@export var label := "SPD"
@export var max_value := 100.0
@export var horizontal := false
@@ -27,7 +25,7 @@ func set_value(value: float) -> void:
func _process(delta: float) -> void:
var t := 1.0 - exp(-SMOOTHING * delta) # frame-rate independent
var t := _smoothing_weight(delta)
_value = lerpf(_value, _target, t)
queue_redraw()