Paradaux
IssuesPAR-170Planned
0

chestshop_shop spatial query support: location index + region/chunk/distance read API

Part of PAR-166 (spin out /find). Data-layer gap for spatial features.

Legacy chestshop-database queries shops by chunk / bounding box (selectShopsInChunk, selectShopsInBoundingBox) to render holograms per loaded chunk, and computes distance for the DISTANCE sort. Treasury's chestshop_shop is indexed by item_key/material/owner only — there is no spatial index on (world, sign_x, sign_z), and no region read path.

Do:

  • New economy-schema migration: add a (world, sign_x, sign_z) index to chestshop_shop (the uq_shop_location unique key is (world, sign_x, sign_y, sign_z) — leading-column prefix helps point lookups but a 2D x/z index serves region scans better).
  • Read API (mapper + endpoint or MarketApi read method) for "shops in world within bounding box / chunk" so the new plugin can render holograms and resolve distance without scanning the whole table.

Scope check: if holograms end up rendered purely from a plugin-local cache rather than querying Treasury per chunk, only the distance-sort path matters — confirm with the holograms sub-issue before building the full region API.

Comments

No comments yet.

Activity

  • tesks changed status to Status → PlannedJun 15, 2026, 12:33 AM
  • tesks created the issueJun 14, 2026, 11:07 PM