Raise the Roof: Build Mode, Snapping and Base Pieces Kit
- Author
- claude-code @ auraAgent
- Opened
- Nov 13, 2026
- From
- contrib-0jj33vdp
- Into
- main
- Merged
- Nov 13, 2026
Three small, opt-in additions so a game's own pieces can look and behave like first-class pieces. Nothing changes for worlds that use none of them.
- definePiece(id, { draw = function(b, styleId) ... end }): Art.parts uses the piece's own draw with the kit's part builder (b.box, b.cyl, b.sphere, b.cone, b.logX, b.strut ...) for both the ghost and the placed piece, instead of the generic block fallback. A draw that errors is logged and falls back to the generic block. Today the only way to give a definePiece its own look is to wrap Art.parts the way productionKit does (a single _pkDelegate slot), which two kits cannot share.
- A part may carry spec = { color, rough, metal, glow, alpha } (spawnPart uses fromSpec) for colours no surface role covers: water, leaves, flowers, roof tiles.
- Build.setup({ allow = function(kind, style, builderKey, position) return ok, reason end }): the deciding machine refuses pieces the game does not allow yet (a building unlocked by a town rank, a quest or a tech tree) with code notAllowed and the game's reason. Set it on every machine.
Verified in a world: a piece defined with draw renders 14 parts (4 with their own spec colours) through Art.parts; A.allowed refuses with the game's reason and passes built-in pieces. Used by townKit (city builder kit) for its houses, services and decorations and for rank unlocks. Version, README (changelog entry) and package.yaml moved to 1.0.27.
Source world: 3b494b6c-3abe-45a7-b1af-b8f85b677232 Contributed paths:
- buildPlaceKit.package/README.md
- buildPlaceKit.package/api.module/init.luau
- buildPlaceKit.package/art.module/init.luau
- buildPlaceKit.package/authority.module/init.luau
- buildPlaceKit.package/package.yaml
- buildPlaceKit.package
- buildPlaceKit.package/api.module
- buildPlaceKit.package/art.module
- buildPlaceKit.package/authority.module
- buildPlaceKit.package/BuildPiece.component/init.luau
- buildPlaceKit.package/buildPlaceKit.testSuite/init.luau
- buildPlaceKit.package/controller.module/init.luau
- buildPlaceKit.package/ghost.module/init.luau
- buildPlaceKit.package/menus.module/init.luau
- scenes/main.scene/build.luau
- scenes/main.scene/entrypoint.luau
9 files changed
- ChangedbuildPlaceKit.packageFolderBeforeAfter
- ChangedbuildPlaceKit.package/README.md32.0 KB → 32.7 KBBeforeAfter
- ChangedbuildPlaceKit.package/api.moduleFolderBeforeAfter
- ChangedbuildPlaceKit.package/api.module/init.luau9.3 KB → 9.3 KBBeforeAfter
- ChangedbuildPlaceKit.package/art.moduleFolderBeforeAfter
- ChangedbuildPlaceKit.package/art.module/init.luau54.3 KB → 54.9 KBBeforeAfter
- ChangedbuildPlaceKit.package/authority.moduleFolderBeforeAfter
- ChangedbuildPlaceKit.package/authority.module/init.luau18.2 KB → 19.1 KBBeforeAfter
- ChangedbuildPlaceKit.package/package.yaml2.1 KB → 2.1 KBBeforeAfter
Checks
No checks have been posted.
Reviews
No reviews yet.
Conversation
No comments yet.
Sign in to comment or review.