factorio-types 1.0.0 → 1.1.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/README.md CHANGED
@@ -25,6 +25,8 @@ This library includes [tsconfig.base.json](./tsconfig.base.json) in the root of
25
25
 
26
26
  A very minimal proof-of-concept showing basic toolchain setup can be found [Here](https://github.com/sguest/factorio-fire-armor-typescript)
27
27
 
28
+ A slightly more in-depth and realistic mode can be found [Here](https://github.com/sguest/basic-seablock)
29
+
28
30
  ## Noise library
29
31
 
30
32
  A note on using the `noise` library from within Factorio: Several mods (typically those that deal with terrain generation) will `require('noise')`. While this seems to work, this is not an officially documented part of the Factorio modding API and is not expressed in these types. If you want to use it, you'll want to add the following to your configuration
@@ -39,12 +41,4 @@ A note on using the `noise` library from within Factorio: Several mods (typicall
39
41
  }
40
42
  ```
41
43
 
42
- Then, include a definition file at the root of your project
43
-
44
- `noise.d.ts`:
45
-
46
- ```typescript
47
- declare module 'noise' {
48
- // declare any functions from the noise library that you are using
49
- }
50
- ```
44
+ You can then optionally write your own custom type definitions for these types, or leave them as `any`
package/dist/core.d.ts CHANGED
@@ -12,6 +12,11 @@ declare const data: {
12
12
  extend(values: prototype.dataExtendType[]): void,
13
13
  };
14
14
 
15
+ /**
16
+ * Mapping of currently loaded mods to their version. Only exists at the data stage.
17
+ */
18
+ declare const mods: { [key: string] : string}
19
+
15
20
  declare const global: { [key: string]: any };
16
21
 
17
22
  declare function log(str: runtime.LocalisedString): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Typescript declarations for the Factorio mod API",
5
5
  "main": "index.d.ts",
6
6
  "repository": "https://github.com/sguest/factorio-types.git",