feat(world-builder): rectangle fill and tile mutation API with bounds check (#7) - #134
Conversation
…-zone grhIndex check
Code Review ✅ Approved 2 resolved / 2 findingsImplements atomic batch rectangle filling and region query endpoints for the World Builder with strict grid bounds checking, addressing the unvalidated region query params and invalid dead-zone indices findings. ✅ 2 resolved✅ Edge Case: /region query params not validated; NaN reaches SQL
✅ Edge Case: Rectangle/tile grhIndex allows invalid dead-zone indices
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
Closes #7
Summary of Changes
Implements atomic batch rectangle filling and region query endpoints for the in-game World Builder / Map Editor, with strict 100x100 grid bounds checking and a 500-tile safety cap per mutation.
Features & Deliverables
PUT /admin/game-data/maps/:mapNum/rectanglesupporting bulk paint of rectangular zones (fromX, fromY, toX, toY) up to 500 tiles per request.GET /admin/game-data/maps/:mapNum/regionallowing the client editor to inspect specific viewport regions.1..100and enforces graphic existence guards before executing atomic database writes.api/src/tests/worldBuilder_rectangle.integration.test.ts.