fix(theme): drop redundant const preloads shadowing global class_names

palette.gd / theme_keys.gd already declare `class_name`, so `const Palette =
preload(...)` in every consumer shadowed the global class and emitted 4
editor errors ("has the same name as a global class"). Reference the global
class_names directly. Editor reload now clean; suite 125/125; runtime probe
still builds all 75 showcase nodes with the theme applied.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 21:58:34 -05:00
parent 6530625f4d
commit 0c12e13ac1
6 changed files with 0 additions and 9 deletions

View File

@@ -1,7 +1,5 @@
extends "res://addons/gut/test.gd"
const Palette = preload("res://scripts/theme/palette.gd")
func test_core_tokens_are_colors():
assert_true(Palette.BLOOD is Color)

View File

@@ -1,7 +1,6 @@
# client/tests/unit/test_theme_resource.gd
extends "res://addons/gut/test.gd"
const ThemeKeys = preload("res://scripts/theme/theme_keys.gd")
const Builder = preload("res://scripts/theme/build_game_theme.gd")
const THEME_PATH := "res://assets/theme/game_theme.tres"