@alpaca-software/40kdc-data 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen-data.js +3 -1
- package/dist/codegen-data.js.map +1 -1
- package/dist/data/bundle.generated.js +1 -1
- package/dist/data/bundle.generated.js.map +1 -1
- package/dist/data/dataset.d.ts +17 -2
- package/dist/data/dataset.d.ts.map +1 -1
- package/dist/data/dataset.js +27 -2
- package/dist/data/dataset.js.map +1 -1
- package/dist/data/index.d.ts +5 -1
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +5 -1
- package/dist/data/index.js.map +1 -1
- package/dist/data/types.d.ts +6 -2
- package/dist/data/types.d.ts.map +1 -1
- package/dist/data/types.js +3 -1
- package/dist/data/types.js.map +1 -1
- package/dist/gen-conformance.js +163 -2
- package/dist/gen-conformance.js.map +1 -1
- package/dist/generated.d.ts +156 -36
- package/dist/generated.d.ts.map +1 -1
- package/dist/generated.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/migrate-terrain.d.ts +2 -0
- package/dist/migrate-terrain.d.ts.map +1 -0
- package/dist/migrate-terrain.js +297 -0
- package/dist/migrate-terrain.js.map +1 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +27 -1
- package/dist/runner.js.map +1 -1
- package/dist/scoring/index.d.ts +135 -0
- package/dist/scoring/index.d.ts.map +1 -0
- package/dist/scoring/index.js +195 -0
- package/dist/scoring/index.js.map +1 -0
- package/dist/terrain/index.d.ts +11 -0
- package/dist/terrain/index.d.ts.map +1 -0
- package/dist/terrain/index.js +9 -0
- package/dist/terrain/index.js.map +1 -0
- package/dist/terrain/resolve.d.ts +122 -0
- package/dist/terrain/resolve.d.ts.map +1 -0
- package/dist/terrain/resolve.js +221 -0
- package/dist/terrain/resolve.js.map +1 -0
- package/dist/terrain/solve.d.ts +56 -0
- package/dist/terrain/solve.d.ts.map +1 -0
- package/dist/terrain/solve.js +80 -0
- package/dist/terrain/solve.js.map +1 -0
- package/dist/translate/index.d.ts +1 -1
- package/dist/translate/index.d.ts.map +1 -1
- package/dist/translate/index.js.map +1 -1
- package/dist/translate/scoring.d.ts +6 -0
- package/dist/translate/scoring.d.ts.map +1 -1
- package/dist/translate/scoring.js.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +1 -0
- package/dist/validate.js.map +1 -1
- package/package.json +2 -1
- package/schemas/$defs/common.schema.json +43 -0
- package/schemas/core/secondary-card.schema.json +10 -0
- package/schemas/core/terrain-layout.schema.json +42 -56
- package/schemas/core/terrain-template.schema.json +105 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://40kdc.dev/schemas/core/terrain-template.schema.json",
|
|
4
|
+
"title": "Terrain Template",
|
|
5
|
+
"description": "A reusable terrain piece in the standard catalog: a gameplay area (the 11e terrain-area templates) or a scenery feature (walls, containers, pipes, floor segments). Footprints are authored in natural local inches; the terrain resolver derives each footprint's polygon area centroid and re-centers on it, so a layout piece that instances a template places its centroid via the layout's `position`. An `area` template may carry an embedded `features` list — scenery placed in the area's centroid-local frame — making the template a reusable composition (e.g. a ruin with its walls). Placing such a template places all of its features, transformed by the area's own placement.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"composed-feature": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "A feature placed on an area template, positioned in the area's centroid-local frame (y-down inches). When the area is placed, rotated, or mirrored, its composed features are carried along.",
|
|
11
|
+
"properties": {
|
|
12
|
+
"id": {
|
|
13
|
+
"$ref": "../defs/common.schema.json#/$defs/entity-id",
|
|
14
|
+
"description": "Composition-local id for this feature instance."
|
|
15
|
+
},
|
|
16
|
+
"template": {
|
|
17
|
+
"$ref": "../defs/common.schema.json#/$defs/entity-id",
|
|
18
|
+
"description": "Id of the feature-kind terrain-template to place."
|
|
19
|
+
},
|
|
20
|
+
"position": {
|
|
21
|
+
"$ref": "../defs/common.schema.json#/$defs/vec2",
|
|
22
|
+
"description": "The feature's centroid in the area's centroid-local frame (origin at the area centroid, y-down inches)."
|
|
23
|
+
},
|
|
24
|
+
"rotation_degrees": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"minimum": 0,
|
|
27
|
+
"exclusiveMaximum": 360,
|
|
28
|
+
"description": "Clockwise rotation of the feature about its own centroid, within the area-local frame."
|
|
29
|
+
},
|
|
30
|
+
"mirror": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["none", "horizontal", "vertical"],
|
|
33
|
+
"default": "none"
|
|
34
|
+
},
|
|
35
|
+
"floor": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"default": 0,
|
|
39
|
+
"description": "Ruin floor this feature occupies (0 = ground level)."
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": ["template", "position"],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"properties": {
|
|
47
|
+
"id": { "$ref": "../defs/common.schema.json#/$defs/entity-id" },
|
|
48
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
49
|
+
"kind": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["area", "feature"],
|
|
52
|
+
"description": "`area` = a gameplay terrain zone; `feature` = physical scenery placed on an area."
|
|
53
|
+
},
|
|
54
|
+
"source": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 64,
|
|
58
|
+
"description": "Catalog or mission pack the template originates from."
|
|
59
|
+
},
|
|
60
|
+
"footprint": { "$ref": "../defs/common.schema.json#/$defs/footprint" },
|
|
61
|
+
"default_height_inches": {
|
|
62
|
+
"type": "number",
|
|
63
|
+
"minimum": 0,
|
|
64
|
+
"description": "Default height in inches for pieces instancing this template. Gates Plunging Fire (>= 3\")."
|
|
65
|
+
},
|
|
66
|
+
"default_blocking": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"description": "Whether the template blocks line of sight / movement by default."
|
|
69
|
+
},
|
|
70
|
+
"ground_accessible": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"default": true,
|
|
73
|
+
"description": "Whether models may be placed on the ground footprint. `false` marks an elevated-only piece (a platform reachable only on its `upper_floor`, e.g. a gantry/catwalk) or a solid obstacle with no valid placement (e.g. a generator). Meaningful for `kind: \"feature\"`."
|
|
74
|
+
},
|
|
75
|
+
"upper_floor": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"description": "An elevated platform carried by this feature (e.g. a ruin's second storey). Its footprint is authored in the SAME local frame as `footprint` and re-centered on the GROUND footprint's polygon area centroid, so the two floors stay registered when the piece is placed, rotated, or mirrored. Non-resolved metadata: the terrain resolver does not emit it; authoring/visualization tools render it as an overlay. Meaningful for `kind: \"feature\"`.",
|
|
78
|
+
"properties": {
|
|
79
|
+
"footprint": { "$ref": "../defs/common.schema.json#/$defs/footprint" },
|
|
80
|
+
"floor": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 1,
|
|
83
|
+
"default": 1,
|
|
84
|
+
"description": "Ruin floor this platform occupies (1 = first floor above ground)."
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": ["footprint"],
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
},
|
|
90
|
+
"default_terrain_area_keywords": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"uniqueItems": true,
|
|
93
|
+
"description": "Terrain-area keywords areas of this template carry by default. Meaningful for `kind: \"area\"`.",
|
|
94
|
+
"items": { "$ref": "../defs/common.schema.json#/$defs/terrain-area-keyword" }
|
|
95
|
+
},
|
|
96
|
+
"features": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"description": "Composed scenery features, in the area's centroid-local frame. Only meaningful for `kind: \"area\"`.",
|
|
99
|
+
"items": { "$ref": "#/$defs/composed-feature" }
|
|
100
|
+
},
|
|
101
|
+
"game_version": { "$ref": "../defs/game-version-ref.schema.json" }
|
|
102
|
+
},
|
|
103
|
+
"required": ["id", "name", "kind", "footprint", "game_version"],
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
}
|