v0.153.0 — Map building: Testing an Object
Map building's ninth milestone (M9, the program plan's M4): Test on an Object's page plays it in memory on a slate map with a Player token beside it. Doors open and close, keys, pick-lock checks and the GM's approval are simulated, you can see as a player or as the GM, and Edit and Test switch without a reload. Nothing a test does reaches the server, and leaving throws it away. On live maps, players with nothing selected now see what their own tokens see, and lights on Objects light the map. The program's documents are in docs/programs/map-building/; this milestone's tasks, decisions and test script are in docs/programs/map-building/m9-testing-an-object.md.
Testing an Object
- [x] Test on an Object's page (for its maker) plays it at
/library/objects/:id/test: a slate map, the Object at its centre, a Player token in the nearest free square outside it, all in memory. Nothing you do there reaches the server, and the Object is never changed by a test. - [x] Doors open and close from their chips or menu, swinging their parts with them, and closed doors block the Player. A locked door asks "Assume the Player holds the key?"; a pick-lock check is rolled and shown; a door that needs the GM asks you to approve as the GM in PC mode, and simply opens in GM mode; a revealed secret door cuts its wall.
- [x] The Test Object tab: the foundation (a colour or a texture), PC or GM view (PC sees what a player would, walls and doors cutting sight), Lighting, the Object's layers, Reset and Edit.
- [x] Edit and Test switch without a reload, and a change made in Edit is there when you go back to Test.
- [x] On a phone, the bar in a test is Menu, Map, Actions and Test: Test opens the tab, and Actions opens doors in memory, as the chips do.
On maps
- [x] Players with nothing selected see what their own tokens see. They used to see the whole map.
- [x] Lanterns and other lights on Objects light the map. A light the GM has hidden lights nothing for players, and reveals nothing when the GM reveals what a token sees.
- [x] A snuffed lantern goes dark. A light that was switched off used to keep lighting the map.
- [x] Move to Layer no longer makes a token or Object disappear: it wrote an id the map doesn't draw. Anything already moved that way shows again, and the menu no longer lists the layer it's on.
- [x] An Object, or a part of one, is never the one acting on a door: a selected wall used to act ("Open · as Wall").
- [x] Clicking a door, or anything that offers something, opens its menu reliably, and Escape closes only that menu, not a panel behind it.
Building Objects
- [x] Opening an Object's Edit no longer moves where its walls block. A wall with a door sticking out was resized to hold it, so it went on drawing in one place and blocking half a square away.
- [x] Opening an Object's edit route records nothing in its History when nothing changed. It used to record "object fitted to its parts" on each visit.
- [x] Editing a wall's parts no longer draws a huge "?" over the Object, or faint ovals for the walls around it. A frame Object or a wall moved to the Tokens layer no longer wears a faction ring.
Migrations
- 0085
grants_applies_to(additive; no change in behaviour): grants gain anapplies_tocolumn ('self'for every existing row), the unique key gains it, and adata_migrationstable is added. It prepares the next map building milestone (Inherited roles). On SQLite the grants table is rebuilt once at boot, after aVACUUM INTOcopy beside the database.
Known leftovers
- Inserting an Object with a door into a map can place it one square off, because the door's swing arc makes its fitted frame bigger than what's drawn.
- Change Size on a wall resizes its box but not where it blocks.
- In GM mode a test shows no proximity chips; the doors' click menus work.