v0.137.0 — Map building: Library Objects
Map building's eighth milestone (M8, the program plan's M3): an Object gets a page of its own in the Library, is edited there with no map behind it, is inserted into any map in one step, and its placed copies are listed and removed whole; tokens and pictures become Objects from the Library, and an Object downloads as a blueprint. The program's documents are in docs/programs/map-building/; this milestone's tasks, decisions and test script are in docs/programs/map-building/m8-library-objects.md.
An Object's own page
- [x] An Object has a page of its own in the Library (
/library/objects/:id), opened by clicking its card: drawn from its parts with nothing around it, its name, tags and where it is, Edit, Insert into map, Download blueprint, Copy to my Library, Delete, and the copies placed on maps, each with a Remove. - [x] New Object in the Library opens the new Object's page.
Editing with no map
- [x] An Object with no map is edited at
/library/objects/:id/editwith the map's own tools and no map behind it: no foundation, its own layers, the Palette, the nub reading Library / Object, Done back to its page. Doors, windows and portcullises can be added there. - [x] Undo, redo and History work there (a map-less Object is versioned on its own), and its other open tabs follow live.
Insert into map, and removing a copy
- [x] Insert into map puts a copy on any map you may edit, at its centre, in one step the map can undo, then offers Open map. Every piece is stamped with its placement and the Object it came from (migration 0083).
- [x] Remove on the Object's page takes the whole copy, pieces moved out of it included, never a generated map's rows.
- [x] Inserting (or copying) an Object from your own Library brings its hidden parts with it, a secret door or a trap, onto a map whose hidden rows you see. Anyone else's copy still leaves them out.
Make into object, and blueprints
- [x] Make into object on a token or a picture in the Library makes it an Object (a picture becomes a new Object with it as its art). No outline VBL yet, and it says so.
- [x] Download blueprint writes the Object as JSON: its parts relative to its corner, layers, states, Interactions, VBL, object types and assets, with the map generator's fields. Hidden parts, and where a secret door stands in its wall, are only in an editor's download.
- [x] For the map generator in Edit Object sets those fields (footprint, turns, mirror, purpose, tags, sockets), saved on their own so nothing else in the Object is overwritten.
Fixed on the way
- [x] Restoring or purging a deleted map-less token let anyone through.
- [x] Adding a part to someone else's Object on a map (create or paste) needed only the right to place on the map; it now needs Edit on that Object.
- [x] A part of a map-less Object can't be moved into another Object (each has its own History).
Releases
- [x] Each release on main is tagged by a workflow when its CI goes green (
v<version>on the release commit, with its message), and its notes are published as a GitHub Release. No release had been tagged since v0.121.0.
Migrations
- 0083
library_object_instances(additive):instance_idandsource_object_idon tokens and drawings, and indexes on them and ontokens.parent_idanddrawings.parent_token_id.