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
+3 -4
View File
@@ -1,5 +1,5 @@
class_name HudHeadingTape
extends Control
extends HudInstrument
# Aircraft-style heading tape: a strip of compass ticks slides under a fixed
# centre marker, with cardinal letters so the player always knows which way
@@ -11,7 +11,6 @@ const MARKER_COLOR := Color(1.0, 0.8, 0.2)
# Degrees of heading visible across the full tape width.
const VISIBLE_RANGE := 90.0
const SMOOTHING := 12.0
const CARDINALS := {0: "N", 45: "NE", 90: "E", 135: "SE", 180: "S", 225: "SW", 270: "W", 315: "NW"}
@@ -28,8 +27,8 @@ func set_heading(heading_deg: float) -> void:
func _process(delta: float) -> void:
var t := 1.0 - exp(-SMOOTHING * delta) # frame-rate independent
_heading = fmod(HudAttitudeIndicator.lerp_angle_deg(_heading, _target_heading, t) + 360.0, 360.0)
var t := _smoothing_weight(delta)
_heading = fmod(lerp_angle_deg(_heading, _target_heading, t) + 360.0, 360.0)
queue_redraw()