Markers: editable, manual x/y/z popup placement, drop heightmap auto-derive
Markers now carry a caller-supplied x/y/z instead of an auto-resolved terrain height: clicking the map opens a real Leaflet popup pre-filled with the clicked x/z, a default y of 60, and a random color, all editable before saving. The same popup now also opens for editing an existing marker (new updateMarker/PATCH /api/markers/:markerId, TDD'd in markers.test.ts/index.test.ts). Removes the now-unused resolveHeight/GET /api/height machinery. Linked-account markers already synced server-side via the markers table, so cross-device sync falls out of the existing loadMarkers()-on-init flow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015tKdPZt78zbPUZMXWzKEKt
This commit is contained in:
@@ -60,9 +60,9 @@ export const chatMessages = pgTable("chat_messages", {
|
||||
|
||||
// A web-placed marker, owned by a linked account (anonymous visitors keep their marker list in
|
||||
// browser localStorage only — see the plan's "Feature: web markers..." section — so there's
|
||||
// nothing to persist here for them). Placement is 2D-only (x/z picked on the Leaflet map); `y` is
|
||||
// resolved once at creation time from `chunkColumns`' heightmap and stored, not recomputed later,
|
||||
// so a marker doesn't silently move if the terrain above it changes afterward.
|
||||
// nothing to persist here for them). x/y/z are all set directly by the player in the web UI's
|
||||
// click-to-place/edit popup (x/z pre-filled from the click, y defaulting to 60), not derived
|
||||
// server-side, and can be changed later via the same popup (see markers.ts's updateMarker).
|
||||
export const markers = pgTable("markers", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
accountId: uuid("account_id")
|
||||
|
||||
Reference in New Issue
Block a user