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
+1 -1
View File
@@ -24,7 +24,7 @@ func _run() -> void:
root.add_child(we)
var crowd := MultiMeshInstance3D.new()
crowd.set_script(load("res://crowd_billboards.gd"))
crowd.set_script(load("res://systems/crowd/crowd_billboards.gd"))
crowd.set("source_path", NodePath()) # force the generated fallback stand
crowd.set("fallback_count", 90)
root.add_child(crowd)
+1 -1
View File
@@ -13,7 +13,7 @@ func _init() -> void:
func _run() -> void:
DirAccess.make_dir_recursive_absolute(OUT)
var ps := load("res://scene.tscn") as PackedScene
var ps := load("res://levels/game_shell.tscn") as PackedScene
var scene := ps.instantiate()
root.add_child(scene)
current_scene = scene
+1 -1
View File
@@ -13,7 +13,7 @@ func _init() -> void:
func _run() -> void:
DirAccess.make_dir_recursive_absolute(OUT)
var scene := (load("res://scene.tscn") as PackedScene).instantiate()
var scene := (load("res://levels/game_shell.tscn") as PackedScene).instantiate()
root.add_child(scene)
current_scene = scene
+8 -8
View File
@@ -4,8 +4,8 @@ extends SceneTree
## (ported from the old code-built particles). Re-run only to reset a placeholder from scratch:
## godot --headless --script tools/seed_fx_placeholders.gd
const _EFFECT_SCRIPT := "res://fx/one_shot_effect.gd"
const _GALLERY_SCRIPT := "res://fx/effect_gallery.gd"
const _EFFECT_SCRIPT := "res://systems/fx/one_shot_effect.gd"
const _GALLERY_SCRIPT := "res://systems/fx/effect_gallery.gd"
func _init() -> void:
@@ -14,7 +14,7 @@ func _init() -> void:
_seed_spark()
_seed_hit_flash()
_seed_gallery()
print("Seeded FX placeholder scenes into res://fx/")
print("Seeded FX placeholder scenes into res://systems/fx/")
quit()
@@ -81,7 +81,7 @@ func _seed_blood_burst() -> void:
p.initial_velocity_max = 11.0
p.scale_amount_min = 0.5
p.scale_amount_max = 1.6
_save(p, "res://fx/blood_burst.tscn")
_save(p, "res://systems/fx/blood_burst.tscn")
func _seed_slam_dust() -> void:
@@ -106,7 +106,7 @@ func _seed_slam_dust() -> void:
p.initial_velocity_max = 6.5
p.scale_amount_min = 0.6
p.scale_amount_max = 1.4
_save(p, "res://fx/slam_dust.tscn")
_save(p, "res://systems/fx/slam_dust.tscn")
func _seed_spark() -> void:
@@ -129,7 +129,7 @@ func _seed_spark() -> void:
p.initial_velocity_max = 7.0
p.scale_amount_min = 0.4
p.scale_amount_max = 1.0
_save(p, "res://fx/spark.tscn")
_save(p, "res://systems/fx/spark.tscn")
func _seed_hit_flash() -> void:
@@ -151,7 +151,7 @@ func _seed_hit_flash() -> void:
p.initial_velocity_max = 1.5
p.scale_amount_min = 0.8
p.scale_amount_max = 1.4
_save(p, "res://fx/hit_flash.tscn")
_save(p, "res://systems/fx/hit_flash.tscn")
func _seed_gallery() -> void:
@@ -196,5 +196,5 @@ func _seed_gallery() -> void:
root_node.set_script(load(_GALLERY_SCRIPT))
var packed := PackedScene.new()
packed.pack(root_node)
ResourceSaver.save(packed, "res://fx/effect_gallery.tscn")
ResourceSaver.save(packed, "res://systems/fx/effect_gallery.tscn")
root_node.free()