diff --git a/Backend/scripting/runtimes/js/client_architect.test.cjs b/Backend/scripting/runtimes/js/client_architect.test.cjs index d58058aa..706b583a 100644 --- a/Backend/scripting/runtimes/js/client_architect.test.cjs +++ b/Backend/scripting/runtimes/js/client_architect.test.cjs @@ -747,7 +747,7 @@ test("your own models are in Props' Yours folder; a prop takes one of your mater }); editor.open(); editor.useMode('props'); - editor.pressFolder(7); + editor.pressFolder(8); // The textures drawn by code come first (New stone blocks ...), then your models. const names = editor.items().map((item) => item.name); assert.equal(names.at(-1), 'stall'); @@ -2699,7 +2699,7 @@ test("Yours' New ... tiles make a material of that kind under the next free name }); editor.random = () => 0.25; editor.useMode('props'); - editor.pressFolder(7); + editor.pressFolder(8); const index = editor.items().findIndex((item) => item.name === 'New plaster'); editor.pressTile(index); const paths = calls @@ -5345,6 +5345,32 @@ test('the catalogue offers the prefabs people use, and says which models are onl ); }); +test("the catalogue offers the level designers' paving, road and bank pieces", () => { + const { Catalogue } = require('../../../../Client/resources/architect/catalogue.cjs'); + const catalogue = new Catalogue({ + prefabNames: () => [], + vegetationKinds: () => [], + propMeshes: () => [ + 'objects/intermediates/walltool/stone_pavement_normal.cgf', + 'objects/intermediates/walltool/curb_garden_straight_a.cgf', + 'objects/intermediates/cestool/road_country_big_corner60l_a.cgf', + 'objects/intermediates/poses/bag_pick.cgf', + 'objects/intermediates/dimension_references/dimref_anvil.cgf', + ], + }); + assert.deepEqual( + catalogue + .entries('ground_pieces') + .map((entry) => entry.name) + .sort(), + [ + 'objects/intermediates/cestool/road_country_big_corner60l_a.cgf', + 'objects/intermediates/walltool/curb_garden_straight_a.cgf', + 'objects/intermediates/walltool/stone_pavement_normal.cgf', + ], + ); +}); + test('an export builds the prefabs people use as smart objects and whole ladders climbable', () => { const vm = require('node:vm'); const { serverScript } = require('../../../../Client/resources/architect/server_export.cjs'); diff --git a/Client/resources/architect/catalogue.cjs b/Client/resources/architect/catalogue.cjs index e9e15175..750f6745 100644 --- a/Client/resources/architect/catalogue.cjs +++ b/Client/resources/architect/catalogue.cjs @@ -130,6 +130,16 @@ const CATEGORIES_LIST = [ source: 'prop', match: (path) => path.startsWith('objects/manmade/structures/'), }, + // The level designers' kit pieces: paving and curbs (walltool), road, bank and creek pieces, + // stairs and building elements. Their poses and size references are no props to place. + { + key: 'ground_pieces', + label: 'Paving, roads, banks', + source: 'prop', + match: (path) => + path.startsWith('objects/intermediates/') && + !['/poses/', '/dimension_references/'].some((part) => path.includes(part)), + }, // The author's own models (Documents\KCDS\World Architect\assets, /kcds//...). { key: 'yours', diff --git a/Client/resources/architect/editor.cjs b/Client/resources/architect/editor.cjs index 3b444a1d..7c91fa1f 100644 --- a/Client/resources/architect/editor.cjs +++ b/Client/resources/architect/editor.cjs @@ -106,7 +106,17 @@ const MODES = Object.freeze([ key: 'props', label: 'Props', icon: 'box', - folders: ['furniture', 'decorations', 'fixtures', 'goods', 'work', 'rocks', 'parts', 'yours'], + folders: [ + 'furniture', + 'decorations', + 'fixtures', + 'goods', + 'work', + 'rocks', + 'parts', + 'ground_pieces', + 'yours', + ], }, { key: 'effects',