The tile list in the tilemap section is a palette of pictures: each tile shows its lone tile (the four convex corners for floor and wall, the picture itself for none) with its name below, laid out with the image-picker grid (#139)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c411c1ff3
commit
bfbcbe604c
9 files changed
+331
-28
No files matched your search
@@ -14,6 +14,7 @@ import type { TileAsset } from '../../src/core/model/Asset';
|
||||
import { isPlaceableType } from '../../src/core/model/AssetTypes';
|
||||
import {
|
||||
autotileCombinations,
|
||||
loneTileQuadrants,
|
||||
type Neighbours,
|
||||
neighboursAt,
|
||||
SAMPLE_PATTERN,
|
||||
@@ -249,6 +250,28 @@ describe('autotile blocks', () => {
|
||||
expect([corner.n, corner.e, corner.ne]).toEqual([true, true, false]);
|
||||
expect(tileQuadrants('floor', corner)[1]).toEqual({ x: 3, y: 0 });
|
||||
});
|
||||
|
||||
it('shows each kind in the palette as its lone tile, the four convex corners (#139)', () => {
|
||||
expect(loneTileQuadrants('floor')).toEqual([
|
||||
{ x: 0, y: 2 },
|
||||
{ x: 3, y: 2 },
|
||||
{ x: 0, y: 5 },
|
||||
{ x: 3, y: 5 },
|
||||
]);
|
||||
expect(loneTileQuadrants('wall')).toEqual([
|
||||
{ x: 0, y: 0 },
|
||||
{ x: 3, y: 0 },
|
||||
{ x: 0, y: 3 },
|
||||
{ x: 3, y: 3 },
|
||||
]);
|
||||
// A plain tile is its picture as it is, each corner its own quarter.
|
||||
expect(loneTileQuadrants('none')).toEqual([
|
||||
{ x: 0, y: 0 },
|
||||
{ x: 1, y: 0 },
|
||||
{ x: 0, y: 1 },
|
||||
{ x: 1, y: 1 },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('tile asset', () => {
|
||||
|
||||
Reference in new issue
Block a user