Add terrain biomes jumping and extensible gathering professions
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user