Add walls to maps #100

Closed
opened 2026-10-15 22:51:22 +00:00 by Syndria98 · 18 comments
Owner

Make a wall editor for the maps. Make it also sync with foundry's walls

Make a wall editor for the maps. Make it also sync with foundry's walls
Syndria98 added the ai-ready label 2026-10-15 22:51:22 +00:00
Agent added the working label 2026-10-15 23:59:55 +00:00
Collaborator

Let me look at the existing tests, the Foundry proxy service, and the CreateMap window to understand conventions.

Let me look at the existing tests, the Foundry proxy service, and the CreateMap window to understand conventions.
Collaborator

Now I have a good picture. Let me check the docs pages for maps and Foundry integration, then start implementing.

Now I have a good picture. Let me check the docs pages for maps and Foundry integration, then start implementing.
Collaborator

Now I have the full picture. Let me implement, starting with the backend model.

Now I have the full picture. Let me implement, starting with the backend model.
Collaborator

Now the POST /walls route in routes/map.js:

Now the `POST /walls` route in `routes/map.js`:
Collaborator

Careful — foundry-link.js uses the JS built-in Map, so I must check how note.js imports the Map model:

Careful — `foundry-link.js` uses the JS built-in `Map`, so I must check how `note.js` imports the Map model:
Collaborator

note.js uses Map, but foundry-link.js uses the built-in new Map(), so I'll name the model import differently there. Now add the sync routes:

`note.js` uses `Map`, but `foundry-link.js` uses the built-in `new Map()`, so I'll name the model import differently there. Now add the sync routes:
Collaborator

Now the frontend service MapWalls.js:

Now the frontend service `MapWalls.js`:
Collaborator

Now update MapViewerPane.vue. First the script imports and state:

Now update `MapViewerPane.vue`. First the script imports and state:
Collaborator

Now modify the pan handlers to support wall drawing:

Now modify the pan handlers to support wall drawing:
Collaborator

Now the walls logic block — insert after the tokens section (after handleActorEntry):

Now the walls logic block — insert after the tokens section (after `handleActorEntry`):
Collaborator

Now add the hint element in the template (next to the drop hint):

Now add the hint element in the template (next to the drop hint):
Collaborator

Now the i18n strings — campaigns.json in all three locales:

Now the i18n strings — `campaigns.json` in all three locales:
Collaborator

Now the Foundry module. First the state variables at the top of api.js:

Now the Foundry module. First the state variables at the top of `api.js`:
Collaborator

Refine applyDragonrollWalls so unchanged documents are not written back at all:

Refine `applyDragonrollWalls` so unchanged documents are not written back at all:
Collaborator

Now the test file:

Now the test file:
Collaborator

Let me fix the module's name pairing to require the name to be unique, then rewrite the test harness issues:

Let me fix the module's name pairing to require the name to be unique, then rewrite the test harness issues:
Collaborator

Implementation is ready for review: #105

Implementation is ready for review: https://git.aranroig.com/Syndria98/dragonroll/pulls/105
Collaborator

The automated implementation stopped because of an internal error. Please check the worker logs for details.

The automated implementation stopped because of an internal error. Please check the worker logs for details.
Agent removed the working label 2026-10-16 00:59:57 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Syndria98/dragonroll#100