factorio-types 1.2.0 → 1.2.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/README.md +6 -0
- package/dist/classes.d.ts +2350 -3649
- package/dist/concepts.d.ts +1941 -2422
- package/dist/defines.d.ts +211 -211
- package/dist/events.d.ts +233 -253
- package/dist/global.d.ts +8 -8
- package/dist/prototypes.d.ts +866 -850
- package/dist/types.d.ts +1073 -991
- package/package.json +2 -2
- package/src/core.d.ts +40 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"src/**/*.d.ts",
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
|
-
"factorioVersion": "1.1.
|
|
27
|
+
"factorioVersion": "1.1.109",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"lua-types": "^2.13.1"
|
|
30
30
|
},
|
package/src/core.d.ts
CHANGED
|
@@ -30,7 +30,46 @@ declare const serpent: Serpent;
|
|
|
30
30
|
// can eventually fix these on a per-case basis
|
|
31
31
|
type Table = any;
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
type uint = number;
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* The data.extend method. It's the primary way to add prototypes to the data table.
|
|
37
|
+
*
|
|
38
|
+
* The method has two positional function parameters:
|
|
39
|
+
*
|
|
40
|
+
* - `self` :: [Data](prototype:Data): Usually provided by calling `data:extend(otherdata)`, which is syntax sugar for `data.extend(data, otherdata)`.
|
|
41
|
+
*
|
|
42
|
+
* - `otherdata` :: array[[AnyPrototype](prototype:AnyPrototype)]: A continuous array of non-abstract prototypes.",
|
|
43
|
+
* @example
|
|
44
|
+
* ```
|
|
45
|
+
* data:extend({\n {\n type = \"item\",
|
|
46
|
+
* name = \"a-thing\",
|
|
47
|
+
* icon = \"__base__/graphics/icons/coal.png\",
|
|
48
|
+
* icon_size = 64,
|
|
49
|
+
* stack_size = 2
|
|
50
|
+
* }
|
|
51
|
+
* })
|
|
52
|
+
* ```,
|
|
53
|
+
* @example
|
|
54
|
+
* ```
|
|
55
|
+
* local recipe_cat =
|
|
56
|
+
* {
|
|
57
|
+
* type = \"recipe-category\",
|
|
58
|
+
* name = \"my-category\"
|
|
59
|
+
* }
|
|
60
|
+
* local assembler =
|
|
61
|
+
* {
|
|
62
|
+
* type = \"assembling-machine\",
|
|
63
|
+
* name = \"cool-assembler\",
|
|
64
|
+
* energy_usage = \"30kW\",
|
|
65
|
+
* energy_source = {type = \"void\"},
|
|
66
|
+
* crafting_speed = 1,
|
|
67
|
+
* crafting_categories = {\"crafting\"}
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* data:extend({recipe_cat, assembler})
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
34
73
|
type DataExtendMethod = (data: prototype.Data, ...otherData: any[]) => void;
|
|
35
74
|
|
|
36
75
|
// The docs and json definition make reference to these types but have no information as to what they are
|