refactor(team-colors): collapse disagreeing team palettes into one source of truth

ship.gd, HUDController.gd, and goal.gd each declared their own TEAM_COLORS,
arena_boundary.gd/arena_deck.gdshader had a third pair, and HUD.tscn baked
in a fourth (hardcoded "BLUE"/"ORANGE" labels) — nose, goal rim, end zone,
and scoreboard all rendered different blues. New scripts/team_colors.gd
(class_name TeamColors) is now the single source every one of those reads
from, and team identity moves to purple/green.
This commit is contained in:
Josh Creek
2026-08-04 19:18:45 +01:00
parent ff2e40198f
commit fa9590d9c3
9 changed files with 39 additions and 30 deletions
+1 -4
View File
@@ -10,9 +10,6 @@ extends Area3D
signal goal_scored(team: int)
# Frame tints, indexed by team.
const TEAM_COLORS := [Color(0.2, 0.55, 1.0), Color(1.0, 0.4, 0.28)]
# The pocket is sunk into the end wall, so it can be at most as deep as that
# wall is thick or it pokes out the back of the arena. ArenaBoundary cuts the
# matching aperture in the hull (see its GOAL_APERTURE_* constants).
@@ -52,7 +49,7 @@ func _on_body_entered(body):
func _build_visuals() -> void:
var mouth := ($CollisionShape3D.shape as BoxShape3D).size
var half := Vector2(mouth.x, mouth.y) / 2.0
var tint: Color = TEAM_COLORS[team % TEAM_COLORS.size()]
var tint: Color = TeamColors.TEAM_COLORS[team % TeamColors.TEAM_COLORS.size()]
# One ArrayMesh, four surfaces (pocket, net, bezel, rim). They stay separate
# surfaces rather than sharing materials because they aren't visually