@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.
Files changed (65) hide show
  1. package/CHANGELOG.md +40 -11
  2. package/README.md +3 -0
  3. package/package.json +12 -2
  4. package/src/configs/index.d.ts +38 -0
  5. package/src/configs/modinfo.d.ts +751 -0
  6. package/src/configs/patches.d.ts +195 -0
  7. package/src/sandkit/api/action.d.ts +5 -0
  8. package/src/sandkit/api/blueprints.d.ts +5 -3
  9. package/src/sandkit/api/camera.d.ts +5 -0
  10. package/src/sandkit/api/effects.d.ts +28 -7
  11. package/src/sandkit/api/elements.d.ts +124 -39
  12. package/src/sandkit/api/energy.d.ts +8 -0
  13. package/src/sandkit/api/entities.d.ts +15 -8
  14. package/src/sandkit/api/events.d.ts +139 -2
  15. package/src/sandkit/api/excavation.d.ts +33 -3
  16. package/src/sandkit/api/factory.d.ts +6 -4
  17. package/src/sandkit/api/fire.d.ts +7 -4
  18. package/src/sandkit/api/game.d.ts +8 -2
  19. package/src/sandkit/api/grid.d.ts +72 -23
  20. package/src/sandkit/api/hooks.d.ts +362 -2
  21. package/src/sandkit/api/i18n.d.ts +65 -20
  22. package/src/sandkit/api/input.d.ts +15 -0
  23. package/src/sandkit/api/items.d.ts +7 -0
  24. package/src/sandkit/api/lights.d.ts +55 -8
  25. package/src/sandkit/api/maps.d.ts +10 -1
  26. package/src/sandkit/api/patterns.d.ts +22 -0
  27. package/src/sandkit/api/pickups.d.ts +14 -8
  28. package/src/sandkit/api/pipes.d.ts +9 -5
  29. package/src/sandkit/api/player.d.ts +29 -15
  30. package/src/sandkit/api/progression.d.ts +8 -0
  31. package/src/sandkit/api/reactions.d.ts +11 -0
  32. package/src/sandkit/api/rendering.d.ts +25 -2
  33. package/src/sandkit/api/resources.d.ts +5 -0
  34. package/src/sandkit/api/schedule.d.ts +7 -0
  35. package/src/sandkit/api/settings.d.ts +7 -0
  36. package/src/sandkit/api/shared.d.ts +13 -3
  37. package/src/sandkit/api/signals.d.ts +29 -0
  38. package/src/sandkit/api/sound.d.ts +14 -8
  39. package/src/sandkit/api/structureBehaviors.d.ts +8 -0
  40. package/src/sandkit/api/structures.d.ts +353 -43
  41. package/src/sandkit/api/tech.d.ts +73 -9
  42. package/src/sandkit/api/terrains.d.ts +25 -13
  43. package/src/sandkit/api/triggers.d.ts +10 -0
  44. package/src/sandkit/api/ui.d.ts +146 -1
  45. package/src/sandkit/api/upgrades.d.ts +2 -1
  46. package/src/sandkit/api/utils.d.ts +10 -5
  47. package/src/sandkit/api/world.d.ts +30 -25
  48. package/src/sandkit/index.d.ts +12 -1
  49. package/src/shared/api/elements.d.ts +36 -22
  50. package/src/shared/api/grid.d.ts +11 -6
  51. package/src/shared/api/player.d.ts +8 -4
  52. package/src/shared/api/shared.d.ts +2 -1
  53. package/src/shared/api/structures.d.ts +55 -17
  54. package/src/shared/api/terrains.d.ts +39 -23
  55. package/src/shared/api/ui.d.ts +5 -0
  56. package/src/shared/api/world.d.ts +9 -9
  57. package/src/worker/api/effects.d.ts +11 -3
  58. package/src/worker/api/elements.d.ts +54 -19
  59. package/src/worker/api/events.d.ts +31 -2
  60. package/src/worker/api/fire.d.ts +4 -2
  61. package/src/worker/api/grid.d.ts +10 -2
  62. package/src/worker/api/hooks.d.ts +68 -2
  63. package/src/worker/api/lights.d.ts +13 -3
  64. package/src/worker/api/shared.d.ts +12 -2
  65. package/src/worker/sandkit-api.d.ts +2 -1
@@ -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
- * @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.sound.play`
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
- * @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.sound.playActive`
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
- * @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.sound.playLayers`
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
- * @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.sound.calculateDistanceOptionsAtWorld`
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
- * @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.sound.stopBySoundId`
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
- * @see https://sandustry.com/sandkit.html Official Sandkit API — deprecated alias of `api.sound.stopBySoundId`
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 Official Sandkit API — Main entry `api.sound.stopActive`
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 Official Sandkit API — Main entry `api.sound.stopAll`
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
  /**