#84: move 215 root files into a folder hierarchy

Everything lived in one flat directory, so a diff gave no clue what area it
touched and finding the file you wanted meant knowing its exact name. Twelve
folders now, grouped by what a thing IS rather than what type it is - a
vessel's definition, its component scenes and its upgrade resources sit
together, because that is the set you read when you change one of them.

  buildings  core  controllers  enemies  logistics  planets
  resources  shaders  surface  ui  vessels  vfx  world

332 files moved and every res:// reference rewritten - 306 files touched,
including the autoload and main-scene paths in project.godot. Nothing renamed:
this is purely where files sit, so the diff is a pile of pure moves and no
behaviour is buried in it. ui_theme.tres, icon.svg and web_shell.html stay at
the root, where Godot and the export preset expect them.

Verified three ways, because a suite alone would not have caught all of it:
the full 117 pass, the web export builds clean, and the game renders.

The export is why that matters. The FIRST export after the move failed with
"Attempt to open script 'res://GameState.gd'" - the old path - while
project.godot on disk plainly said res://core/GameState.gd. That is this
project's documented Android FUSE mtime trap: Godot served a cached copy of a
file whose content had changed. A `touch` fixed it. Nothing in the test suite
would have found that, because the suite runs from a copy on a native
filesystem - the one place the bug cannot happen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Loïc Wisniewski 2026-08-21 19:44:14 +02:00
commit 2f161621c3
495 changed files with 571 additions and 567 deletions

47
ui/NeonPanel.gd Normal file
View file

@ -0,0 +1,47 @@
class_name NeonPanel
extends Control
# A bounded dialog card drawn in the game's own style: a dark chamfered
# body with a glowing border and bright corner brackets. Chamfered rather
# than square because cut corners read as "console panel" and match the
# hard-edged neon of the buttons and HUD.
#
# Draws itself from its own rect, so it can be sized freely in the scene.
@export var glow_color: Color = Color(0.25, 0.85, 1.0)
@export var core_color: Color = Color(1.0, 1.0, 1.0)
# Fully opaque: at even 97% the bright neon of whatever sits behind the
# panel ghosts through and makes the text harder to read.
@export var fill_color: Color = Color(0.02, 0.03, 0.07, 1.0)
@export var corner_cut: float = 26.0
@export var bracket_length: float = 46.0
func _draw() -> void:
var w: float = size.x
var h: float = size.y
var c: float = corner_cut
var body: PackedVector2Array = PackedVector2Array([
Vector2(c, 0.0), Vector2(w - c, 0.0),
Vector2(w, c), Vector2(w, h - c),
Vector2(w - c, h), Vector2(c, h),
Vector2(0.0, h - c), Vector2(0.0, c),
])
draw_colored_polygon(body, fill_color)
NeonDraw.draw_glowing_polygon(self, body, glow_color, 1.0, core_color)
# Corner brackets: short doubled strokes just inside each cut corner,
# which is what gives it the heads-up-display feel rather than looking
# like a plain outlined box.
var b: float = bracket_length
var inset: float = 10.0
var corners: Array = [
[Vector2(inset, c + inset), Vector2(inset, c + inset + b), Vector2(c + inset, inset), Vector2(c + inset + b, inset)],
[Vector2(w - inset, c + inset), Vector2(w - inset, c + inset + b), Vector2(w - c - inset, inset), Vector2(w - c - inset - b, inset)],
[Vector2(inset, h - c - inset), Vector2(inset, h - c - inset - b), Vector2(c + inset, h - inset), Vector2(c + inset + b, h - inset)],
[Vector2(w - inset, h - c - inset), Vector2(w - inset, h - c - inset - b), Vector2(w - c - inset, h - inset), Vector2(w - c - inset - b, h - inset)],
]
for corner in corners:
NeonDraw.draw_glowing_line(self, corner[0], corner[1], glow_color, 0.9, 0.3, core_color)
NeonDraw.draw_glowing_line(self, corner[2], corner[3], glow_color, 0.9, 0.3, core_color)