ctx.schematics.ids

This commit is contained in:
2026-11-22 16:09:11 -03:00
parent df7a1a94d6
commit 527f2fb5a7
4 changed files with 16 additions and 0 deletions
+7
View File
@@ -88,6 +88,13 @@ const doorways = room.blocks.filter((block) => room.palette[block.i].id === "cop
Positions in it are from its lowest corner, before it's turned. Changing the copy doesn't change what `place` puts.
`ids` gives every registered schematic's id, the files' and the ones scripts registered, in the order they were
registered, like for a tool that lets players pick one:
```ts
const rooms = ctx.schematics.ids().filter((id) => id.startsWith("copper_tools:room_"));
```
Until `import_data` is built, a block's exported data goes back in as it is, so a chest placed from a schematic has its
items' list in its data and no container.