From 135559347f442b9fa39932b09dbfd6c51cecbec5 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 7 Sep 2024 14:29:05 +0200 Subject: [PATCH] Zones --- Data-model.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Data-model.md b/Data-model.md index e6fa3ad..88a230c 100644 --- a/Data-model.md +++ b/Data-model.md @@ -271,6 +271,16 @@ Routes data is stored as an ordered array of objects (so element id is the array * `name`: `string` - route name. Optional * `lock`: `boolean` - `true` if route is locked (not affected by regeneration). Optional +## Zones +Zones data is stored as an array of objects with `i` not necessary equal to the element index, but order of element defines the rendering order and is important. Object structure: +* `i`: `number` - zone id. Please note the element with id `0` is a fully valid zone, not a placeholder +* `name`: `string` - zone description +* `type`: `string` - zone type +* `color`: `string` - link to hatching pattern (e.g. `url(#hatch7)`) or color in hex (e.g. `#45ff12`) +* `cells`: `number[]` - array of zone cells +* `lock`: `boolean` - `true` if zone is locked (not affected by regeneration). Optional +* `hidden`: `boolean` - `true` if zone is hidden (not displayed). Optional + # Secondary global data Secondary data exposed to global space.