Add terrain biomes jumping and extensible gathering professions

This commit is contained in:
dingo
2026-09-08 21:54:23 -04:00
parent 141cb9e6b2
commit df7b245ca7
34 changed files with 1895 additions and 184 deletions
+1 -2
View File
@@ -153,11 +153,10 @@ func (h *HTTP) Handler() http.Handler {
mux.HandleFunc("GET /api/preview", func(w http.ResponseWriter, r *http.Request) {
h.s.mu.Lock()
defer h.s.mu.Unlock()
t := game.NewTerrain(h.s.world.Seed, h.s.world.Balance)
chunks := []p.Chunk{}
for z := -1; z <= 1; z++ {
for x := -1; x <= 1; x++ {
chunks = append(chunks, t.Chunk(x, z))
chunks = append(chunks, h.s.world.PreviewChunk(x, z))
}
}
respond(w, 200, chunks)