Add durable recipe discovery and profession crafting

This commit is contained in:
dingo
2026-09-09 13:28:07 -04:00
parent 940a345613
commit b65f3e8562
42 changed files with 2183 additions and 136 deletions
+2 -1
View File
@@ -98,6 +98,7 @@ func (h *HTTP) Handler() http.Handler {
mux := http.NewServeMux()
h.portalRoutes(mux)
h.travelRoutes(mux)
h.craftingRoutes(mux)
h.catalogRoutes(mux)
mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) {
if !h.s.ready.Load() {
@@ -149,7 +150,7 @@ func (h *HTTP) Handler() http.Handler {
h.s.mu.Lock()
defer h.s.mu.Unlock()
b := h.s.world.Balance
respond(w, 200, map[string]any{"worldId": h.s.world.ID, "kind": h.s.world.Kind, "development": h.auth.dev, "worlds": h.worlds, "chunkSize": b.ChunkSize, "playerSpeed": b.PlayerSpeed, "attackRange": b.AttackRange, "gatherRange": b.GatherRange, "recipes": b.Recipes, "tickHz": b.TickHz})
respond(w, 200, map[string]any{"worldId": h.s.world.ID, "kind": h.s.world.Kind, "development": h.auth.dev, "worlds": h.worlds, "chunkSize": b.ChunkSize, "playerSpeed": b.PlayerSpeed, "attackRange": b.AttackRange, "gatherRange": b.GatherRange, "tickHz": b.TickHz})
})
mux.HandleFunc("GET /api/preview", func(w http.ResponseWriter, r *http.Request) {
h.s.mu.Lock()