feat(bgm): add surface mounting and setup surfaces

This commit is contained in:
2026-08-09 21:03:20 +08:00
parent 4e18ab5bc8
commit 599fb6a76d
8 changed files with 187 additions and 10 deletions
@@ -46,6 +46,13 @@ type: board
id: harbor
role: surface
size: [300, 200]
mount:
kind: table
x: 0
y: 0
rotation: 0
children:
- board#player
layout:
- route: /dock/:seat
candidates:
@@ -56,6 +63,29 @@ layout:
rotation: 0
```
```yaml file=parts/player.yaml
type: board
id: player
role: surface
size: [200, 200]
mount:
kind: child
x: 100
y: 50
rotation: 0
layout:
- route: /hand/:slot
candidates:
$variants: ./hand.csv
```
```csv file=parts/hand.csv
slot,x,y,rotation
string,number,number,number
0,0,0,0
1,0,20,0
```
```csv file=parts/seats.csv
seat,x,y,rotation
string,number,number,number
@@ -69,6 +99,9 @@ string,number,number,number
role: setup
type: game
id: main
surfaces:
- board#harbor
- board#player
setup:
/dock/0: harbor:token#wood
/deck: harbor:token#grain