From c6d7e6c84e56e103b17f89412a20ab985fb02e19 Mon Sep 17 00:00:00 2001 From: Jonas Reith Date: Thu, 27 Aug 2026 09:18:17 +0200 Subject: [PATCH] Restructure project into boot/autoload/world/player folders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flat root layout replaced with a domain-based structure: - autoload/ the two existing singleton scripts (InteractionManager, InteractionUI) — grouped by role, matching project.godot's [autoload] section - world/ the flying island: terrain.gd, and world/poi/ for the POI marker + gate scripts/scenes - player/ everything about the player as a character: player.gd/.tscn, camera_rig.gd (it only exists to follow the player) - boot/ created empty for now, will hold the opening/menu screens main.tscn renamed to world/island.tscn — "main" stops making sense once the actual run/main_scene becomes a boot screen (next commit). Verified via grep that main.tscn was referenced nowhere else by path (only by UID elsewhere, which self-heals). Every .gd got its .uid sidecar moved alongside it. Two ext_resource entries had no UID (poi_gate.tscn's own script ref, and island.tscn's ref to poi_gate.tscn) and needed their path= fixed by hand; everything else is UID-based and resolved itself after a project reimport. Also removed two untracked-looking but actually committed editor temp files (preview_scene.tscn*.tmp, leftovers from the unused hterrain addon, referenced nowhere). Verified headless: all 8 affected scenes (island, poi, poi_gate, player, interaction_ui, and the three debug prototypes that reference moved files) load with exit code 0. No behavior change, pure move. --- .../interaction_manager.gd | 0 .../interaction_manager.gd.uid | 0 interaction_ui.gd => autoload/interaction_ui.gd | 0 .../interaction_ui.gd.uid | 0 .../interaction_ui.tscn | 0 modeltest.tscn => debug/modeltest.tscn | 0 camera_rig.gd => player/camera_rig.gd | 0 camera_rig.gd.uid => player/camera_rig.gd.uid | 0 player.gd => player/player.gd | 0 player.gd.uid => player/player.gd.uid | 0 player.tscn => player/player.tscn | 0 preview_scene.tscn3183368435.tmp | 16 ---------------- preview_scene.tscn3781868854.tmp | 16 ---------------- main.tscn => world/island.tscn | 2 +- poi.gd => world/poi/poi.gd | 0 poi.gd.uid => world/poi/poi.gd.uid | 0 poi.tscn => world/poi/poi.tscn | 0 poi_gate.gd => world/poi/poi_gate.gd | 0 poi_gate.gd.uid => world/poi/poi_gate.gd.uid | 0 poi_gate.tscn => world/poi/poi_gate.tscn | 2 +- terrain.gd => world/terrain.gd | 2 +- terrain.gd.uid => world/terrain.gd.uid | 0 22 files changed, 3 insertions(+), 35 deletions(-) rename interaction_manager.gd => autoload/interaction_manager.gd (100%) rename interaction_manager.gd.uid => autoload/interaction_manager.gd.uid (100%) rename interaction_ui.gd => autoload/interaction_ui.gd (100%) rename interaction_ui.gd.uid => autoload/interaction_ui.gd.uid (100%) rename interaction_ui.tscn => autoload/interaction_ui.tscn (100%) rename modeltest.tscn => debug/modeltest.tscn (100%) rename camera_rig.gd => player/camera_rig.gd (100%) rename camera_rig.gd.uid => player/camera_rig.gd.uid (100%) rename player.gd => player/player.gd (100%) rename player.gd.uid => player/player.gd.uid (100%) rename player.tscn => player/player.tscn (100%) delete mode 100755 preview_scene.tscn3183368435.tmp delete mode 100755 preview_scene.tscn3781868854.tmp rename main.tscn => world/island.tscn (99%) rename poi.gd => world/poi/poi.gd (100%) rename poi.gd.uid => world/poi/poi.gd.uid (100%) rename poi.tscn => world/poi/poi.tscn (100%) rename poi_gate.gd => world/poi/poi_gate.gd (100%) rename poi_gate.gd.uid => world/poi/poi_gate.gd.uid (100%) rename poi_gate.tscn => world/poi/poi_gate.tscn (93%) rename terrain.gd => world/terrain.gd (99%) rename terrain.gd.uid => world/terrain.gd.uid (100%) diff --git a/interaction_manager.gd b/autoload/interaction_manager.gd similarity index 100% rename from interaction_manager.gd rename to autoload/interaction_manager.gd diff --git a/interaction_manager.gd.uid b/autoload/interaction_manager.gd.uid similarity index 100% rename from interaction_manager.gd.uid rename to autoload/interaction_manager.gd.uid diff --git a/interaction_ui.gd b/autoload/interaction_ui.gd similarity index 100% rename from interaction_ui.gd rename to autoload/interaction_ui.gd diff --git a/interaction_ui.gd.uid b/autoload/interaction_ui.gd.uid similarity index 100% rename from interaction_ui.gd.uid rename to autoload/interaction_ui.gd.uid diff --git a/interaction_ui.tscn b/autoload/interaction_ui.tscn similarity index 100% rename from interaction_ui.tscn rename to autoload/interaction_ui.tscn diff --git a/modeltest.tscn b/debug/modeltest.tscn similarity index 100% rename from modeltest.tscn rename to debug/modeltest.tscn diff --git a/camera_rig.gd b/player/camera_rig.gd similarity index 100% rename from camera_rig.gd rename to player/camera_rig.gd diff --git a/camera_rig.gd.uid b/player/camera_rig.gd.uid similarity index 100% rename from camera_rig.gd.uid rename to player/camera_rig.gd.uid diff --git a/player.gd b/player/player.gd similarity index 100% rename from player.gd rename to player/player.gd diff --git a/player.gd.uid b/player/player.gd.uid similarity index 100% rename from player.gd.uid rename to player/player.gd.uid diff --git a/player.tscn b/player/player.tscn similarity index 100% rename from player.tscn rename to player/player.tscn diff --git a/preview_scene.tscn3183368435.tmp b/preview_scene.tscn3183368435.tmp deleted file mode 100755 index 3f88902..0000000 --- a/preview_scene.tscn3183368435.tmp +++ /dev/null @@ -1,16 +0,0 @@ -[gd_scene format=3 uid="uid://e8b1otd57xce"] - -[ext_resource type="Script" uid="uid://dehw4udbgwx4f" path="res://hightmap_gen.gd" id="1_regv8"] -[ext_resource type="Script" uid="uid://db1kymxglg8m1" path="res://preview_camera.gd" id="2_ji7iu"] - -[node name="PreviewScene" type="Node2D" unique_id=887284748] - -[node name="HightmapGen" type="Node" parent="." unique_id=1525090931] -script = ExtResource("1_regv8") - -[node name="preview_camera" type="Camera2D" parent="." unique_id=1468922324] -script = ExtResource("2_ji7iu") - -[node name="TextureRect" type="TextureRect" parent="." unique_id=1360046958] -offset_right = 40.0 -offset_bottom = 40.0 diff --git a/preview_scene.tscn3781868854.tmp b/preview_scene.tscn3781868854.tmp deleted file mode 100755 index 3f88902..0000000 --- a/preview_scene.tscn3781868854.tmp +++ /dev/null @@ -1,16 +0,0 @@ -[gd_scene format=3 uid="uid://e8b1otd57xce"] - -[ext_resource type="Script" uid="uid://dehw4udbgwx4f" path="res://hightmap_gen.gd" id="1_regv8"] -[ext_resource type="Script" uid="uid://db1kymxglg8m1" path="res://preview_camera.gd" id="2_ji7iu"] - -[node name="PreviewScene" type="Node2D" unique_id=887284748] - -[node name="HightmapGen" type="Node" parent="." unique_id=1525090931] -script = ExtResource("1_regv8") - -[node name="preview_camera" type="Camera2D" parent="." unique_id=1468922324] -script = ExtResource("2_ji7iu") - -[node name="TextureRect" type="TextureRect" parent="." unique_id=1360046958] -offset_right = 40.0 -offset_bottom = 40.0 diff --git a/main.tscn b/world/island.tscn similarity index 99% rename from main.tscn rename to world/island.tscn index 0b014c1..f87204b 100755 --- a/main.tscn +++ b/world/island.tscn @@ -5,7 +5,7 @@ [ext_resource type="Texture2D" uid="uid://epcqli428yem" path="res://assets/sprites/player/debug_player.png" id="2_h2yge"] [ext_resource type="Script" uid="uid://b0y06y7c0bihj" path="res://camera_rig.gd" id="3_h2yge"] [ext_resource type="PackedScene" uid="uid://be6ufrc3dsjge" path="res://poi.tscn" id="5_lquwl"] -[ext_resource type="PackedScene" path="res://poi_gate.tscn" id="5_gate"] +[ext_resource type="PackedScene" path="res://world/poi/poi_gate.tscn" id="5_gate"] [ext_resource type="PackedScene" uid="uid://dmhs1oy1kh6hi" path="res://assets/models/mountain.glb" id="6_7mycd"] [ext_resource type="PackedScene" uid="uid://gl4qpk4wto1e" path="res://assets/models/mountain2v5.glb" id="7_272bh"] [ext_resource type="PackedScene" uid="uid://be2uq7ixlbv6b" path="res://assets/models/forest.glb" id="8_5vw27"] diff --git a/poi.gd b/world/poi/poi.gd similarity index 100% rename from poi.gd rename to world/poi/poi.gd diff --git a/poi.gd.uid b/world/poi/poi.gd.uid similarity index 100% rename from poi.gd.uid rename to world/poi/poi.gd.uid diff --git a/poi.tscn b/world/poi/poi.tscn similarity index 100% rename from poi.tscn rename to world/poi/poi.tscn diff --git a/poi_gate.gd b/world/poi/poi_gate.gd similarity index 100% rename from poi_gate.gd rename to world/poi/poi_gate.gd diff --git a/poi_gate.gd.uid b/world/poi/poi_gate.gd.uid similarity index 100% rename from poi_gate.gd.uid rename to world/poi/poi_gate.gd.uid diff --git a/poi_gate.tscn b/world/poi/poi_gate.tscn similarity index 93% rename from poi_gate.tscn rename to world/poi/poi_gate.tscn index 659458d..c4a80a1 100644 --- a/poi_gate.tscn +++ b/world/poi/poi_gate.tscn @@ -1,6 +1,6 @@ [gd_scene format=3] -[ext_resource type="Script" path="res://poi_gate.gd" id="1_gate"] +[ext_resource type="Script" uid="uid://d34t6agm5pxgt" path="res://world/poi/poi_gate.gd" id="1_gate"] [ext_resource type="Texture2D" uid="uid://c3ajv7vb8c4fb" path="res://assets/debug/checkerboard.png" id="2_gate"] [sub_resource type="SphereShape3D" id="SphereShape3D_gate"] diff --git a/terrain.gd b/world/terrain.gd similarity index 99% rename from terrain.gd rename to world/terrain.gd index 728950c..44737f0 100644 --- a/terrain.gd +++ b/world/terrain.gd @@ -22,7 +22,7 @@ const COLOR_FACET_A := Color(0.55, 0.55, 0.48) const COLOR_FACET_B := Color(0.49, 0.49, 0.43) const COLOR_PAVILION := Color(0.30, 0.28, 0.26) -# Grenz-Props: gleiche Modelle + Skalierung + Hitbox-Maße wie in main.tscn. +# Grenz-Props: gleiche Modelle + Skalierung + Hitbox-Maße wie in world/island.tscn. # "radius"/"height" sind die Shape-Maße VOR der Skalierung (wie im Original); # der reale Welt-Radius (für die Überlappungsprüfung) ist radius * scale. const BORDER_KINDS := [ diff --git a/terrain.gd.uid b/world/terrain.gd.uid similarity index 100% rename from terrain.gd.uid rename to world/terrain.gd.uid