Reorganize the codebase into role-based folders (snake_case)

Move the 40-odd root-level scripts and scenes into a tree that groups by role,
per the approved roadmap (WS2/WS3): actors/{player,matador,bear}, systems/{combat,
fx,input,debug,render,crowd,config}, ui/, props/ (was tscn_s/). Rename the shell
scene.tscn -> levels/game_shell.tscn and every PascalCase scene to snake_case
(Player.tscn -> player.tscn, MainMenu.tscn -> main_menu.tscn, etc.) so the
case-insensitive web/macOS filesystems can't alias two files together.

Done as a scripted move: each file travels with its .uid; every quoted res:// path
across scenes, scripts, .tres, and project.godot's 9 autoloads is rewritten; the
.godot uid/class cache is rebuilt from scratch. Scenes still resolve by uid, so the
rewrite is belt-and-suspenders. Lint globs (run_tests.sh + both CI workflows) now
walk the new dirs; an orphan animation_tree.gd.uid and 7 pre-existing trailing-
whitespace lints (barrel/torch, never covered by the old root-only glob) are cleaned.

Full suite green on both sides. Asset consolidation (Assets/Animations/fonts ->
art/) is deferred — moving imported .glb/.png/.ttf is safer done in the editor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KoYBYQgRyY1zDHXMsXY3V
This commit is contained in:
2026-09-06 00:04:41 +03:00
parent b839252fe0
commit 7b6a141767
141 changed files with 199 additions and 158 deletions
+49
View File
@@ -0,0 +1,49 @@
class_name UiFonts
extends RefCounted
## Shared thematic fonts for menus and HUD. Cinzel is a Roman monumental capital
## typeface — a deliberate nod to the "-osseum" (Colosseum) in Bullosseum.
##
## Fonts load via load_dynamic_font so they resolve identically in the editor,
## headless tests and exported builds, whether or not the .ttf has been imported.
const _DECORATIVE := "res://fonts/CinzelDecorative-Bold.ttf"
const _ROMAN := "res://fonts/Cinzel.ttf"
static var _title: FontFile = null
static var _body: FontFile = null
static var _body_bold: FontVariation = null
## Ornate display face — big banners, menu title, win/lose text.
static func title() -> FontFile:
if _title == null:
_title = _load(_DECORATIVE)
return _title
## Cleaner monumental face — buttons, labels, body copy.
static func body() -> FontFile:
if _body == null:
_body = _load(_ROMAN)
return _body
## Emboldened Roman face for small, high-legibility bits (keycaps, badges) where
## Cinzel's thin regular strokes wash out. Faked via FontVariation since only the
## regular weight ships, so no extra .ttf is needed.
static func body_bold() -> FontVariation:
if _body_bold == null:
_body_bold = FontVariation.new()
_body_bold.base_font = body()
_body_bold.variation_embolden = 0.5
return _body_bold
static func _load(path: String) -> FontFile:
if ResourceLoader.exists(path):
var res := load(path)
if res is FontFile:
return res as FontFile
var f := FontFile.new()
f.load_dynamic_font(path)
return f