26 lines
630 B
Go
26 lines
630 B
Go
//go:build !wasm
|
|
// +build !wasm
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"path/filepath"
|
|
)
|
|
|
|
// loadChunks lädt alle Chunks aus dem Verzeichnis (Native Desktop)
|
|
func (g *Game) loadChunks() {
|
|
baseDir := "cmd/client/web/assets"
|
|
chunkDir := filepath.Join(baseDir, "chunks")
|
|
|
|
err := g.world.LoadChunkLibrary(chunkDir)
|
|
if err != nil {
|
|
log.Println("⚠️ Chunks konnten nicht geladen werden:", err)
|
|
} else {
|
|
log.Printf("✅ Chunks geladen: %d Einträge", len(g.world.ChunkLibrary))
|
|
for id, chunk := range g.world.ChunkLibrary {
|
|
log.Printf(" 📦 Chunk '%s': Width=%d, Objects=%d", id, chunk.Width, len(chunk.Objects))
|
|
}
|
|
}
|
|
}
|