factoriomod-debug 1.1.47 → 2.0.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 +9 -0
- package/dist/fmtk-cli.js +52 -52
- package/dist/fmtk-vscode.js +1 -1
- package/dist/fmtk.js +267 -192
- package/doc/language-lua.md +4 -4
- package/language/factorio-locale.json +1 -1
- package/language/factorio-locale.tmLanguage.json +11 -3
- package/package.json +16 -19
- package/schema/datainfo.json +29 -0
- package/schema/localeinfo.json +4 -0
- package/schema/mapgen.json +2 -2
- package/schema/mapsettings.json +1 -7
- package/schema/migration.json +44 -36
- package/schema/modinfo.json +2 -2
- package/schema/serversettings.json +12 -0
package/doc/language-lua.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
FMTK provides a third party library package for the [sumneko.lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) language server which provides various adaptations to Factorio's Lua environment. The VS Code extension will automatically install this when a Factorio version is selected, or it can be generated manually with `fmtk sumneko-3rd`.
|
|
4
4
|
|
|
5
|
-
In addition to the docs (generated from [`runtime-api.json`](https://lua-api.factorio.com/latest/auxiliary/json-docs-runtime.html) and [`prototype-api.json`](https://lua-api.factorio.com/latest/auxiliary/json-docs-prototype.html)), this package includes several static library files, configuration settings and a luals plugin that enables enhanced handling of `require`, `
|
|
5
|
+
In addition to the docs (generated from [`runtime-api.json`](https://lua-api.factorio.com/latest/auxiliary/json-docs-runtime.html) and [`prototype-api.json`](https://lua-api.factorio.com/latest/auxiliary/json-docs-prototype.html)), this package includes several static library files, configuration settings and a luals plugin that enables enhanced handling of `require`, `storage`, event handlers, and `remote` interfaces.
|
|
6
6
|
|
|
7
7
|
## API Type Definitions
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ Type definitions are also included for some of the libraries included in `__core
|
|
|
28
28
|
|
|
29
29
|
## Configuration
|
|
30
30
|
|
|
31
|
-
The VS Code extension will automatically configure `"Lua.workspace.userThirdParty"` when installing this package,
|
|
31
|
+
The VS Code extension will automatically configure `"Lua.workspace.userThirdParty"` when installing this package. Additinally, you can optionally have `"Lua.workspace.library"` updated with a link to `/data` in the selected version, by setting `factorio.workspace.manageLibraryDataLinks: true`, but this is off by default to speed up workspace loading.
|
|
32
32
|
|
|
33
33
|
## Troubleshooting
|
|
34
34
|
|
|
@@ -67,9 +67,9 @@ The underscores are removed from these, allowing the Language Server to properly
|
|
|
67
67
|
|
|
68
68
|
Additionally, in require paths with slashes, Factorio replaces any file extension with `.lua`. To match this, the extensions of any slashed paths are stripped, allowing the Language Server to correctly locate files with its default search pattern of `?.lua`. The second default of `?/init.lua` is removed from configuration, because factorio does not look for this.
|
|
69
69
|
|
|
70
|
-
### `
|
|
70
|
+
### `storage`
|
|
71
71
|
|
|
72
|
-
Each mod has its own private version of [
|
|
72
|
+
Each mod has its own private version of [`storage`](https://lua-api.factorio.com/latest/auxiliary/storage.html). To allow the Language Server to see this separation, `storage` is renamed to `__modname__storage` when used as the base variable in indexing or the target of assignment.
|
|
73
73
|
|
|
74
74
|
### `remote` interfaces
|
|
75
75
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "meta.plural.factorio-locale",
|
|
17
|
-
"match": "(__)(plural_for_parameter)(
|
|
17
|
+
"match": "(__)(plural_for_parameter)(__)([0-9]+)(__\\{)(.*?)(\\}__)",
|
|
18
18
|
"captures": {
|
|
19
19
|
"1": {"name": "punctuation.definition.tag.begin.factorio-locale"},
|
|
20
20
|
"2": {"name": "support.function.plural.factorio-locale"},
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
"match": "(__)(CONTROL(?:_MODIFIER)?|ENTITY|ITEM|TILE|FLUID)(__)(.+?)(__)",
|
|
91
|
+
"match": "(__)(CONTROL(?:_MODIFIER)?|ENTITY|ITEM|TILE|FLUID|PLANET)(__)(.+?)(__)",
|
|
92
92
|
"captures": {
|
|
93
93
|
"1":{"name": "punctuation.definition.tag.begin.factorio-locale"},
|
|
94
94
|
"2":{"name": "entity.name.namespace.factorio-locale"},
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"patterns": [{"include": "#localisedSegment"}]
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
"match": "(\\[)(img|(?:special-)?item(?:-group)?|entity|technology|recipe|fluid|tile|virtual-signal|achievement|gps|armor|train(?:-stop)
|
|
171
|
+
"match": "(\\[)(img|(?:special-)?item(?:-group)?|entity|technology|recipe|fluid|tile|virtual-signal|achievement|gps|armor|train(?:-stop)?|space-(?:location|platform)|planet|quality|asteroid-chunk|shortcut|(?:tool)tip)(=)([^\\]]*)(\\])",
|
|
172
172
|
"captures": {
|
|
173
173
|
"1":{"name": "punctuation.definition.tag.begin.factorio-locale"},
|
|
174
174
|
"2":{"name": "entity.name.tag.factorio-locale"},
|
|
@@ -179,6 +179,14 @@
|
|
|
179
179
|
},
|
|
180
180
|
"5":{"name": "punctuation.definition.tag.end.factorio-locale"}
|
|
181
181
|
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"match": "(\\[)(space-age)(\\])",
|
|
185
|
+
"captures": {
|
|
186
|
+
"1":{"name": "punctuation.definition.tag.begin.factorio-locale"},
|
|
187
|
+
"2":{"name": "entity.name.tag.factorio-locale"},
|
|
188
|
+
"3":{"name": "punctuation.definition.tag.end.factorio-locale"}
|
|
189
|
+
}
|
|
182
190
|
}
|
|
183
191
|
]
|
|
184
192
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factoriomod-debug",
|
|
3
3
|
"displayName": "Factorio Modding Tool Kit",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"publisher": "justarandomgeek",
|
|
6
6
|
"description": "Debug Tools for developing Factorio Mods",
|
|
7
7
|
"author": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"multi-root ready"
|
|
14
14
|
],
|
|
15
15
|
"engines": {
|
|
16
|
-
"vscode": "^1.
|
|
16
|
+
"vscode": "^1.94.0",
|
|
17
17
|
"node": ">20"
|
|
18
18
|
},
|
|
19
19
|
"icon": "images/factoriomod-debug-icon.png",
|
|
@@ -46,24 +46,24 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/archiver": "^6.0.2",
|
|
48
48
|
"@types/buffers": "^0.1.34",
|
|
49
|
-
"@types/chai": "^
|
|
50
|
-
"@types/chai-as-promised": "^8.0.
|
|
49
|
+
"@types/chai": "^5.0.0",
|
|
50
|
+
"@types/chai-as-promised": "^8.0.1",
|
|
51
51
|
"@types/d3": "^7.4.3",
|
|
52
52
|
"@types/dot-object": "^2.1.6",
|
|
53
53
|
"@types/ini": "^4.1.1",
|
|
54
54
|
"@types/inquirer": "^9.0.7",
|
|
55
|
-
"@types/mocha": "^10.0.
|
|
56
|
-
"@types/node": "^22.
|
|
55
|
+
"@types/mocha": "^10.0.9",
|
|
56
|
+
"@types/node": "^22.7.5",
|
|
57
57
|
"@types/node-fetch": "^2.6.11",
|
|
58
58
|
"@types/readdir-glob": "^1.1.5",
|
|
59
59
|
"@types/request": "^2.48.12",
|
|
60
60
|
"@types/semver": "^7.5.8",
|
|
61
|
-
"@types/vscode": "^1.
|
|
61
|
+
"@types/vscode": "^1.94.0",
|
|
62
62
|
"@types/vscode-webview": "^1.57.5",
|
|
63
63
|
"@vscode/codicons": "^0.0.36",
|
|
64
|
-
"@vscode/debugadapter": "^1.
|
|
65
|
-
"@vscode/debugadapter-testsupport": "^1.
|
|
66
|
-
"@vscode/vsce": "^3.1.
|
|
64
|
+
"@vscode/debugadapter": "^1.68.0",
|
|
65
|
+
"@vscode/debugadapter-testsupport": "^1.68.0",
|
|
66
|
+
"@vscode/vsce": "^3.1.1",
|
|
67
67
|
"@vscode/webview-ui-toolkit": "^1.4.0",
|
|
68
68
|
"archiver": "^7.0.1",
|
|
69
69
|
"c8": "^10.1.2",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"esbuild": "^0.24.0",
|
|
77
77
|
"esbuild-plugin-import-glob": "^0.1.1",
|
|
78
78
|
"esbuild-visualizer": "^0.6.0",
|
|
79
|
-
"eslint": "^9.
|
|
79
|
+
"eslint": "^9.12.0",
|
|
80
80
|
"ini": "^5.0.0",
|
|
81
|
-
"inquirer": "^
|
|
81
|
+
"inquirer": "^12.0.0",
|
|
82
82
|
"jsonc-parser": "^3.3.1",
|
|
83
83
|
"mimer": "^2.0.2",
|
|
84
84
|
"mocha": "^10.7.3",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"semver": "^7.6.3",
|
|
90
90
|
"tree-kill": "^1.2.2",
|
|
91
91
|
"tsx": "^4.19.1",
|
|
92
|
-
"typescript": "^5.6.
|
|
93
|
-
"typescript-eslint": "^8.
|
|
92
|
+
"typescript": "^5.6.3",
|
|
93
|
+
"typescript-eslint": "^8.9.0",
|
|
94
94
|
"vscode-languageclient": "^9.0.1",
|
|
95
95
|
"vscode-languageserver": "^9.0.1",
|
|
96
96
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
@@ -346,13 +346,10 @@
|
|
|
346
346
|
],
|
|
347
347
|
"default": "latest"
|
|
348
348
|
},
|
|
349
|
-
"factorio.workspace.library": {
|
|
350
|
-
"deprecationMessage": "Generated files are now placed in workspace private storage."
|
|
351
|
-
},
|
|
352
349
|
"factorio.workspace.manageLibraryDataLinks": {
|
|
353
350
|
"type": "boolean",
|
|
354
|
-
"default":
|
|
355
|
-
"description": "Automatically manage /data link in `\"Lua.workspace.library\"`."
|
|
351
|
+
"default": false,
|
|
352
|
+
"description": "Automatically manage /data link in `\"Lua.workspace.library\"`. Setting to false will remove the link if present."
|
|
356
353
|
},
|
|
357
354
|
"factorio.debug.env": {
|
|
358
355
|
"type": "object",
|
package/schema/datainfo.json
CHANGED
|
@@ -87,6 +87,35 @@
|
|
|
87
87
|
}
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
|
+
},
|
|
91
|
+
"auto-enable": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"default": true
|
|
94
|
+
},
|
|
95
|
+
"rail_bridges_required": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"default": false
|
|
98
|
+
},
|
|
99
|
+
"space_travel_required": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"default": false
|
|
102
|
+
},
|
|
103
|
+
"spoiling_required": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"default": false
|
|
106
|
+
},
|
|
107
|
+
"freezing_required": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"default": false
|
|
110
|
+
},
|
|
111
|
+
"segmented_units_required": {
|
|
112
|
+
"type": "boolean",
|
|
113
|
+
"default": false
|
|
114
|
+
},
|
|
115
|
+
"expansion_shaders_required": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": false
|
|
90
118
|
}
|
|
119
|
+
|
|
91
120
|
}
|
|
92
121
|
}
|
package/schema/localeinfo.json
CHANGED
package/schema/mapgen.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"properties": {
|
|
6
6
|
"terrain_segmentation": {
|
|
7
7
|
"type":"number",
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "The inverse of 'water scale' in the map generator GUI."
|
|
9
9
|
},
|
|
10
10
|
"water":{
|
|
11
11
|
"type":"number",
|
|
12
|
-
"description": "
|
|
12
|
+
"description": "The equivalent to 'water coverage' in the map generator GUI. Higher coverage means more water in larger oceans.\nWater level = 10 * log2(this value)"
|
|
13
13
|
},
|
|
14
14
|
"width":{
|
|
15
15
|
"type":"integer",
|
package/schema/mapsettings.json
CHANGED
|
@@ -7,13 +7,7 @@
|
|
|
7
7
|
{
|
|
8
8
|
"type":"object",
|
|
9
9
|
"properties": {
|
|
10
|
-
"
|
|
11
|
-
"technology_difficulty": {"type":"number"},
|
|
12
|
-
"technology_price_multiplier": {"type":"number"},
|
|
13
|
-
"research_queue_setting": {
|
|
14
|
-
"type":"string",
|
|
15
|
-
"enum": ["after-victory"]
|
|
16
|
-
}
|
|
10
|
+
"technology_price_multiplier": {"type":"number"}
|
|
17
11
|
}
|
|
18
12
|
},
|
|
19
13
|
"pollution":
|
package/schema/migration.json
CHANGED
|
@@ -3,44 +3,52 @@
|
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"definitions": {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
"migration_item": {
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{
|
|
9
|
+
"type":"array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type":"array",
|
|
12
|
+
"items": {"type": "string"},
|
|
13
|
+
"minItems": 2,
|
|
14
|
+
"maxItems": 2,
|
|
15
|
+
"uniqueItems": true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
15
22
|
}
|
|
23
|
+
|
|
16
24
|
},
|
|
17
25
|
"properties": {
|
|
18
|
-
"custom-input": { "$ref": "#/definitions/
|
|
19
|
-
"equipment-grid": { "$ref": "#/definitions/
|
|
20
|
-
"entity": { "$ref": "#/definitions/
|
|
21
|
-
"item": { "$ref": "#/definitions/
|
|
22
|
-
"tile": { "$ref": "#/definitions/
|
|
23
|
-
"decorative": { "$ref": "#/definitions/
|
|
24
|
-
"recipe-category": { "$ref": "#/definitions/
|
|
25
|
-
"item-group": { "$ref": "#/definitions/
|
|
26
|
-
"item-subgroup": { "$ref": "#/definitions/
|
|
27
|
-
"recipe": { "$ref": "#/definitions/
|
|
28
|
-
"fluid": { "$ref": "#/definitions/
|
|
29
|
-
"ammo-category": { "$ref": "#/definitions/
|
|
30
|
-
"fuel-category": { "$ref": "#/definitions/
|
|
31
|
-
"resource-category": { "$ref": "#/definitions/
|
|
32
|
-
"technology": { "$ref": "#/definitions/
|
|
33
|
-
"noise-layer": { "$ref": "#/definitions/
|
|
34
|
-
"noise-expression": { "$ref": "#/definitions/
|
|
35
|
-
"autoplace-control": { "$ref": "#/definitions/
|
|
36
|
-
"equipment": { "$ref": "#/definitions/
|
|
37
|
-
"damage-type": { "$ref": "#/definitions/
|
|
38
|
-
"virtual-signal": { "$ref": "#/definitions/
|
|
39
|
-
"achievement": { "$ref": "#/definitions/
|
|
40
|
-
"module-category": { "$ref": "#/definitions/
|
|
41
|
-
"equipment-category": { "$ref": "#/definitions/
|
|
42
|
-
"mod-setting": { "$ref": "#/definitions/
|
|
43
|
-
"trivial-smoke": { "$ref": "#/definitions/
|
|
44
|
-
"shortcut": { "$ref": "#/definitions/
|
|
26
|
+
"custom-input": { "$ref": "#/definitions/migration_item"},
|
|
27
|
+
"equipment-grid": { "$ref": "#/definitions/migration_item"},
|
|
28
|
+
"entity": { "$ref": "#/definitions/migration_item"},
|
|
29
|
+
"item": { "$ref": "#/definitions/migration_item"},
|
|
30
|
+
"tile": { "$ref": "#/definitions/migration_item"},
|
|
31
|
+
"decorative": { "$ref": "#/definitions/migration_item"},
|
|
32
|
+
"recipe-category": { "$ref": "#/definitions/migration_item"},
|
|
33
|
+
"item-group": { "$ref": "#/definitions/migration_item"},
|
|
34
|
+
"item-subgroup": { "$ref": "#/definitions/migration_item"},
|
|
35
|
+
"recipe": { "$ref": "#/definitions/migration_item"},
|
|
36
|
+
"fluid": { "$ref": "#/definitions/migration_item"},
|
|
37
|
+
"ammo-category": { "$ref": "#/definitions/migration_item"},
|
|
38
|
+
"fuel-category": { "$ref": "#/definitions/migration_item"},
|
|
39
|
+
"resource-category": { "$ref": "#/definitions/migration_item"},
|
|
40
|
+
"technology": { "$ref": "#/definitions/migration_item"},
|
|
41
|
+
"noise-layer": { "$ref": "#/definitions/migration_item"},
|
|
42
|
+
"noise-expression": { "$ref": "#/definitions/migration_item"},
|
|
43
|
+
"autoplace-control": { "$ref": "#/definitions/migration_item"},
|
|
44
|
+
"equipment": { "$ref": "#/definitions/migration_item"},
|
|
45
|
+
"damage-type": { "$ref": "#/definitions/migration_item"},
|
|
46
|
+
"virtual-signal": { "$ref": "#/definitions/migration_item"},
|
|
47
|
+
"achievement": { "$ref": "#/definitions/migration_item"},
|
|
48
|
+
"module-category": { "$ref": "#/definitions/migration_item"},
|
|
49
|
+
"equipment-category": { "$ref": "#/definitions/migration_item"},
|
|
50
|
+
"mod-setting": { "$ref": "#/definitions/migration_item"},
|
|
51
|
+
"trivial-smoke": { "$ref": "#/definitions/migration_item"},
|
|
52
|
+
"shortcut": { "$ref": "#/definitions/migration_item"}
|
|
45
53
|
}
|
|
46
54
|
}
|
package/schema/modinfo.json
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"description": "$3",
|
|
20
20
|
"version": "${4:0.0.0}",
|
|
21
21
|
"author": "$5",
|
|
22
|
-
"factorio_version": "
|
|
22
|
+
"factorio_version": "2.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
26
|
"properties": {
|
|
27
27
|
"factorio_version": {
|
|
28
|
-
"default": "
|
|
28
|
+
"default": "2.0"
|
|
29
29
|
},
|
|
30
30
|
"package": {
|
|
31
31
|
"type":"object",
|
|
@@ -62,6 +62,12 @@
|
|
|
62
62
|
"description": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum."
|
|
63
63
|
},
|
|
64
64
|
|
|
65
|
+
"max_heartbeats_per_second": {
|
|
66
|
+
"type": "number",
|
|
67
|
+
"default": 60,
|
|
68
|
+
"description": "Network tick rate. Maximum rate game updates packets are sent at before bundling them together. Minimum value is 6, maximum value is 240."
|
|
69
|
+
},
|
|
70
|
+
|
|
65
71
|
"ignore_player_limit_for_returning_players": {
|
|
66
72
|
"type":"boolean",
|
|
67
73
|
"description": "Players that played on this map already can join even when the max player limit was reached."
|
|
@@ -100,6 +106,12 @@
|
|
|
100
106
|
"description": "Whether should the server be paused when no players are present."
|
|
101
107
|
},
|
|
102
108
|
|
|
109
|
+
"auto_pause_when_players_connect": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"default": false,
|
|
112
|
+
"description": "Whether should the server be paused when someone is connecting to the server."
|
|
113
|
+
},
|
|
114
|
+
|
|
103
115
|
"only_admins_can_pause_the_game": { "type":"boolean" },
|
|
104
116
|
|
|
105
117
|
"autosave_only_on_server": {
|