@sandustry-modding/types 0.3.1 → 0.4.0
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/CHANGELOG.md +40 -11
- package/README.md +3 -0
- package/package.json +12 -2
- package/src/configs/index.d.ts +38 -0
- package/src/configs/modinfo.d.ts +751 -0
- package/src/configs/patches.d.ts +195 -0
- package/src/sandkit/api/action.d.ts +5 -0
- package/src/sandkit/api/blueprints.d.ts +5 -3
- package/src/sandkit/api/camera.d.ts +5 -0
- package/src/sandkit/api/effects.d.ts +28 -7
- package/src/sandkit/api/elements.d.ts +124 -39
- package/src/sandkit/api/energy.d.ts +8 -0
- package/src/sandkit/api/entities.d.ts +15 -8
- package/src/sandkit/api/events.d.ts +139 -2
- package/src/sandkit/api/excavation.d.ts +33 -3
- package/src/sandkit/api/factory.d.ts +6 -4
- package/src/sandkit/api/fire.d.ts +7 -4
- package/src/sandkit/api/game.d.ts +8 -2
- package/src/sandkit/api/grid.d.ts +72 -23
- package/src/sandkit/api/hooks.d.ts +362 -2
- package/src/sandkit/api/i18n.d.ts +65 -20
- package/src/sandkit/api/input.d.ts +15 -0
- package/src/sandkit/api/items.d.ts +7 -0
- package/src/sandkit/api/lights.d.ts +55 -8
- package/src/sandkit/api/maps.d.ts +10 -1
- package/src/sandkit/api/patterns.d.ts +22 -0
- package/src/sandkit/api/pickups.d.ts +14 -8
- package/src/sandkit/api/pipes.d.ts +9 -5
- package/src/sandkit/api/player.d.ts +29 -15
- package/src/sandkit/api/progression.d.ts +8 -0
- package/src/sandkit/api/reactions.d.ts +11 -0
- package/src/sandkit/api/rendering.d.ts +25 -2
- package/src/sandkit/api/resources.d.ts +5 -0
- package/src/sandkit/api/schedule.d.ts +7 -0
- package/src/sandkit/api/settings.d.ts +7 -0
- package/src/sandkit/api/shared.d.ts +13 -3
- package/src/sandkit/api/signals.d.ts +29 -0
- package/src/sandkit/api/sound.d.ts +14 -8
- package/src/sandkit/api/structureBehaviors.d.ts +8 -0
- package/src/sandkit/api/structures.d.ts +353 -43
- package/src/sandkit/api/tech.d.ts +73 -9
- package/src/sandkit/api/terrains.d.ts +25 -13
- package/src/sandkit/api/triggers.d.ts +10 -0
- package/src/sandkit/api/ui.d.ts +146 -1
- package/src/sandkit/api/upgrades.d.ts +2 -1
- package/src/sandkit/api/utils.d.ts +10 -5
- package/src/sandkit/api/world.d.ts +30 -25
- package/src/sandkit/index.d.ts +12 -1
- package/src/shared/api/elements.d.ts +36 -22
- package/src/shared/api/grid.d.ts +11 -6
- package/src/shared/api/player.d.ts +8 -4
- package/src/shared/api/shared.d.ts +2 -1
- package/src/shared/api/structures.d.ts +55 -17
- package/src/shared/api/terrains.d.ts +39 -23
- package/src/shared/api/ui.d.ts +5 -0
- package/src/shared/api/world.d.ts +9 -9
- package/src/worker/api/effects.d.ts +11 -3
- package/src/worker/api/elements.d.ts +54 -19
- package/src/worker/api/events.d.ts +31 -2
- package/src/worker/api/fire.d.ts +4 -2
- package/src/worker/api/grid.d.ts +10 -2
- package/src/worker/api/hooks.d.ts +68 -2
- package/src/worker/api/lights.d.ts +13 -3
- package/src/worker/api/shared.d.ts +12 -2
- package/src/worker/sandkit-api.d.ts +2 -1
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandkit mod manifest schema (`modinfo.json`).
|
|
3
|
+
*
|
|
4
|
+
* Not a runtime `sandkit` object. Use these types when authoring or validating
|
|
5
|
+
* a mod folder `modinfo.json`.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*
|
|
9
|
+
* @example modinfo.json minimal
|
|
10
|
+
* ```ts
|
|
11
|
+
* {
|
|
12
|
+
* "manifestVersion": 1,
|
|
13
|
+
* "id": "author.example-mod",
|
|
14
|
+
* "name": "Example Mod",
|
|
15
|
+
* "version": "1.0.0",
|
|
16
|
+
* "apiVersion": 1,
|
|
17
|
+
* "entry": "main.js"
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example modinfo.json complete
|
|
22
|
+
* ```ts
|
|
23
|
+
* {
|
|
24
|
+
* "manifestVersion": 1,
|
|
25
|
+
* "id": "author.example-mod",
|
|
26
|
+
* "name": "Example Mod",
|
|
27
|
+
* "version": "1.0.0",
|
|
28
|
+
* "apiVersion": 1,
|
|
29
|
+
* "entry": "main.js",
|
|
30
|
+
* "workerEntry": "worker.js",
|
|
31
|
+
* "patches": "patches.json",
|
|
32
|
+
* "description": "Example description",
|
|
33
|
+
* "author": "Example author",
|
|
34
|
+
* "gameVersion": {
|
|
35
|
+
* "minimum": "0.5.0",
|
|
36
|
+
* "maximum": "0.5.9"
|
|
37
|
+
* },
|
|
38
|
+
* "dependencies": [],
|
|
39
|
+
* "loadOrder": 0,
|
|
40
|
+
* "configSchema": {
|
|
41
|
+
* "speed": {
|
|
42
|
+
* "type": "number",
|
|
43
|
+
* "default": 1,
|
|
44
|
+
* "min": 0.5,
|
|
45
|
+
* "max": 2,
|
|
46
|
+
* "step": 0.1,
|
|
47
|
+
* "label": "Speed",
|
|
48
|
+
* "labelKey": "mods|example|speed",
|
|
49
|
+
* "description": "Adjusts the speed.",
|
|
50
|
+
* "descriptionKey": "mods|example|speedDescription"
|
|
51
|
+
* },
|
|
52
|
+
* "enabled": {
|
|
53
|
+
* "type": "boolean",
|
|
54
|
+
* "default": true,
|
|
55
|
+
* "label": "Enabled"
|
|
56
|
+
* },
|
|
57
|
+
* "mode": {
|
|
58
|
+
* "type": "choice",
|
|
59
|
+
* "default": "balanced",
|
|
60
|
+
* "label": "Mode",
|
|
61
|
+
* "options": [
|
|
62
|
+
* { "value": "balanced", "label": "Balanced" },
|
|
63
|
+
* { "value": "fast", "labelKey": "mods|example|modeFast" }
|
|
64
|
+
* ]
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* "configOverrides": {
|
|
68
|
+
* "drill": "config/drill.json"
|
|
69
|
+
* },
|
|
70
|
+
* "shaderOverrides": {
|
|
71
|
+
* "sky": "shaders/sky.glsl"
|
|
72
|
+
* },
|
|
73
|
+
* "textureOverrides": {
|
|
74
|
+
* "farm": {
|
|
75
|
+
* "path": "assets/texture.png",
|
|
76
|
+
* "frameWidth": 18,
|
|
77
|
+
* "frames": 6,
|
|
78
|
+
* "intervalMs": 166
|
|
79
|
+
* }
|
|
80
|
+
* },
|
|
81
|
+
* "provides": [
|
|
82
|
+
* {
|
|
83
|
+
* "kind": "structureTextures",
|
|
84
|
+
* "id": "industrial",
|
|
85
|
+
* "textureOverrides": {
|
|
86
|
+
* "pump": "assets/texture.png"
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
* ],
|
|
90
|
+
* "map": {
|
|
91
|
+
* "blueprints": {
|
|
92
|
+
* "terrain": "map/terrain.png",
|
|
93
|
+
* "lights": "map/lights.png",
|
|
94
|
+
* "sensors": "map/sensors.png",
|
|
95
|
+
* "authorization": "map/authorization.png",
|
|
96
|
+
* "wall": "map/wall.png",
|
|
97
|
+
* "lightsMeta": "map/lights_meta.png",
|
|
98
|
+
* "decor": "map/decor.png",
|
|
99
|
+
* "config": "map/config.json"
|
|
100
|
+
* },
|
|
101
|
+
* "width": 320,
|
|
102
|
+
* "height": 320,
|
|
103
|
+
* "spawn": { "x": 160, "y": 140 },
|
|
104
|
+
* "unstuck": { "x": 160, "y": 140 },
|
|
105
|
+
* "deployment": "skip",
|
|
106
|
+
* "topBounds": {
|
|
107
|
+
* "hard": 0,
|
|
108
|
+
* "soft": 100
|
|
109
|
+
* },
|
|
110
|
+
* "depthLight": {
|
|
111
|
+
* "startY": 640,
|
|
112
|
+
* "endY": 1280,
|
|
113
|
+
* "maxSize": 400,
|
|
114
|
+
* "minSize": 120
|
|
115
|
+
* },
|
|
116
|
+
* "parallax": {
|
|
117
|
+
* "widthScale": 1,
|
|
118
|
+
* "offsetY": 0
|
|
119
|
+
* },
|
|
120
|
+
* "colorMappings": {
|
|
121
|
+
* "38, 0, 0": {
|
|
122
|
+
* "background": "SandiumSoil",
|
|
123
|
+
* "foreground": "Obsidian"
|
|
124
|
+
* },
|
|
125
|
+
* "4, 5, 6": "GoldSoil"
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
* }
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
/** Number setting in `modinfo.json` `configSchema`. */
|
|
135
|
+
export interface ConfigSchemaNumber {
|
|
136
|
+
/**
|
|
137
|
+
* Discriminator. Must be `"number"`.
|
|
138
|
+
*
|
|
139
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
140
|
+
*/
|
|
141
|
+
type: "number";
|
|
142
|
+
/**
|
|
143
|
+
* Value used when the player has not changed the setting.
|
|
144
|
+
*
|
|
145
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
146
|
+
*/
|
|
147
|
+
default: number;
|
|
148
|
+
/**
|
|
149
|
+
* Inclusive lower bound for the setting.
|
|
150
|
+
*
|
|
151
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
152
|
+
*/
|
|
153
|
+
min?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Inclusive upper bound for the setting.
|
|
156
|
+
*
|
|
157
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
158
|
+
*/
|
|
159
|
+
max?: number;
|
|
160
|
+
/**
|
|
161
|
+
* UI step size for the number control.
|
|
162
|
+
*
|
|
163
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
164
|
+
*/
|
|
165
|
+
step?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Plain-text label shown in the settings UI.
|
|
168
|
+
*
|
|
169
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
170
|
+
*/
|
|
171
|
+
label?: string;
|
|
172
|
+
/**
|
|
173
|
+
* i18n key for the settings label (preferred over {@link label} when both exist).
|
|
174
|
+
*
|
|
175
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
176
|
+
*/
|
|
177
|
+
labelKey?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Plain-text help text for the setting.
|
|
180
|
+
*
|
|
181
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
182
|
+
*/
|
|
183
|
+
description?: string;
|
|
184
|
+
/**
|
|
185
|
+
* i18n key for the setting help text.
|
|
186
|
+
*
|
|
187
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
188
|
+
*/
|
|
189
|
+
descriptionKey?: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Boolean setting in `modinfo.json` `configSchema`. */
|
|
193
|
+
export interface ConfigSchemaBoolean {
|
|
194
|
+
/**
|
|
195
|
+
* Discriminator. Must be `"boolean"`.
|
|
196
|
+
*
|
|
197
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
198
|
+
*/
|
|
199
|
+
type: "boolean";
|
|
200
|
+
/**
|
|
201
|
+
* Value used when the player has not changed the setting.
|
|
202
|
+
*
|
|
203
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
204
|
+
*/
|
|
205
|
+
default: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Plain-text label shown in the settings UI.
|
|
208
|
+
*
|
|
209
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
210
|
+
*/
|
|
211
|
+
label?: string;
|
|
212
|
+
/**
|
|
213
|
+
* i18n key for the settings label.
|
|
214
|
+
*
|
|
215
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
216
|
+
*/
|
|
217
|
+
labelKey?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Plain-text help text for the setting.
|
|
220
|
+
*
|
|
221
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
222
|
+
*/
|
|
223
|
+
description?: string;
|
|
224
|
+
/**
|
|
225
|
+
* i18n key for the setting help text.
|
|
226
|
+
*
|
|
227
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
228
|
+
*/
|
|
229
|
+
descriptionKey?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** One option inside a {@link ConfigSchemaChoice}. */
|
|
233
|
+
export interface ConfigSchemaChoiceOption {
|
|
234
|
+
/**
|
|
235
|
+
* Stored value written when the player picks this option.
|
|
236
|
+
*
|
|
237
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
238
|
+
*/
|
|
239
|
+
value: string;
|
|
240
|
+
/**
|
|
241
|
+
* Plain-text label for the option.
|
|
242
|
+
*
|
|
243
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
244
|
+
*/
|
|
245
|
+
label?: string;
|
|
246
|
+
/**
|
|
247
|
+
* i18n key for the option label.
|
|
248
|
+
*
|
|
249
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
250
|
+
*/
|
|
251
|
+
labelKey?: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** Choice setting in `modinfo.json` `configSchema`. */
|
|
255
|
+
export interface ConfigSchemaChoice {
|
|
256
|
+
/**
|
|
257
|
+
* Discriminator. Must be `"choice"`.
|
|
258
|
+
*
|
|
259
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
260
|
+
*/
|
|
261
|
+
type: "choice";
|
|
262
|
+
/**
|
|
263
|
+
* Default option {@link ConfigSchemaChoiceOption.value}.
|
|
264
|
+
*
|
|
265
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
266
|
+
*/
|
|
267
|
+
default: string;
|
|
268
|
+
/**
|
|
269
|
+
* Plain-text label shown in the settings UI.
|
|
270
|
+
*
|
|
271
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
272
|
+
*/
|
|
273
|
+
label?: string;
|
|
274
|
+
/**
|
|
275
|
+
* i18n key for the settings label.
|
|
276
|
+
*
|
|
277
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
278
|
+
*/
|
|
279
|
+
labelKey?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Allowed choices for this setting.
|
|
282
|
+
*
|
|
283
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
284
|
+
*/
|
|
285
|
+
options: readonly ConfigSchemaChoiceOption[];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* One entry under `modinfo.json` `configSchema`.
|
|
290
|
+
*
|
|
291
|
+
* Keys of `configSchema` are setting ids read via `api.settings.get`.
|
|
292
|
+
*
|
|
293
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
294
|
+
*/
|
|
295
|
+
export type ConfigSchemaEntry =
|
|
296
|
+
| ConfigSchemaNumber
|
|
297
|
+
| ConfigSchemaBoolean
|
|
298
|
+
| ConfigSchemaChoice;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Animated (or static) texture replacement for a vanilla asset id.
|
|
302
|
+
*
|
|
303
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
304
|
+
*/
|
|
305
|
+
export interface TextureOverride {
|
|
306
|
+
/**
|
|
307
|
+
* Path to the replacement image, relative to the mod root.
|
|
308
|
+
*
|
|
309
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
310
|
+
*/
|
|
311
|
+
path: string;
|
|
312
|
+
/**
|
|
313
|
+
* Width in pixels of one animation frame.
|
|
314
|
+
*
|
|
315
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
316
|
+
*/
|
|
317
|
+
frameWidth?: number;
|
|
318
|
+
/**
|
|
319
|
+
* Number of frames in the spritesheet.
|
|
320
|
+
*
|
|
321
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
322
|
+
*/
|
|
323
|
+
frames?: number;
|
|
324
|
+
/**
|
|
325
|
+
* Milliseconds between animation frames.
|
|
326
|
+
*
|
|
327
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
328
|
+
*/
|
|
329
|
+
intervalMs?: number;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Optional content pack exposed by this mod for other mods or the game to consume.
|
|
334
|
+
*
|
|
335
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
336
|
+
*/
|
|
337
|
+
export interface ModProvide {
|
|
338
|
+
/**
|
|
339
|
+
* Kind of provided content (for example `"structureTextures"`).
|
|
340
|
+
*
|
|
341
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
342
|
+
*/
|
|
343
|
+
kind: string;
|
|
344
|
+
/**
|
|
345
|
+
* Id of this provide entry within its kind.
|
|
346
|
+
*
|
|
347
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
348
|
+
*/
|
|
349
|
+
id: string;
|
|
350
|
+
/**
|
|
351
|
+
* Texture paths keyed by the vanilla or structure texture id they replace.
|
|
352
|
+
*
|
|
353
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
354
|
+
*/
|
|
355
|
+
textureOverrides?: Record<string, string>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Blueprint image paths for a custom map pack.
|
|
360
|
+
*
|
|
361
|
+
* Paths are relative to the mod root.
|
|
362
|
+
*
|
|
363
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
364
|
+
*/
|
|
365
|
+
export interface ModMapBlueprints {
|
|
366
|
+
/**
|
|
367
|
+
* Terrain color map image.
|
|
368
|
+
*
|
|
369
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
370
|
+
*/
|
|
371
|
+
terrain?: string;
|
|
372
|
+
/**
|
|
373
|
+
* Lights layout image.
|
|
374
|
+
*
|
|
375
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
376
|
+
*/
|
|
377
|
+
lights?: string;
|
|
378
|
+
/**
|
|
379
|
+
* Sensors layout image.
|
|
380
|
+
*
|
|
381
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
382
|
+
*/
|
|
383
|
+
sensors?: string;
|
|
384
|
+
/**
|
|
385
|
+
* Authorization zones image.
|
|
386
|
+
*
|
|
387
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
388
|
+
*/
|
|
389
|
+
authorization?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Wall layout image.
|
|
392
|
+
*
|
|
393
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
394
|
+
*/
|
|
395
|
+
wall?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Lights metadata image.
|
|
398
|
+
*
|
|
399
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
400
|
+
*/
|
|
401
|
+
lightsMeta?: string;
|
|
402
|
+
/**
|
|
403
|
+
* Decor layout image.
|
|
404
|
+
*
|
|
405
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
406
|
+
*/
|
|
407
|
+
decor?: string;
|
|
408
|
+
/**
|
|
409
|
+
* Map config JSON path.
|
|
410
|
+
*
|
|
411
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
412
|
+
*/
|
|
413
|
+
config?: string;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* World-pixel spawn or unstuck point.
|
|
418
|
+
*
|
|
419
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
420
|
+
*/
|
|
421
|
+
export interface ModMapPoint {
|
|
422
|
+
/**
|
|
423
|
+
* World X in pixels.
|
|
424
|
+
*
|
|
425
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
426
|
+
*/
|
|
427
|
+
x: number;
|
|
428
|
+
/**
|
|
429
|
+
* World Y in pixels.
|
|
430
|
+
*
|
|
431
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
432
|
+
*/
|
|
433
|
+
y: number;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Vertical camera / travel bounds for the custom map.
|
|
438
|
+
*
|
|
439
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
440
|
+
*/
|
|
441
|
+
export interface ModMapTopBounds {
|
|
442
|
+
/**
|
|
443
|
+
* Hard top bound in world pixels.
|
|
444
|
+
*
|
|
445
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
446
|
+
*/
|
|
447
|
+
hard?: number;
|
|
448
|
+
/**
|
|
449
|
+
* Soft top bound in world pixels.
|
|
450
|
+
*
|
|
451
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
452
|
+
*/
|
|
453
|
+
soft?: number;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Depth-based light sizing for the custom map.
|
|
458
|
+
*
|
|
459
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
460
|
+
*/
|
|
461
|
+
export interface ModMapDepthLight {
|
|
462
|
+
/**
|
|
463
|
+
* World Y where depth light scaling starts.
|
|
464
|
+
*
|
|
465
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
466
|
+
*/
|
|
467
|
+
startY?: number;
|
|
468
|
+
/**
|
|
469
|
+
* World Y where depth light scaling ends.
|
|
470
|
+
*
|
|
471
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
472
|
+
*/
|
|
473
|
+
endY?: number;
|
|
474
|
+
/**
|
|
475
|
+
* Maximum light size at the shallow end of the range.
|
|
476
|
+
*
|
|
477
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
478
|
+
*/
|
|
479
|
+
maxSize?: number;
|
|
480
|
+
/**
|
|
481
|
+
* Minimum light size at the deep end of the range.
|
|
482
|
+
*
|
|
483
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
484
|
+
*/
|
|
485
|
+
minSize?: number;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Parallax background tuning for the custom map.
|
|
490
|
+
*
|
|
491
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
492
|
+
*/
|
|
493
|
+
export interface ModMapParallax {
|
|
494
|
+
/**
|
|
495
|
+
* Horizontal scale of the parallax layer.
|
|
496
|
+
*
|
|
497
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
498
|
+
*/
|
|
499
|
+
widthScale?: number;
|
|
500
|
+
/**
|
|
501
|
+
* Vertical offset of the parallax layer in pixels.
|
|
502
|
+
*
|
|
503
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
504
|
+
*/
|
|
505
|
+
offsetY?: number;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Color-map cell that paints both background and foreground terrain.
|
|
510
|
+
*
|
|
511
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
512
|
+
*/
|
|
513
|
+
export interface ModMapColorMappingLayers {
|
|
514
|
+
/**
|
|
515
|
+
* Background terrain id for this blueprint RGB.
|
|
516
|
+
*
|
|
517
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
518
|
+
*/
|
|
519
|
+
background?: string;
|
|
520
|
+
/**
|
|
521
|
+
* Foreground terrain id for this blueprint RGB.
|
|
522
|
+
*
|
|
523
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
524
|
+
*/
|
|
525
|
+
foreground?: string;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* One `map.colorMappings` value: a single terrain id, or layered background/foreground ids.
|
|
530
|
+
*
|
|
531
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
532
|
+
*/
|
|
533
|
+
export type ModMapColorMapping = string | ModMapColorMappingLayers;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Custom map pack block in `modinfo.json`.
|
|
537
|
+
*
|
|
538
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
539
|
+
*/
|
|
540
|
+
export interface ModMapDefinition {
|
|
541
|
+
/**
|
|
542
|
+
* Paths to blueprint images and map config under the mod root.
|
|
543
|
+
*
|
|
544
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
545
|
+
*/
|
|
546
|
+
blueprints: ModMapBlueprints;
|
|
547
|
+
/**
|
|
548
|
+
* Map width in cells.
|
|
549
|
+
*
|
|
550
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
551
|
+
*/
|
|
552
|
+
width: number;
|
|
553
|
+
/**
|
|
554
|
+
* Map height in cells.
|
|
555
|
+
*
|
|
556
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
557
|
+
*/
|
|
558
|
+
height: number;
|
|
559
|
+
/**
|
|
560
|
+
* Player spawn position in world pixels.
|
|
561
|
+
*
|
|
562
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
563
|
+
*/
|
|
564
|
+
spawn?: ModMapPoint;
|
|
565
|
+
/**
|
|
566
|
+
* Unstuck / rescue position in world pixels.
|
|
567
|
+
*
|
|
568
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
569
|
+
*/
|
|
570
|
+
unstuck?: ModMapPoint;
|
|
571
|
+
/**
|
|
572
|
+
* Deployment mode for the map (for example `"skip"`).
|
|
573
|
+
*
|
|
574
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
575
|
+
*/
|
|
576
|
+
deployment?: string;
|
|
577
|
+
/**
|
|
578
|
+
* Vertical travel bounds at the top of the world.
|
|
579
|
+
*
|
|
580
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
581
|
+
*/
|
|
582
|
+
topBounds?: ModMapTopBounds;
|
|
583
|
+
/**
|
|
584
|
+
* Depth-based light size curve.
|
|
585
|
+
*
|
|
586
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
587
|
+
*/
|
|
588
|
+
depthLight?: ModMapDepthLight;
|
|
589
|
+
/**
|
|
590
|
+
* Parallax background tuning.
|
|
591
|
+
*
|
|
592
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
593
|
+
*/
|
|
594
|
+
parallax?: ModMapParallax;
|
|
595
|
+
/**
|
|
596
|
+
* Maps blueprint RGB keys (`"r, g, b"`) to terrain ids or layered terrain.
|
|
597
|
+
*
|
|
598
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
599
|
+
*/
|
|
600
|
+
colorMappings?: Record<string, ModMapColorMapping>;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Compatible game version range for the mod.
|
|
605
|
+
*
|
|
606
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
607
|
+
*/
|
|
608
|
+
export interface ModGameVersion {
|
|
609
|
+
/**
|
|
610
|
+
* Lowest supported game version string.
|
|
611
|
+
*
|
|
612
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
613
|
+
*/
|
|
614
|
+
minimum?: string;
|
|
615
|
+
/**
|
|
616
|
+
* Highest supported game version string.
|
|
617
|
+
*
|
|
618
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
619
|
+
*/
|
|
620
|
+
maximum?: string;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Sandkit mod manifest (`modinfo.json`).
|
|
625
|
+
*
|
|
626
|
+
* Required for every mod folder. Minimal mods only need
|
|
627
|
+
* {@link manifestVersion}, {@link id}, {@link name}, {@link version},
|
|
628
|
+
* {@link apiVersion}, and {@link entry}.
|
|
629
|
+
*
|
|
630
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
631
|
+
*/
|
|
632
|
+
export interface ModInfo {
|
|
633
|
+
/**
|
|
634
|
+
* Manifest format version. Must be `1` for Sandkit `apiVersion` 1.
|
|
635
|
+
*
|
|
636
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
637
|
+
*/
|
|
638
|
+
manifestVersion: 1;
|
|
639
|
+
/**
|
|
640
|
+
* Unique mod id. Prefer `author.mod-name` (matches folder / Workshop identity).
|
|
641
|
+
*
|
|
642
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
643
|
+
*/
|
|
644
|
+
id: string;
|
|
645
|
+
/**
|
|
646
|
+
* Display name shown in the mod list and Workshop UI.
|
|
647
|
+
*
|
|
648
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
649
|
+
*/
|
|
650
|
+
name: string;
|
|
651
|
+
/**
|
|
652
|
+
* Semver-style mod version string.
|
|
653
|
+
*
|
|
654
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
655
|
+
*/
|
|
656
|
+
version: string;
|
|
657
|
+
/**
|
|
658
|
+
* Sandkit host API version this mod targets. Must be `1`.
|
|
659
|
+
*
|
|
660
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
661
|
+
*/
|
|
662
|
+
apiVersion: 1;
|
|
663
|
+
/**
|
|
664
|
+
* Main-thread script path relative to the mod root (for example `"main.js"`).
|
|
665
|
+
*
|
|
666
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
667
|
+
*/
|
|
668
|
+
entry: string;
|
|
669
|
+
/**
|
|
670
|
+
* Simulation-worker script path relative to the mod root.
|
|
671
|
+
* Required when the mod registers worker hooks or uses worker-only APIs.
|
|
672
|
+
*
|
|
673
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
674
|
+
*/
|
|
675
|
+
workerEntry?: string;
|
|
676
|
+
/**
|
|
677
|
+
* Path to the patches file relative to the mod root (usually `"patches.json"`).
|
|
678
|
+
* When omitted, a present `patches.json` may still auto-load per official docs.
|
|
679
|
+
*
|
|
680
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
681
|
+
*/
|
|
682
|
+
patches?: string;
|
|
683
|
+
/**
|
|
684
|
+
* Long description shown in the mod list / Workshop.
|
|
685
|
+
*
|
|
686
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
687
|
+
*/
|
|
688
|
+
description?: string;
|
|
689
|
+
/**
|
|
690
|
+
* Author display name.
|
|
691
|
+
*
|
|
692
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
693
|
+
*/
|
|
694
|
+
author?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Inclusive game version range this mod claims to support.
|
|
697
|
+
*
|
|
698
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
699
|
+
*/
|
|
700
|
+
gameVersion?: ModGameVersion;
|
|
701
|
+
/**
|
|
702
|
+
* Other mod ids that should load with this mod.
|
|
703
|
+
*
|
|
704
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
705
|
+
*/
|
|
706
|
+
dependencies?: string[];
|
|
707
|
+
/**
|
|
708
|
+
* Relative load priority. Lower values load earlier; higher values load later.
|
|
709
|
+
*
|
|
710
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
711
|
+
*/
|
|
712
|
+
loadOrder?: number;
|
|
713
|
+
/**
|
|
714
|
+
* Player-facing settings schema. Keys are setting ids; values define type and UI.
|
|
715
|
+
* Read at runtime with `api.settings.get`.
|
|
716
|
+
*
|
|
717
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
718
|
+
*/
|
|
719
|
+
configSchema?: Record<string, ConfigSchemaEntry>;
|
|
720
|
+
/**
|
|
721
|
+
* Paths to JSON config overrides keyed by vanilla config id (for example `"drill"`).
|
|
722
|
+
*
|
|
723
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
724
|
+
*/
|
|
725
|
+
configOverrides?: Record<string, string>;
|
|
726
|
+
/**
|
|
727
|
+
* Paths to GLSL shader replacements keyed by shader id (for example `"sky"`).
|
|
728
|
+
*
|
|
729
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
730
|
+
*/
|
|
731
|
+
shaderOverrides?: Record<string, string>;
|
|
732
|
+
/**
|
|
733
|
+
* Texture replacements keyed by vanilla texture id.
|
|
734
|
+
* A string value is a path; an object adds spritesheet frame metadata.
|
|
735
|
+
*
|
|
736
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
737
|
+
*/
|
|
738
|
+
textureOverrides?: Record<string, TextureOverride | string>;
|
|
739
|
+
/**
|
|
740
|
+
* Optional content this mod publishes for others to consume.
|
|
741
|
+
*
|
|
742
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
743
|
+
*/
|
|
744
|
+
provides?: ModProvide[];
|
|
745
|
+
/**
|
|
746
|
+
* Embedded custom map pack definition for this mod.
|
|
747
|
+
*
|
|
748
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#mod-manifest-heading)
|
|
749
|
+
*/
|
|
750
|
+
map?: ModMapDefinition;
|
|
751
|
+
}
|