@sandustry-modding/types 0.3.0 → 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 +88 -0
- package/LICENSE +21 -0
- package/README.md +8 -19
- package/package.json +65 -5
- 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
- package/docs/Changelog.md +0 -46
- package/docs/README.md +0 -62
|
@@ -11,7 +11,8 @@ export namespace sound {
|
|
|
11
11
|
*
|
|
12
12
|
* @param soundId - Registered sound identifier.
|
|
13
13
|
* @param options - Volume, position, playback rate, and rate-limit options.
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
15
16
|
*/
|
|
16
17
|
export function play(soundId: string, options?: SoundOptions): SoundHandle;
|
|
17
18
|
|
|
@@ -20,7 +21,8 @@ export namespace sound {
|
|
|
20
21
|
*
|
|
21
22
|
* @param soundId - Registered sound identifier.
|
|
22
23
|
* @param options - Volume, position, playback rate, and rate-limit options.
|
|
23
|
-
*
|
|
24
|
+
*
|
|
25
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
24
26
|
*/
|
|
25
27
|
export function playActive(soundId: string, options?: SoundOptions): SoundHandle;
|
|
26
28
|
|
|
@@ -29,7 +31,8 @@ export namespace sound {
|
|
|
29
31
|
*
|
|
30
32
|
* @param layers - Layer definitions (sound id, volume, delay, and per-layer options).
|
|
31
33
|
* @param options - Shared position, volume, and rate-limit options for all layers.
|
|
32
|
-
*
|
|
34
|
+
*
|
|
35
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
33
36
|
*/
|
|
34
37
|
export function playLayers(layers: SoundLayer[], options?: SoundLayersOptions): SoundHandle[];
|
|
35
38
|
|
|
@@ -39,7 +42,8 @@ export namespace sound {
|
|
|
39
42
|
* @param worldX - World X coordinate in pixels.
|
|
40
43
|
* @param worldY - World Y coordinate in pixels.
|
|
41
44
|
* @param baseVolume - Base volume before distance attenuation.
|
|
42
|
-
*
|
|
45
|
+
*
|
|
46
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
43
47
|
*/
|
|
44
48
|
export function calculateDistanceOptionsAtWorld(worldX: number, worldY: number, baseVolume?: number): SoundOptions;
|
|
45
49
|
|
|
@@ -47,27 +51,29 @@ export namespace sound {
|
|
|
47
51
|
* Stop a sound by id.
|
|
48
52
|
*
|
|
49
53
|
* @param soundId - Registered sound identifier to stop.
|
|
50
|
-
*
|
|
54
|
+
*
|
|
55
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
51
56
|
*/
|
|
52
57
|
export function stopBySoundId(soundId: string): void;
|
|
53
58
|
|
|
54
59
|
/**
|
|
55
60
|
* @deprecated Use {@link stopBySoundId} instead.
|
|
56
|
-
*
|
|
61
|
+
*
|
|
62
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
57
63
|
*/
|
|
58
64
|
export function stopById(soundId: string): void;
|
|
59
65
|
|
|
60
66
|
/**
|
|
61
67
|
* Stop the active sound channel.
|
|
62
68
|
*
|
|
63
|
-
* @see https://sandustry.com/sandkit.html
|
|
69
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
64
70
|
*/
|
|
65
71
|
export function stopActive(): void;
|
|
66
72
|
|
|
67
73
|
/**
|
|
68
74
|
* Stop all playing sounds.
|
|
69
75
|
*
|
|
70
|
-
* @see https://sandustry.com/sandkit.html
|
|
76
|
+
* @see [Official docs](https://sandustry.com/sandkit.html#api-access-heading)
|
|
71
77
|
*/
|
|
72
78
|
export function stopAll(): void;
|
|
73
79
|
|
|
@@ -12,6 +12,14 @@ export namespace structureBehaviors {
|
|
|
12
12
|
* Register conveyor behavior for a structure type.
|
|
13
13
|
* @param structureId - Structure type id string.
|
|
14
14
|
* @param options - Transport offset, velocity, distance, and run direction.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* api.structureBehaviors.registerConveyorType(
|
|
19
|
+
* "exampleConveyor",
|
|
20
|
+
* { runWith: "right" },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
15
23
|
*/
|
|
16
24
|
export function registerConveyorType(structureId: string, options?: { transportOffset?: Vector2; velocity?: Vector2; maxTransportDistance?: number; transportHeight?: number; runWith?: 'left' | 'right'; skipQueued?: boolean; }): void;
|
|
17
25
|
/**
|