champions-of-luneraria/tools/godot-golden/run_godot.sh
Martin Stickelbroeck 8a72cb165a U2B World Geometry
G1-Karte in Unity (Assets/Luneraria/Scenes/G1_Map.unity), reproduzierbar
gebaut aus dem Godot-Weltgenerator (gebacken), den FBX-Modellen aus U2A und der
Karte des C#-Kerns.

- tools/godot-golden/world_export.gd: backt Gelände (Raster, Farben, Lauf- und
  Standhöhen), Lanebeläge, Plattform, Brücke, Randsteine, Basen, Landmarken,
  Vegetation, Adern, Grottentreppen, Aufstellungsbereiche und Licht. Braucht
  einen echten Renderer (HEADLESS=0); prüft auf Headless-Einheitstransformationen.
- LuneWorldBuilder: Meshes (GUID-stabil), Szene, Licht, Himmel, Post-Processing,
  16 Türme, 2 Ancients und die Grotte aus LuneMap mit Teammaterialien.
- Materialsystem: Luneraria/Surface (Gelände, Kluft-Oberflächen, Fluss, Adern,
  Kristall, G2-Werte mit Teamvarianten und Vertex-AO) und Luneraria/Pad;
  LuneMaterialSet.Dress wie Godots dress.
- View-Assembly: LuneSpace (Unity = (-x, h, y)), LuneGround, LuneCameraMath,
  LuneBuildingView (Zustände intakt bis Ruine).
- Vergleichsbilder mit den Kameraeinstellungen der Godot-G2-Aufnahmen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:01:25 +02:00

33 lines
1.2 KiB
Bash
Executable file

#!/bin/sh
# Runs a tool of tools/godot-golden as a scene inside the Godot reference project, so the
# project's autoloads (DataCatalog, ...) exist; `godot --script` would not load them.
# The tool is copied to <godot project>/.port_tmp/ for the run and removed afterwards; the
# reference repository stays unchanged.
# Usage: sh tools/godot-golden/run_godot.sh <tool name without .gd> [tool arguments ...]
# HEADLESS=0 runs with a real rendering driver (a window opens briefly). The world bake needs
# it: Godot's headless dummy renderer does not keep MultiMesh instance transforms.
set -u
HERE="$(cd "$(dirname "$0")" && pwd)"
GODOT_PROJECT="${GODOT_PROJECT:-$HERE/../../../saumwacht-godot}"
GODOT="${GODOT:-godot}"
NAME="$1"
shift
TMP="$GODOT_PROJECT/.port_tmp"
mkdir -p "$TMP"
cp "$HERE/$NAME.gd" "$TMP/$NAME.gd"
cat > "$TMP/$NAME.tscn" <<SCENE
[gd_scene format=3]
[ext_resource type="Script" path="res://.port_tmp/$NAME.gd" id="1"]
[node name="PortTool" type="Node"]
script = ExtResource("1")
SCENE
if [ "${HEADLESS:-1}" = "0" ]; then
"$GODOT" --path "$GODOT_PROJECT" "res://.port_tmp/$NAME.tscn" -- "$@"
else
"$GODOT" --headless --path "$GODOT_PROJECT" "res://.port_tmp/$NAME.tscn" -- "$@"
fi
CODE=$?
rm -rf "$TMP"
exit $CODE